Skip to content

Commit

Permalink
Add default conf parameter to Spark JDBC Hook (#8787)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Bottega committed May 9, 2020
1 parent bc19778 commit 7506c73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Expand Up @@ -48,7 +48,6 @@
jdbc_to_spark_job = SparkJDBCOperator(
cmd_type='jdbc_to_spark',
jdbc_table="foo",
spark_conf={},
spark_jars="${SPARK_HOME}/jars/postgresql-42.2.12.jar",
jdbc_driver="org.postgresql.Driver",
metastore_table="bar",
Expand All @@ -60,7 +59,6 @@
spark_to_jdbc_job = SparkJDBCOperator(
cmd_type='spark_to_jdbc',
jdbc_table="foo",
spark_conf={},
spark_jars="${SPARK_HOME}/jars/postgresql-42.2.12.jar",
jdbc_driver="org.postgresql.Driver",
metastore_table="bar",
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/apache/spark/hooks/spark_jdbc.py
Expand Up @@ -147,7 +147,7 @@ def __init__(self,
super().__init__(*args, **kwargs)
self._name = spark_app_name
self._conn_id = spark_conn_id
self._conf = spark_conf
self._conf = spark_conf or {}
self._py_files = spark_py_files
self._files = spark_files
self._jars = spark_jars
Expand Down

0 comments on commit 7506c73

Please sign in to comment.