Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 06:55 PM
Hi @sathya08,
Maybe you can try the below one.
I can execute the query and get the output without authenticating to the SQL Warehouse cluster.
from databricks.sdk import WorkspaceClient
from databricks.sdk.service import sql
import time
w = WorkspaceClient(
host = "https://*************.azuredatabricks.net/",
token = "********************",
)
exe_stt = w.statement_execution.execute_statement(statement='SHOW TABLES',warehouse_id='*************',catalog='*****',schema='*****')
#print(exe_stt.statement_id)
get_statement = w.statement_execution.get_statement(statement_id=exe_stt.statement_id)
#print(get_statement)
print(get_statement.result.data_array)
Thanks,
Amit
Amit Prajapati