Azure SQL DW - column name is case sensitive with hash distribution

Published 03-13-2019 06:15 PM 272 Views
Microsoft
First published on MSDN on Sep 13, 2016
Symptoms:

When using PolyBase bulk operation to load data into Azure SQL DW (Data Warehouse)  and using the HASH distribution

you may receive this error message:
[OLE DB Destination [471]]: The source and target columns must be in the same order in the INSERT BULK statement

An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The source and target columns must be in the same order in the INSERT BULK statement.".



Resolution:

make sure you use the same case for column names for the HASH function because this implementation is case sensitive

e.g [ColumnName] cannot be [columnname]
%3CLINGO-SUB%20id%3D%22lingo-sub-368810%22%20slang%3D%22en-US%22%3EAzure%20SQL%20DW%20-%20column%20name%20is%20case%20sensitive%20with%20hash%20distribution%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-368810%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Sep%2013%2C%202016%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Symptoms%3A%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20When%20using%20PolyBase%20bulk%20operation%20to%20load%20data%20into%20Azure%20SQL%20DW%20(Data%20Warehouse)%20%26nbsp%3Band%20using%20the%20HASH%20distribution%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20you%20may%20receive%20this%20error%20message%3A%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%5BOLE%20DB%20Destination%20%5B471%5D%5D%3A%20The%20source%20and%20target%20columns%20must%20be%20in%20the%20same%20order%20in%20the%20INSERT%20BULK%20statement%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20An%20OLE%20DB%20record%20is%20available.%26nbsp%3B%20Source%3A%20%22Microsoft%20SQL%20Server%20Native%20Client%2011.0%22%26nbsp%3B%20Hresult%3A%200x80004005%26nbsp%3B%20Description%3A%20%22The%20source%20and%20target%20columns%20must%20be%20in%20the%20same%20order%20in%20the%20INSERT%20BULK%20statement.%22.%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3EResolution%3A%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20make%20sure%20you%20use%20the%20same%20case%20for%20column%20names%20for%20the%20HASH%20function%20because%20this%20implementation%20is%20case%20sensitive%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20e.g%20%5BColumnName%5D%20cannot%20be%20%5Bcolumnname%5D%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-368810%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Sep%2013%2C%202016%20Symptoms%3A%26nbsp%3BWhen%20using%20PolyBase%20bulk%20operation%20to%20load%20data%20into%20Azure%20SQL%20DW%20(Data%20Warehouse)%20%26nbsp%3Band%20using%20the%20HASH%20distributionyou%20may%20receive%20this%20error%20message%3A%5BOLE%20DB%20Destination%20%5B471%5D%5D%3A%20The%20source%20and%20target%20columns%20must%20be%20in%20the%20same%20order%20in%20the%20INSERT%20BULK%20statementAn%20OLE%20DB%20record%20is%20available.%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Mar 13 2019 06:15 PM
Updated by: