-
Ask Databricks Admin to enable system billing After enabling, system.billing.usage and databricks billing billable-usage will work
-
Get the workspace ID
workspace_id = spark.conf.get("spark.databricks.workspaceUrl").split(".")[0].replace("adb-", "")
print(f"Workspace ID: {workspace_id}")