簡體   English   中英

Sqoop 導出成功但目標 postgres 表為空

[英]Sqoop export is successful but destination postgres table is empty

我正在嘗試將表從 hdfs 導出到 postgres 下面是我用於導出的查詢:

sqoop export --connect jdbc:postgresql:hostname:5432/postgresDB --username user --password password --input-fields-terminated-by '\001' --fields-terminated-by ',' --table customer --export-dir /hdfs/location/customer --input-null-string '\\N' --input-null-non-string '\\N' --direct --update-key customer_id 

sqoop 查詢以成功消息完成。 請看下面的截圖:

在此處輸入圖片說明

但是當我查詢表時,我沒有找到任何數據。

任何幫助表示贊賞。 提前致謝。

sqoop export --connect jdbc:postgresql:hostname:5432/postgresDB \
--username user \
--password password \
--input-fields-terminated-by '\001' \
--fields-terminated-by ',' \
--table customer \
--export-dir /hdfs/location/customer \
--input-null-string '\\N' --input-null-non-string '\\N' \
--direct \
--update-mode allowinsert 

這工作..

對我來說,這在我為我的表名添加模式名稱后起作用了。

-- -- 模式 my_schema

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM