Imported Failed: Cannot convert SQL type 2005==> during importing CLOB data from Oracle database

拟墨画扇 提交于 2019-12-07 06:05:28

Finally it worked for me with an additional clause -D oraoop.disabled=true in sqoop import option.

The below worked

<action name="sqp_imp_tldb_table1">
        <sqoop xmlns="uri:oozie:sqoop-action:0.2">
                        <job-tracker>${jobTracker}</job-tracker>
                        <name-node>${nameNode}</name-node>
                        <arg>import</arg>
                        <arg>-Dmapreduce.output.fileoutputformat.compress=false</arg>
                        <arg>-Doraoop.disabled=true</arg>
                        <arg>--connect</arg>
                        <arg>${connect_string}</arg>
                        <arg>--username</arg>
                        <arg>${username}</arg>
                        <arg>--password</arg>
                        <arg>${password}</arg>
                        <arg>--num-mappers</arg>
                        <arg>8</arg>
                        <arg>--as-textfile</arg>
                        <arg>--append</arg>
                        <arg>--fields-terminated-by</arg>
                        <arg>\t</arg>
                        <arg>--split-by</arg>
                        <arg>created_dt</arg>
                        <arg>--target-dir</arg>
                        <arg>${sqp_table1_dir}</arg>
                        <arg>--map-column-hive</arg>
                        <arg>ID=bigint,XML1=string,XML2=string,APP_PAYLOAD=string,created_dt=date,created_day=bigint</arg>
                        <arg>--query</arg>
                        <arg>"select * from schema1.table1 where $CONDITIONS AND trunc(created_dt) BETWEEN  to_date('${load_start_date}','yyyy-mm-dd') AND to_date('${load_end_date}','yyyy-mm-dd')"</arg>
        </sqoop>
                <ok to="dly_load_wf_complete"/>
                <error to="fail"/>
        </action>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!