<?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: Notebook's Widget parameters in SQL cell =&amp;gt; howto in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19835#M13364</link>
    <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Actually, did not work for me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
select * from prabakar.`$table`_v1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;would give:&lt;/P&gt;&lt;P&gt;Error in SQL statement: AnalysisException: Table or view not found: prabakar.table_name;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems like missing the "_v1" anyway&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 12:01:13 GMT</pubDate>
    <dc:creator>yopbibo</dc:creator>
    <dc:date>2022-05-24T12:01:13Z</dc:date>
    <item>
      <title>Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19833#M13362</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;dbutils.widgets.text('table', 'product')
&amp;nbsp;
%sql
select *
from ds_data.$table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hello, the above will work.&lt;/P&gt;&lt;P&gt;But how can I do something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.widgets.text('table', 'product')
 
%sql
select *
from ds_data.$table_v3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in that example, $table is still my table name, and I want to add a suffix.&lt;/P&gt;&lt;P&gt;I could go in python&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.widgets.text('table', 'product')
tab = dbutils.widgets.get('table')
spark.sql(f'select * from ds_data.{tab}_v3')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but would love doing it in SQL.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 09:18:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19833#M13362</guid>
      <dc:creator>yopbibo</dc:creator>
      <dc:date>2022-05-24T09:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19834#M13363</link>
      <description>&lt;P&gt;hello @Philippe CRAVE​&amp;nbsp;you can use something like this and it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
select * from prabakar.`$table`_v1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1839i2C91AD92EE3A3A31/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 11:44:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19834#M13363</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-05-24T11:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19835#M13364</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Actually, did not work for me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
select * from prabakar.`$table`_v1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;would give:&lt;/P&gt;&lt;P&gt;Error in SQL statement: AnalysisException: Table or view not found: prabakar.table_name;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems like missing the "_v1" anyway&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 12:01:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19835#M13364</guid>
      <dc:creator>yopbibo</dc:creator>
      <dc:date>2022-05-24T12:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19836#M13365</link>
      <description>&lt;P&gt;Maybe I should add that I use DB9.1 on a high concurrency cluster&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 12:02:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19836#M13365</guid>
      <dc:creator>yopbibo</dc:creator>
      <dc:date>2022-05-24T12:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19837#M13366</link>
      <description>&lt;P&gt;looks like you are using the example that I share `&lt;I&gt;Table or view not found: prabakar.table_name&lt;/I&gt;;` Can you test with your sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 15:31:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19837#M13366</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-05-24T15:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19838#M13367</link>
      <description>&lt;P&gt;I tried using my sample data, translated the message to match yours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 15:34:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19838#M13367</guid>
      <dc:creator>yopbibo</dc:creator>
      <dc:date>2022-05-24T15:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19839#M13368</link>
      <description>&lt;P&gt;I checked further and found that the command that I used is not helpful. Though it takes the table name, it is pulling data from the agents table but not the agents_v1 table. The agents table has 12 rows and agent_v1 table has 20 rows. So this doesn't work. We need to programmatically call the table with the suffix. I don't think its possible with sql.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 15:36:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19839#M13368</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-05-24T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19840#M13369</link>
      <description>&lt;P&gt;ok, thanks. Sad, forces us to move to python notebooks for something that was fitting very well a sql notebook. but that's life &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 15:39:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19840#M13369</guid>
      <dc:creator>yopbibo</dc:creator>
      <dc:date>2022-05-24T15:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook's Widget parameters in SQL cell =&gt; howto</title>
      <link>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19841#M13370</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:13:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/notebook-s-widget-parameters-in-sql-cell-gt-howto/m-p/19841#M13370</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-05-24T16:13:53Z</dc:date>
    </item>
  </channel>
</rss>

