GitHub user sureshthalamati opened a pull request:
https://github.com/apache/spark/pull/9352
[SPARK-10849][SQL] Adding field metadata property to override default jdbc
data source type mapping.
This patch allows users to override default type mapping of data frame
field to database column type when writing data frame to jdbc data sources.
In some cases user may want to use specific database data type mapping for
fields based on the database configuration (page size , type of table spaces
..etc) instead of the defaults. For example large varchar size for all the
columns may not fit in row size limits , user may want to use mix of varchar ,
and clob types. Max precision supported in some database systems might be less
than the spark decimal precision, in such cases user can use this option to
adjust the decimal type precision , and scale to match the target database.
Added a new field meta data property name db.column.type . I am not
sure what is the convention for these type of property names. Please let me
know it it needs to be changed.
@rxin @marmbrus
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sureshthalamati/spark
custom_columntype-spark-10849
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9352.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9352
----
commit 4048c2dc5626e926a04774bffecaf7c6a6ac4cf7
Author: sureshthalamati <[email protected]>
Date: 2015-10-29T08:16:32Z
Adding field metadata property to override jdbc data source column type
mapping.
----
---
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]