Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/10312#discussion_r47672003
--- Diff: python/pyspark/sql/readwriter.py ---
@@ -511,13 +511,20 @@ def jdbc(self, url, table, mode=None,
properties=None):
:param properties: JDBC database connection arguments, a list of
arbitrary string tag/value. Normally at least a
"user" and "password" property should be
included.
+ :param columnMapping: optional column name mapping from DF field
names to
+ JDBC table column names.
"""
if properties is None:
properties = dict()
jprop = JavaClass("java.util.Properties",
self._sqlContext._sc._gateway._gateway_client)()
for k in properties:
jprop.setProperty(k, properties[k])
- self._jwrite.mode(mode).jdbc(url, table, jprop)
+ if columnMapping is None:
+ columnMapping = dict()
--- End diff --
Then indent looks too deep here
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]