<?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 Databricks sql not able to evaluate expression current_user in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8940#M4457</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table default.test_user(&lt;/P&gt;&lt;P&gt;ID bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1),&lt;/P&gt;&lt;P&gt;usr1 varchar(255) NOT NULL,&lt;/P&gt;&lt;P&gt;ts1 timestamp NOT NULL,&lt;/P&gt;&lt;P&gt;usr2 varchar(255) NOT NULL,&lt;/P&gt;&lt;P&gt;ts2 timestamp NOT NULL) USING Delta;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to insert data as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into table default.test_user&lt;/P&gt;&lt;P&gt;(usr1,ts1,usr2,ts2)&lt;/P&gt;&lt;P&gt;values&lt;/P&gt;&lt;P&gt;(current_user,current_timestamp,current_user,current_Timestamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting error as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cannot evaluate expression current_user() AS `current_user()` in inline table definition; line 4 pos 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2023 08:14:40 GMT</pubDate>
    <dc:creator>Himanshu_90</dc:creator>
    <dc:date>2023-02-22T08:14:40Z</dc:date>
    <item>
      <title>Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8940#M4457</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table default.test_user(&lt;/P&gt;&lt;P&gt;ID bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1),&lt;/P&gt;&lt;P&gt;usr1 varchar(255) NOT NULL,&lt;/P&gt;&lt;P&gt;ts1 timestamp NOT NULL,&lt;/P&gt;&lt;P&gt;usr2 varchar(255) NOT NULL,&lt;/P&gt;&lt;P&gt;ts2 timestamp NOT NULL) USING Delta;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to insert data as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into table default.test_user&lt;/P&gt;&lt;P&gt;(usr1,ts1,usr2,ts2)&lt;/P&gt;&lt;P&gt;values&lt;/P&gt;&lt;P&gt;(current_user,current_timestamp,current_user,current_Timestamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting error as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cannot evaluate expression current_user() AS `current_user()` in inline table definition; line 4 pos 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 08:14:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8940#M4457</guid>
      <dc:creator>Himanshu_90</dc:creator>
      <dc:date>2023-02-22T08:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8941#M4458</link>
      <description>&lt;P&gt;The current_user function in Databricks SQL is not evaluated as a valid expression, as it is not supported by the platform. Instead, you can use the current_user_name function to retrieve the current user's name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.aetna-medicare.org/" alt="https://www.aetna-medicare.org/" target="_blank"&gt;Aetna Medicare&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 09:03:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8941#M4458</guid>
      <dc:creator>Kemp48</dc:creator>
      <dc:date>2023-02-22T09:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8942#M4459</link>
      <description>&lt;P&gt;Hi @Himanshu Agrawal​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working for me, please refer below snapshot for the same-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.databricks.com/skins/images/EB9E0F421721F968DCAE3488879085FF/responsive_peak/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 10:13:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8942#M4459</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2023-02-22T10:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8943#M4460</link>
      <description>&lt;P&gt;select current_user works for me as well... but it does not work for the specific scenario which i have pasted... with the current_timestamp&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;insert into table default.test_user&lt;/P&gt;&lt;P&gt;(usr1,ts1,usr2,ts2)&lt;/P&gt;&lt;P&gt;values&lt;/P&gt;&lt;P&gt;(current_user,current_timestamp,current_user,current_Timestamp)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 11:27:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8943#M4460</guid>
      <dc:creator>Himanshu_90</dc:creator>
      <dc:date>2023-02-22T11:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8944#M4461</link>
      <description>&lt;P&gt;select current_user is working for me... it is the combination with current_timestamp which is not working. Please try this:&lt;/P&gt;&lt;P&gt;insert into table default.test_user&lt;/P&gt;&lt;P&gt;(usr1,ts1,usr2,ts2)&lt;/P&gt;&lt;P&gt;values&lt;/P&gt;&lt;P&gt;(current_user,current_timestamp,current_user,current_Timestamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 11:32:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8944#M4461</guid>
      <dc:creator>Himanshu_90</dc:creator>
      <dc:date>2023-02-22T11:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8945#M4462</link>
      <description>&lt;OL&gt;&lt;LI&gt;Syntax. Copy. current_date()&lt;/LI&gt;&lt;LI&gt;Arguments. This function takes no arguments.&lt;/LI&gt;&lt;LI&gt;Returns. A DATE. The braces are optional.&lt;/LI&gt;&lt;LI&gt;Examples. SQL Copy. &amp;gt; SELECT current_date(); 2020-04-25 &amp;gt; SELECT current_date; 2020-04-25.&lt;/LI&gt;&lt;LI&gt;Related functions. current_timestamp function&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:13:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8945#M4462</guid>
      <dc:creator>Sundot</dc:creator>
      <dc:date>2023-02-22T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8946#M4463</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture d’écran 2023-02-23 à 10.43.49"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/638i9AD16FF71152435B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2023-02-23 à 10.43.49" alt="Capture d’écran 2023-02-23 à 10.43.49" /&gt;&lt;/span&gt;I tried it in Databricks SQL It does work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 09:43:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8946#M4463</guid>
      <dc:creator>youssefmrini</dc:creator>
      <dc:date>2023-02-23T09:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8947#M4464</link>
      <description>&lt;P&gt;It appears current_user() is blocked from VALUES because it is considered non-detereministic.&lt;/P&gt;&lt;P&gt;I've taken the liberty of opening:&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/SPARK-42638" alt="https://issues.apache.org/jira/browse/SPARK-42638" target="_blank"&gt;https://issues.apache.org/jira/browse/SPARK-42638&lt;/A&gt;&lt;/P&gt;&lt;P&gt;feel free to open a support ticket to add some **ompf**.....&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 20:32:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8947#M4464</guid>
      <dc:creator>SergeRielau</dc:creator>
      <dc:date>2023-03-01T20:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks sql not able to evaluate expression current_user</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8948#M4465</link>
      <description>&lt;P&gt;Hi @Himanshu Agrawal​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everything is going great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 10:01:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-not-able-to-evaluate-expression-current-user/m-p/8948#M4465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-24T10:01:02Z</dc:date>
    </item>
  </channel>
</rss>

