[
https://issues.apache.org/jira/browse/AIRFLOW-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791457#comment-16791457
]
ASF subversion and git services commented on AIRFLOW-3736:
----------------------------------------------------------
Commit e2b126d085eb840f61360a0b7ae9719e0ca60890 in airflow's branch
refs/heads/master from kik-kik
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=e2b126d ]
[AIRFLOW-3736] Allow int value in SqoopOperator.extra_import_options(#4906)
* now the value of a dict inside extra_export_options can be an int
* added modified unit tests test_import_cmd, test_export_cmd and test_popen to
include testing for integer values passed in extra_export_options
* added "fetch-size" containing integer value to extra_import_options to one
SqoopOperator inside test_execute
> 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
>
> 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)