Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql Sqoop-将配置单元列数据类型更改为Postgres数据类型_Postgresql_Hadoop_Hive_Sqoop - Fatal编程技术网

Postgresql Sqoop-将配置单元列数据类型更改为Postgres数据类型

Postgresql Sqoop-将配置单元列数据类型更改为Postgres数据类型,postgresql,hadoop,hive,sqoop,Postgresql,Hadoop,Hive,Sqoop,我正在尝试将配置单元表的最后一列(在配置单元中为typeSTRING)更改为Postgres typedate,下面是命令: sqoop export --connect jdbc:postgresql://192.168.11.1:5432/test --username test --password test_password --table posgres_table --hcatalog-database hive_db --hcatalog-table hive_tabl

我正在尝试将配置单元表的最后一列(在配置单元中为type
STRING
)更改为Postgres type
date
,下面是命令:

sqoop export 
--connect jdbc:postgresql://192.168.11.1:5432/test 
--username test 
--password test_password 
--table posgres_table 
--hcatalog-database hive_db 
--hcatalog-table hive_table 
我尝试过使用,但Postgres中的列仍然为空:

-映射列配置单元批处理日期=日期


-映射列配置单元
仅适用于Sqoop导入(即从RDBMS向HDFS/hive获取数据时)

您只需将配置单元的字符串数据设置为正确的日期格式,它就可以正常工作

在内部,sqoop导出创建如下语句

插入posgres\u表…

您可以通过JDBC驱动程序或任何客户端(如pgAdminsquirrel sql等)手动创建
INSERT-INTO-posgres_表值(…)
station来验证