<?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: Unable to write Data frame to Azure Synapse Table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33099#M24183</link>
    <description>&lt;P&gt;Columns that use any of the following data types cannot be included in a columnstore index:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nvarchar(max), varchar(max), and varbinary(max) &lt;/P&gt;&lt;P&gt;(Applies to SQL Server 2016 and prior versions, and nonclustered columnstore indexes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the issue is on the Azure Synapse's side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 20:12:07 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-08-30T20:12:07Z</dc:date>
    <item>
      <title>Unable to write Data frame to Azure Synapse Table</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33098#M24182</link>
      <description>&lt;P&gt;When I am trying to insert records into the azure synapse Table using JDBC Its throwing below error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;com.microsoft.sqlserver.jdbc.SQLServerException: The statement failed. Column &amp;amp;#39;COMPANY_ADDRESS_STATE&amp;amp;#39; has a data type that cannot participate in a columnstore index. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Database this table have column [COMPANY_ADDRESS_STATE] datatype as Varchar(50)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.write.format("jdbc").mode("append") \
        .option('url', sqlURL)\
        .option('dbTable', tableName)\
        .option('user', synUser)\
        .option('password',jdbcPassword).save()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can someone please guide me with the correct approach &lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 16:36:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33098#M24182</guid>
      <dc:creator>Akshith_Rajesh</dc:creator>
      <dc:date>2022-08-30T16:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to write Data frame to Azure Synapse Table</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33099#M24183</link>
      <description>&lt;P&gt;Columns that use any of the following data types cannot be included in a columnstore index:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nvarchar(max), varchar(max), and varbinary(max) &lt;/P&gt;&lt;P&gt;(Applies to SQL Server 2016 and prior versions, and nonclustered columnstore indexes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the issue is on the Azure Synapse's side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:12:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33099#M24183</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-08-30T20:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to write Data frame to Azure Synapse Table</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33100#M24184</link>
      <description>&lt;P&gt;Hi Hubert,&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Interesting part is none of my columns have ​nvarchar(max), varchar(max), and varbinary(max) as the data types&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​Can you please let me know what ever the approach which I am trying to the table is the correct one or not &lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Or do we have any other approach in writing data to the synapse database using data bricks ​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:23:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33100#M24184</guid>
      <dc:creator>Akshith_Rajesh</dc:creator>
      <dc:date>2022-08-30T20:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to write Data frame to Azure Synapse Table</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33101#M24185</link>
      <description>&lt;P&gt;Yes, indeed, it is max only. I remember having some issues with varchar, too, but I can not remember exactly now. However, I solved it by creating a new table (like COMPANY_ADDRESS_STATE_2)  in Azure SQL from databricks (omit append mode) and comparing datatypes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But here is one more thing it is Synapse, so I think that you need to specify it by adding  .format("com.databricks.spark.sqldw")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/data/data-sources/azure/synapse-analytics" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/data/data-sources/azure/synapse-analytics&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:56:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-write-data-frame-to-azure-synapse-table/m-p/33101#M24185</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-08-30T20:56:18Z</dc:date>
    </item>
  </channel>
</rss>

