Sqoop import报错:java.sql.SQLNonTransientConnectionException
Caused by: java.lang.RuntimeException: java.sql.SQLNonTransientConnectionException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the main URL sections
抽数脚本如下:
#执行sqoop命令
${sqoop_home}/sqoop import \
-Dorg.apache.sqoop.splitter.allow_text_splitter=true \
--connect jdbc:oracle:thin:@\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=TCP\)\(HOST=10.25.12.91\)\(PORT=1521\)\)\(CONNECT_DATA=\(SERVER=DEDICATED\)\(SERVICE_NAME=tpjtzhfk\)\)\) \
--username user \
--password 'passwd' \
--driver oracle.jdbc.driver.OracleDriver \
--fields-terminated-by '|' \
--null-string '\\N' \
--null-non-string '\\N' \
--hive-delims-replacement ' ' \
--outdir /tpdata/data/sqoopcode \
--delete-target-dir \
--fetch-size 200 \
--map-column-hive ACCOUNT_ENTRY_ID=String,DOCUMENT_NUMBER=String,COMPANY_CODE=String,COMPANY_FULL_NAME=String,AMOUNT=String,CURRENCY=String,ACCOUNT_CODE=String,ACCOUNT_NAME=String,PERIOD_NAME=String,LAST_UPDATE_DATE=String,JOURNAL_NUMBER=String \
--target-dir /user/hive/warehouse/bak.db/account_cxv/etl_date=${etldate} \
--query "select * from (select upper('tphec_expense_account_cxv') as tabname,'I' as OPER,0 as MTIME,'TPHEC' as SOURCE_SYS,to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') as ETL_TIME,${etldate} as etl_date,replace(t.ACCOUNT_ENTRY_ID,'|',' '),replace(t.DOCUMENT_NUMBER,'|',' '),replace(t.COMPANY_CODE,'|',' '),replace(t.COMPANY_FULL_NAME,'|',' '),replace(t.AMOUNT,'|',' '),replace(t.CURRENCY,'|',' '),replace(t.ACCOUNT_CODE,'|',' '),replace(t.ACCOUNT_NAME,'|',' '),replace(t.PERIOD_NAME,'|',' '),LAST_UPDATE_DATE,replace(t.JOURNAL_NUMBER,'|',' ') from TPHEC.account_cxv t ) where \$CONDITIONS" \
-m 1
原文地址:https://blog.csdn.net/weixin_45547818/article/details/144039900
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!