问题描述:
sqoop导出hive表到pgsql时,默认导出到public下,当需要导出到指定的schema下时,如何设置?
解决方法:
将数据导入到postgresql时应该怎么指定模式名呢,在sqoop官网可以看到下面的细节,
If you need to work with tables that are located in non-default schemas, you can specify schema names via the --schema argument. Custom schemas are supported for both import and export jobs. For example:
sqoop import … --table custom_table – --schema custom_schema
自己尝试过发现,schema参数必须放在导出参数的最后一行。
完美解决~