1. Install the Sqoop connector by opening the distribution archive in a convenient location such as /usr/lib.
Opening the distribution creates a directory that contains the jar file of the compiled version of the connector.
Note path to this jar file. The directory that is created when the file is expanded varies according to which
connector you are using. Examples of typeical resulting paths include:
Cloudera Connector Powered by Teradata 1.2cX: /user/lib/sqoop-connector-teradata-1.2cX/sqoop-connector-teradata-1.2cX.jar
2. Copy the Teradata JDBC drivers(terajdbc4.jar) and (tdgssconfig.jar) to the lib directory of the Sqoop installation.
You can obtain these drivers by extracting them from the Teradata Connector JAR that you downloaded from https://www.cloudera.com/downloads/connectors/sqoop/teradata/1-2c5.html.
Without there drivers, the connector will not function correctly.
3. Comfirm that the managers.d directory exists in the Sqoop configuration directory.
Note: Depending on how Sqoop is installed, its configuration directory can be in /etc/sqoop/conf, /usr/lib/sqoop/conf,
or elsewhere if Sqoop was installed using the tarball distribution.
if the managers.d directory does not exist, create it and ensure that the directory permissions are set to 755.
4. Create a text file in the managers.d directory with a descriptive name such as cldra_td_connector.
Ensure the file permissions are set to 644
5. The cldra_td_connector file must have the connector class name followed by the complete path to the directory where the jar is located.
For example, for the Cloudera Connector powered by Teradata 1.2cX:
com.cloudera.connector.teradata.TeradataManagerFactory = /usr/lib/sqoop-connector-teradata-1.2cX/sqoop-connector-teradata-1.2cX.jar
TeradataManagerFactory acts as a single point of delegation for invoking the connector bundled with this distribution.Alternatively,
you can specify TeradataManagerFactory inside a sqoop-site.xml file, which must be inside a classpath directory.
If you are using Cloudera Connector powered by Teradata, use the following:
<configuration>
<property>
<name>sqoop.connection.factories</name>
<value>com.cloudera.connector.teradata.TeradataManagerFactory</value>
</property>
</configuration>
https://docs.cloudera.com/documentation/other/connectors/teradata/1-x/topics/cctd_topic_3.html#concept_kv1_cj2_4n
sqoop import script:
sqoop import --connect jdbc:teradata://xx.xx.xx.xx/CLIENT_CHARSET=EUC_CN,TMODE=TERA,CHARSET=ASCII,LOB_SUPPORT=off, DATABASE=xxxx --username $2 --password $3 \
--query "select $5 from $4 where $6 and \$CONDITIONS" --target-dir ${10} --verbose --num-mappers 1\
--hive-import --hive-database $7 --hive-table $8 --hive-overwrite \
--hive-drop-import-delims --null-string '\\N' --null-non-string '\\N' \
--hive-partition-key partition_name --hive-partition-value $9 \
--driver com.teradata.jdbc.TeraDriver