sqoop导出数据到postgresql时设置schema的问题
sqoop导出数据到pgsq时,如何设置schema
·
问题描述:
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参数必须放在导出参数的最后一行。
完美解决~
DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐


所有评论(0)