POSTGRESQL->HDFS 导数据

//----导数据

rm -rf /data/hdfs-data/customer/

/data/sqoop-1.4.7/bin/sqoop codegen \

--connect jdbc:postgresql://10.0.252.XXX:5432/crm_hadoop \

--username postgres --password XXX \

--table customer

/data/sqoop-1.4.7/bin/sqoop import \

-fs local -jt local -libjars  /tmp/sqoop-root/compile/34bef80f10658f96961e824a39bf04a5/customer.jar \

--connect jdbc:postgresql://10.0.252.XXX:5432/crm_hadoop \

--username postgres --password XXX \

--table customer \

--target-dir /data/hdfs-data/customer --m 1

//----查看HDFS


/data/hadoop-3.3.0/bin/hdfs dfs -cat /data/hdfs-data/cust/*

你可能感兴趣的:(POSTGRESQL->HDFS 导数据)