Search code examples
curlsqoop

Sqoop execution in HDInsight with curl is not working


The select query we are giving in the parameter '–query' is failing .

Command curl -u : -d user.name= -d command="import --connect jdbc:sqlserver://:1433;database= --username --password --query \\"select\*\\from\\MEDICAL_DEP_EMPS\\" --append --target-dir adl://.azuredatalakestore.net//sheriff/testnewrdbmstoadld --temporary-rootdir adl://.azuredatalakestore.net//sheriff/testnewrdbmstoadld/temp --as-textfile --enclosed-by ' --escaped-by / --null-string \\N --null-non-string \\N --fields-terminated-by , --optionally-enclosed-by / -m 1 " -d statusdir="adl://.azuredatalakestore.net/tmp/dataingestion/3802/statusdirec1" https://qa-spark-cluster.azurehdinsight.net/templeton/v1/sqoop

Logs : 19/12/12 15:11:36 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.5.3009-43 19/12/12 15:11:36 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 19/12/12 15:11:36 INFO manager.SqlManager: Using default fetchSize of 1000 19/12/12 15:11:36 INFO tool.CodeGenTool: Beginning code generation 19/12/12 15:11:36 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Query [\"select\*\from\MEDICAL_DEP_EMPS\"] must contain '$CONDITIONS' in WHERE clause.


Solution

  • This is issue with HDInsight and Azure PG confirmed .