[ 
https://issues.apache.org/jira/browse/AIRFLOW-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaodong DENG resolved AIRFLOW-3736.
------------------------------------
       Resolution: Resolved
    Fix Version/s: 1.10.3

> A numeric import option breaks the Sqoop hook/operator
> ------------------------------------------------------
>
>                 Key: AIRFLOW-3736
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3736
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: contrib, hooks, operators
>            Reporter: Alireza
>            Assignee: kik
>            Priority: Major
>             Fix For: 1.10.3
>
>
> Adding a numeric value to the _extra_import_options_ parameter, breaks the 
> sqoop hook.
>  
> {code:java}
> task1 = SqoopOperator(
> task_id='import_tbl',
> cmd_type='import',
> ....
> extra_import_options={'fetch-size':10000},
> dag=dag
> ){code}
>  
> The following error is thrown:
> {code:java}
> ERROR - sequence item 18: expected string or Unicode, int found
> Traceback (most recent call last):
> File "/usr/lib/python2.7/site-packages/airflow/models.py", line 1659, in 
> _run_raw_task
> result = task_copy.execute(context=context)
> File 
> "/usr/lib/python2.7/site-packages/airflow/contrib/operators/sqoop_operator.py",
>  line 218, in execute
> extra_import_options=self.extra_import_options)
> File "/usr/lib/python2.7/site-packages/airflow/contrib/hooks/sqoop_hook.py", 
> line 232, in import_table
> self.Popen(cmd)
> File "/usr/lib/python2.7/site-packages/airflow/contrib/hooks/sqoop_hook.py", 
> line 100, in Popen
> masked_cmd = ' '.join(self.cmd_mask_password(cmd))  {code}
>  
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to