databricks-sdk-go icon indicating copy to clipboard operation
databricks-sdk-go copied to clipboard

Not able to list the dashboards using w.Dashboards.ListAll()

Open albertux opened this issue 1 year ago • 1 comments

Description No able to list the dashboard via databricks sdk

Reproduction A minimal code sample demonstrating the bug.

ctx = context.Background()

dashes, err := w.Dashboards.ListAll(ctx, sql.ListDashboardsRequest{})
if err != nil {
	panic(err)
}

fmt.Println(dashes) // this will print [] 

for _, dash := range dashes {
	w.Dashboards.Get(ctx, sql.GetDashboardRequest{DashboardId: dash.Id})
}

If I use the following code I can see the dashboard and my notebooks/scripts so auth works properly using the SDK:

w.Workspace.ListAll(context.TODO(), workspace.ListWorkspaceRequest{Path: "/Users/MY_USER"})

If I use the databricks cli I can see the same from the above ^

databricks -p TEST workspace list  /Users/MY_USER/
ID                Type       Language  Path
205168518234450   NOTEBOOK   PYTHON    /Users/MY_USER/Untitled Notebook 2024-05-01 11:15:04
491077911195915   FILE                 /Users/MY_USER/abs.txt
1978129467304914  NOTEBOOK   PYTHON    /Users/MY_USER/Untitled Notebook 2024-05-06 09:55:17
2833826860239326  NOTEBOOK   PYTHON    /Users/MY_USER/notebook_test1
3020819056453033  NOTEBOOK   PYTHON    /Users/MY_USER/notebook_aws_test
3121648986960732  DASHBOARD            /Users/MY_USER/OS_DASH.lvdash.json
4068967099625974  NOTEBOOK   PYTHON    /Users/MY_USER/Untitled Notebook 2024-04-24 13:48:56

Expected behavior I was expecting to get the dashboard I have visible in the databricks user interface at least the one I create it.

Is it a regression? Not sure

Debug Logs

Other Information

  • OS: macOS
  • Versions:
    • github.com/databricks/databricks-sdk-go v0.40.1
    • github.com/databricks/databricks-sdk-go v0.42.0

Additional context I don't have more information that I can think I can share but if something comes up I will update this issue

albertux avatar Jun 04 '24 15:06 albertux