sqoop export SQLSERVER 存储过程参数限制

sqoop 从HDFS往SQLSERVER同步数据时,如果表字段过多,可能会报如下异常:

com.microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.

这个是SQLSERVER的限制,存储过程参数上限2100

然后sqoop默认的处理逻辑是每次100行

Sqoop uses the multi-row INSERT syntax to insert up to 100 records per statement. Every 100 statements, the current transaction within a writer task is committed, causing a commit every 10,000 rows.

于是当表字段超过21个时,默认的export job就会失败,这时需要修改sqoop的参数减少每次导出的记录数

sqoop-export -D sqoop.export.records.per.statement=75 --connect 

你可能感兴趣的:(sqoop)