<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Solution for executing Bigquery DDL in the notebook cell in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124458#M47199</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55881"&gt;@Loinguyen318&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;To execute BigQuery DDL from Databricks, you must use Python code in your notebook with the google-cloud-bigquery library.&lt;/P&gt;&lt;P&gt;from google.cloud import bigquery&lt;/P&gt;&lt;P&gt;client = bigquery.Client()&lt;BR /&gt;ddl = """&lt;BR /&gt;CREATE EXTERNAL TABLE `PROJECT_ID.DATASET.DELTALAKE_TABLE_NAME`&lt;BR /&gt;WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID`&lt;BR /&gt;OPTIONS (&lt;BR /&gt;&amp;nbsp; format ="DELTA_LAKE",&lt;BR /&gt;&amp;nbsp; uris=['DELTA_TABLE_GCS_BASE_PATH']&lt;BR /&gt;);&lt;BR /&gt;"""&lt;BR /&gt;job = client.query(ddl)&lt;BR /&gt;job.result()&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jul 2025 13:40:25 GMT</pubDate>
    <dc:creator>SP_6721</dc:creator>
    <dc:date>2025-07-08T13:40:25Z</dc:date>
    <item>
      <title>Solution for executing Bigquery DDL in the notebook cell</title>
      <link>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124246#M47146</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I would like to find a solution to execute a Bigquery DDL in a cell of databricks notebook directly.&lt;/P&gt;&lt;P&gt;Have any solution for my problem?&lt;/P&gt;&lt;P&gt;This is the example of DDL:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;CREATE&lt;/SPAN&gt; &lt;SPAN class=""&gt;EXTERNAL&lt;/SPAN&gt; &lt;SPAN class=""&gt;TABLE&lt;/SPAN&gt; &lt;SPAN class=""&gt;`&lt;SPAN class=""&gt;PROJECT_ID&lt;/SPAN&gt;.&lt;SPAN class=""&gt;DATASET&lt;/SPAN&gt;.&lt;SPAN class=""&gt;DELTALAKE_TABLE_NAME&lt;/SPAN&gt;`&lt;/SPAN&gt;
&lt;SPAN class=""&gt;WITH&lt;/SPAN&gt; &lt;SPAN class=""&gt;CONNECTION&lt;/SPAN&gt; &lt;SPAN class=""&gt;`&lt;SPAN class=""&gt;PROJECT_ID&lt;/SPAN&gt;.&lt;SPAN class=""&gt;REGION&lt;/SPAN&gt;.&lt;SPAN class=""&gt;CONNECTION_ID&lt;/SPAN&gt;`&lt;/SPAN&gt;
&lt;SPAN class=""&gt;OPTIONS&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;format&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"DELTA_LAKE"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;uris&lt;/SPAN&gt;&lt;SPAN class=""&gt;=[&lt;/SPAN&gt;&lt;SPAN class=""&gt;'&lt;SPAN class=""&gt;DELTA_TABLE_GCS_BASE_PATH&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;SPAN class=""&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Jul 2025 04:38:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124246#M47146</guid>
      <dc:creator>Loinguyen318</dc:creator>
      <dc:date>2025-07-07T04:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for executing Bigquery DDL in the notebook cell</title>
      <link>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124458#M47199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/55881"&gt;@Loinguyen318&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;To execute BigQuery DDL from Databricks, you must use Python code in your notebook with the google-cloud-bigquery library.&lt;/P&gt;&lt;P&gt;from google.cloud import bigquery&lt;/P&gt;&lt;P&gt;client = bigquery.Client()&lt;BR /&gt;ddl = """&lt;BR /&gt;CREATE EXTERNAL TABLE `PROJECT_ID.DATASET.DELTALAKE_TABLE_NAME`&lt;BR /&gt;WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID`&lt;BR /&gt;OPTIONS (&lt;BR /&gt;&amp;nbsp; format ="DELTA_LAKE",&lt;BR /&gt;&amp;nbsp; uris=['DELTA_TABLE_GCS_BASE_PATH']&lt;BR /&gt;);&lt;BR /&gt;"""&lt;BR /&gt;job = client.query(ddl)&lt;BR /&gt;job.result()&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 13:40:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124458#M47199</guid>
      <dc:creator>SP_6721</dc:creator>
      <dc:date>2025-07-08T13:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for executing Bigquery DDL in the notebook cell</title>
      <link>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124586#M47226</link>
      <description>&lt;P&gt;&lt;STRONG&gt;You can use the google.cloud.bigquery client within a Databricks notebook by installing the google-cloud-bigquery library and using Python to run the DDL&lt;A href="https://thedooflix.info/" target="_self"&gt;.&lt;/A&gt; Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; google.cloud &lt;SPAN class=""&gt;import&lt;/SPAN&gt; bigquery client = bigquery.Client() query = \&lt;SPAN class=""&gt;"\"\"CREATE EXTERNAL TABLE `PROJECT_ID.DATASET.DELTALAKE_TABLE_NAME` WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID` OPTIONS ( format ="&lt;/SPAN&gt;DELTA_LAKE&lt;SPAN class=""&gt;", uris=['DELTA_TABLE_GCS_BASE_PATH']);\"\"\" client.query(query).result()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Make sure your service account is properly configured with access.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 09:24:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/solution-for-executing-bigquery-ddl-in-the-notebook-cell/m-p/124586#M47226</guid>
      <dc:creator>SmithPoll</dc:creator>
      <dc:date>2025-07-09T09:24:17Z</dc:date>
    </item>
  </channel>
</rss>

