Sqoop Job Fails | Error: The user does not have CREATE VIEW access to database

0 votes
2 views
asked Aug 28, 2017 in Hadoop by admin (4,410 points)
SummarySqoop job will fail with the following error: 
ERROR tool.ImportTool: Encountered IOException running import job: com.teradata.connector.common.exception.ConnectorException: 
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.21] [Error 3524] 
[SQLState 42000] The user does not have CREATE VIEW access to database <DB_NAME>. 
split-by-partition Input Method for Teradata Connector always requires table/view create privilege

Symptoms

When trying to use split.by.partition input method import Teradata into HDFS using Cloudera Connector Powered by Teradata, regardless whether the source table is partitioned or not, a staging table or view is always created in the Teradata database during the importing process, and if no valid privilege is setup, the Sqoop job will fail with the following error:

ERROR tool.ImportTool: Encountered IOException running import job: com.teradata.connector.common.exception.ConnectorException: 
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.21] [Error 3524] 
[SQLState 42000] The user does not have CREATE VIEW access to database <DB_NAME>.
Applies To

Cloudera Connector Powered by Teradata 1.4c5
Cloudera Connector Powered by Teradata 1.5c5

Cause

The split.by.partition input method requires Table and View create privilege (as long as the source table is not partitioned) see the following image:

User-added image
However, if a source table is already partitioned, no staging table or view should be created. This was caused by a bug in the SDK that the Cloudera Connector Powered by Teradata uses, which is also called TeraData Connector for Hadoop (TDCH).  At the time of this writing, Cloudera still uses TDCH version of 1.3.4, which contains the bug.

TeraData Support has indicated that from version 1.4.2, the bug has been fixed.

Instructions

Currently there is no way to upgrade TeraData Connector for Hadoop independent of Cloudera Connector Powered by Teradata. The latest Cloudera Connector Powered by Teradata 1.6c5 uses TDCH 1.5.0, which contains the bug fix, so upgrade to Cloudera Connector Powered by Teradata 1.6c5 will fixe the issue.

Workaround:

The workaround, if an upgrade of the Teradata Connector for Hadoop is not possible, is to give the correct privileges for the user running the Sqoop job to create the table (or view inside TeraData).    For split by partition, both create table and view privileges in the Teradata database is required, per the chart above.

Please log in or register to answer this question.

...