<?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 DWCopyCommandOperationFailed String or binary data would be truncated while reading column of type in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4100751#M4988</link>
    <description>&lt;P&gt;I got this in a Fabric pipeline going from an Azure Managed Instance SQL Server to a Fabric Warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem turned out to be the default collation of the SQL Server of&amp;nbsp;&lt;SPAN&gt;SQL_Latin1_General_CP1_CI_AS being converted to the Fabric Warehouse (at this time only supported) default collation of&amp;nbsp;Latin1_General_100_BIN2_UTF8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tables#collation" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-warehouse/tables#collation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the "Auto create table" option.&lt;/P&gt;&lt;P&gt;One specific example, for me, was the en-dash (the shorter dash) character. The below was run in SSMS 19.3.&lt;/P&gt;&lt;P&gt;On collation&amp;nbsp;SQL_Latin1_General_CP1_CI_AS in SQL Server&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ASCII ('–') =&amp;nbsp;150&lt;/LI&gt;&lt;LI&gt;DATALENGTH ('–') = 1&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;On collation&amp;nbsp;Latin1_General_100_BIN2_UTF8&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ASCII ('–') =&amp;nbsp;226&lt;/LI&gt;&lt;LI&gt;DATALENGTH&amp;nbsp;('–') =&amp;nbsp;3&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The original column in SQL Server was varchar(20). So, the pipeline created a new table with the column as varchar(20).&lt;/P&gt;&lt;P&gt;On the source SQL Server, the value did take up all 20 bytes of the varchar(20).&lt;/P&gt;&lt;P&gt;So when copying the data over, changing the collation caused the pipeline to fail with the error:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;ErrorCode=DWCopyCommandOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message='DataWarehouse' Copy Command operation failed with error ''String or binary data would be truncated while reading column of type 'VARCHAR(20)'. Check ANSI_WARNINGS option. Underlying data description: file 'https://.../MSSQLImportCommand/...parquet', column '...'. Truncated value: '...'.&lt;/P&gt;&lt;P&gt;If I manually created the table on the Fabric Warehouse and made the column varchar(21) instead of varchar(20), the data would fit. Doing so, the DATALENGTH of the value in the column would now say 21 in the collation&amp;nbsp;&lt;SPAN&gt;Latin1_General_100_BIN2_UTF8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I changed the pipeline to point to a Lakehouse table, the column was auto-created as varchar (8000).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 17:53:25 GMT</pubDate>
    <dc:creator>mikeburek</dc:creator>
    <dc:date>2024-08-14T17:53:25Z</dc:date>
    <item>
      <title>DWCopyCommandOperationFailed String or binary data would be truncated while reading column of type</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4100751#M4988</link>
      <description>&lt;P&gt;I got this in a Fabric pipeline going from an Azure Managed Instance SQL Server to a Fabric Warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem turned out to be the default collation of the SQL Server of&amp;nbsp;&lt;SPAN&gt;SQL_Latin1_General_CP1_CI_AS being converted to the Fabric Warehouse (at this time only supported) default collation of&amp;nbsp;Latin1_General_100_BIN2_UTF8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tables#collation" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-warehouse/tables#collation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the "Auto create table" option.&lt;/P&gt;&lt;P&gt;One specific example, for me, was the en-dash (the shorter dash) character. The below was run in SSMS 19.3.&lt;/P&gt;&lt;P&gt;On collation&amp;nbsp;SQL_Latin1_General_CP1_CI_AS in SQL Server&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ASCII ('–') =&amp;nbsp;150&lt;/LI&gt;&lt;LI&gt;DATALENGTH ('–') = 1&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;On collation&amp;nbsp;Latin1_General_100_BIN2_UTF8&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ASCII ('–') =&amp;nbsp;226&lt;/LI&gt;&lt;LI&gt;DATALENGTH&amp;nbsp;('–') =&amp;nbsp;3&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The original column in SQL Server was varchar(20). So, the pipeline created a new table with the column as varchar(20).&lt;/P&gt;&lt;P&gt;On the source SQL Server, the value did take up all 20 bytes of the varchar(20).&lt;/P&gt;&lt;P&gt;So when copying the data over, changing the collation caused the pipeline to fail with the error:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;ErrorCode=DWCopyCommandOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message='DataWarehouse' Copy Command operation failed with error ''String or binary data would be truncated while reading column of type 'VARCHAR(20)'. Check ANSI_WARNINGS option. Underlying data description: file 'https://.../MSSQLImportCommand/...parquet', column '...'. Truncated value: '...'.&lt;/P&gt;&lt;P&gt;If I manually created the table on the Fabric Warehouse and made the column varchar(21) instead of varchar(20), the data would fit. Doing so, the DATALENGTH of the value in the column would now say 21 in the collation&amp;nbsp;&lt;SPAN&gt;Latin1_General_100_BIN2_UTF8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I changed the pipeline to point to a Lakehouse table, the column was auto-created as varchar (8000).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 17:53:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4100751#M4988</guid>
      <dc:creator>mikeburek</dc:creator>
      <dc:date>2024-08-14T17:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: DWCopyCommandOperationFailed String or binary data would be truncated while reading column of type</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4101201#M4997</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="782519" data-lia-user-login="mikeburek" class="lia-mention lia-mention-user"&gt;mikeburek&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for sharing this question!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any questions, please continue to use the forum to ask.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 01:23:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4101201#M4997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-15T01:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: DWCopyCommandOperationFailed String or binary data would be truncated while reading column of type</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4761090#M8170</link>
      <description>&lt;P&gt;Use Copy command with mapped fields. That should do the trick.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 14:56:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DWCopyCommandOperationFailed-String-or-binary-data-would-be/m-p/4761090#M8170</guid>
      <dc:creator>KleberR</dc:creator>
      <dc:date>2025-07-13T14:56:26Z</dc:date>
    </item>
  </channel>
</rss>

