【发布时间】:2021-05-06 04:21:03
【问题描述】:
如何让 ADF 复制 polybase 以简单地将一个文件从 Azure 存储复制到 Synapse 池(SQL 数据仓库)
我一直收到此错误:
Operation on target Storage to Synapse failed: ErrorCode=FailedDbOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Error happened when loading data into SQL Data Warehouse.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: HadoopSqlException: Error converting data type NVARCHAR to BIGINT.,Source=.Net SqlClient Data Provider,SqlErrorNumber=107090,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=107090,State=1,Message=HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: HadoopSqlException: Error converting data type NVARCHAR to BIGINT.,},],'
总结:HadoopSqlException: Error converting data type NVARCHAR to BIGINT.,},],
这是我的文件的样例,gzip 压缩:
6872602179|359154818|84154822|1|37.00|68629.82|0.08|0.06|A|F|1992-09-01|1992-08-18|1992-09-05|TAKE BACK RETURN|REG AIR|efully. quickly bold deposits wake alo
6872602179|315023025|90023035|2|22.00|20509.94|0.02|0.05|A|F|1992-10-01|1992-07-06|1992-10-08|DELIVER IN PERSON|FOB| furious, pen
6872602179|591976355|41976366|3|41.00|57472.16|0.07|0.00|A|F|1992-07-23|1992-08-06|1992-08-18|TAKE BACK RETURN|AIR|have to are about the final instructions.
6872602179|1346584608|46584609|4|37.00|60135.36|0.00|0.05|R|F|1992-09-06|1992-07-23|1992-10-01|TAKE BACK RETURN|FOB|ackages according to the r
6872602179|47498972|97498973|5|31.00|61026.60|0.02|0.03|R|F|1992-06-05|1992-07-21|1992-06-07|NONE|REG AIR|ests cajole slyly quickly special attai
6872602179|315209731|90209741|6|31.00|56574.38|0.06|0.05|R|F|1992-06-15|1992-07-27|1992-07-15|COLLECT COD|SHIP|y bold instructions. even p
ADF 复印设置:
来源:
下沉:
映射:
目标表架构:
CREATE table dbo.[lineitem](
[L_OrderKey] [bigint] NULL,
[L_PartKey] [bigint] NULL,
[L_SuppKey] [bigint] NULL,
[L_LineNumber] [bigint] NULL,
[L_Quantity] [bigint] NULL,
[L_dboendedPrice] [decimal](13, 2) NULL,
[L_Discount] [decimal](13, 2) NULL,
[L_Tax] [decimal](13, 2) NULL,
[L_ReturnFlag] [varchar](64) NULL,
[L_LineStatus] [varchar](64) NULL,
[L_ShipDate] [datetime] NULL,
[L_CommitDate] [datetime] NULL,
[L_ReceiptDate] [datetime] NULL,
[L_ShipInstruct] [varchar](64) NULL,
[L_ShipMode] [varchar](64) NULL,
[L_Comment] [varchar](64) NULL
) ;
【问题讨论】:
-
能否请您尝试在映射设置中设置源列类型字符串?
-
由于文件中有小数点,您可以尝试将第 5 列更改为小数点吗?如果不是这样,请尝试从映射中一次删除一个 bigint 列,直到它起作用,这样您就可以确定罪魁祸首。我的赌注在第 5 列。
-
@GregGalloway 就是这样,我已经很久没有这样做了,非常令人沮丧,因为外部表立即工作......谢谢你
标签: azure-data-factory azure-synapse polybase