Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 06:40 AM
Hi @Loinguyen318 ,
To execute BigQuery DDL from Databricks, you must use Python code in your notebook with the google-cloud-bigquery library.
from google.cloud import bigquery
client = bigquery.Client()
ddl = """
CREATE EXTERNAL TABLE `PROJECT_ID.DATASET.DELTALAKE_TABLE_NAME`
WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID`
OPTIONS (
format ="DELTA_LAKE",
uris=['DELTA_TABLE_GCS_BASE_PATH']
);
"""
job = client.query(ddl)
job.result()