sqoop incrementmantal导入错误

时间:2018-05-14 14:24:36

标签: sqoop

我想用sqoop import incremantal导入我的as400表的最新更新,这是我的sqoop命令: 我确定所有变量,to_porcess_ts它是一个字符串时间戳(yyyymmddhhmmss)

sqoop import --verbose --driver $SRC_DRIVER_CLASS --connect $SRC_URL --username $SRC_LOGIN --password $SRC_PASSWORD \
    --table $SRC_TABLE --hive-import --hive-table $SRC_TABLE_HIVE  --target-dir $DST_HDFS \
    --hive-partition-key "to_porcess_ts" --hive-partition-value $current_date --split-by $DST_SPLIT_COLUMN --num-mappers 1 \
    --boundary-query "$DST_QUERY_BOUNDARY" \
    --incremental-append --check-column "to_porcess_ts" --last-value $(hive -e "select max(unix_timestamp(to_porcess_ts, 'ddmmyyyyhhmmss')) from $SRC_TABLE_HIVE"); \
    --compress --compression-codec org.apache.hadoop.io.compress.SnappyCodec 

我收到了这个错误:

   18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
    18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --incremental-append
    18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --check-column
    18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Unrecognized argument: to_porcess_ts
    18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --last-value
    18/05/14 16:14:18 ERROR tool.BaseSqoopTool: Unrecognized argument: -46039745595

1 个答案:

答案 0 :(得分:1)

从此行末尾移除;或将其替换为)

--last-value $(hive -e "select max(unix_timestamp(to_porcess_ts, 'ddmmyyyyhhmmss')) from $SRC_TABLE_HIVE";) \