Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I tried to run sqoop query script of 3 tables transfer to netezza to hive but I got error " schema doesn't exist" ?

I tried to run sqoop query script of 3 tables transfer to netezza to hive but I got error " schema doesn't exist" ?

New Contributor

my script:-

for i in MECH.L1_MECH_TXNLOG_BDDTL35.IDP_MECH_TXN_SID ACTIMIZE.L1_ACTIMIZE_US12_ACCOUNT.IDP_WAREHOUSE_ID ACTIMIZE.L1_ACTIMIZE_US12_ALERT.IDP_WAREHOUSE_ID; do column=`echo $i |cut -d. -f3`; schema=`echo $i |cut -d. -f1`; table=`echo $i |cut -d. -f2`;sqoop import --connect jdbc:netezza://HOSTNAME/DB --username username --password password --query 'select * from IDP_DEV_LEVEL1."$schema"."$table" WHERE $CONDITIONS' --hive-import --target-dir /user/hive/test --hive-table IDP_DEV_LEVEL1."$table" --split-by "$column"; done

I run this 3 sqoop query single all works fine I tested. but I put in script as above then gives me error " schema doesn't exist"

1 REPLY 1

Re: I tried to run sqoop query script of 3 tables transfer to netezza to hive but I got error " schema doesn't exist" ?

@mike pal When you put this in a script, (depending on your shell) you will need to escape $schema as \$schema. To verify if your sqoop command inside script is correct, you can echo command instead of executing it. That will help you debug any issue with command string.