gpt4 book ai didi

oracle - Sqoop Hive Import不支持字母数字(加上 '_')

转载 作者:行者123 更新时间:2023-12-02 19:13:34 27 4
gpt4 key购买 nike

我想通过使用Sqoop作为Parquet文件将数据从Oracle导入到Hive。
我一直在尝试使用sqoop使用以下命令导入数据:

sqoop import --as-parquetfile --connect jdbc:oracle:thin:@10.222.14.11:1521/eservice --username MOJETL  --password-file file:///home/$(whoami)/MOJ_Analytic/moj_analytic/conf/.djoppassword --query 'SELECT * FROM CMST_OFFENSE_RECORD_FAMILY WHERE $CONDITIONS' --fields-terminated-by ',' --escaped-by ',' --hive-overwrite --hive-import --hive-database default --hive-table tmp3_cmst_offense_record_family --hive-partition-key load_dt --hive-partition-value '20200213' --split-by cmst_offense_record_family_ref --target-dir hdfs://nameservice1:8020/landing/tmp3_cmst_offense_record_family/load_dt=20200213

我收到以下错误:
ERROR sqoop.Sqoop: Got exception running Sqoop: org.kitesdk.data.ValidationException: Dataset name default.tmp3_cmst_offense_record_family is not alphanumeric (plus '_')
org.kitesdk.data.ValidationException: Dataset name default.tmp3_cmst_offense_record_family is not alphanumeric (plus '_')

我尝试删除
sqoop import --as-parquetfile --connect jdbc:oracle:thin:@10.222.14.11:1521/eservice --username MOJETL  --password-file file:///home/$(whoami)/MOJ_Analytic/moj_analytic/conf/.djoppassword --query 'SELECT * FROM CMST_OFFENSE_RECORD_FAMILY WHERE $CONDITIONS' --fields-terminated-by ',' --escaped-by ',' --split-by cmst_offense_record_family_ref --target-dir hdfs://nameservice1:8020/landing/tmp3_cmst_offense_record_family/load_dt=20200213

我仍然遇到相同的错误。
ERROR sqoop.Sqoop: Got exception running Sqoop: org.kitesdk.data.ValidationException: Dataset name load_dt=20200213 is not alphanumeric (plus '_')
org.kitesdk.data.ValidationException: Dataset name load_dt=20200213 is not alphanumeric (plus '_')

最佳答案

请尝试重写此部分:

--hive-table default.tmp3_cmst_offense_record_family



与此:

--hive-table tmp3_cmst_offense_record_family



您已经使用 --hive-database子句指定了数据库名称

关于oracle - Sqoop Hive Import不支持字母数字(加上 '_'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60184081/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com