Running sqoop using python subprocess can't recognize the arguments -


when run sqoop export terminal runs properly.but executing python scripts returns error:

*error tool.basesqooptool: unrecognized argument: --connect error tool.basesqooptool: unrecognized argument: --table error tool.basesqooptool: unrecognized argument: --export_dir* 

following code snippet:

call(["/usr/local/sqoop/bin/sqoop","export","--connect jdbc:mysql://localhost/temp","--table table1" ,"--export-dir /user/data/input" ,"--username root"]) 

assuming imported subprocess module

the single arguments in argument list shouldn't contain whitespaces. line should this:

call(["/usr/local/sqoop/bin/sqoop","export","--connect", "jdbc:mysql://localhost/temp","--table", "table1" ,"--export-dir", "/user/data/input" ,"--username", "root"]) 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -