GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/11881
[SPARK-13953][SQL] Specifying the field name for corrupted record via
option at JSON datasource
## What changes were proposed in this pull request?
https://issues.apache.org/jira/browse/SPARK-13953
Currently, JSON data source creates a new field in `PERMISSIVE` mode for
storing malformed string.
This field can be renamed via `spark.sql.columnNameOfCorruptRecord` option
but it is a global configuration.
This PR make that option can be applied per read and can be specified via
`option()`. This will overwrites `spark.sql.columnNameOfCorruptRecord` if it is
set.
## How was this patch tested?
Unit tests were used and `./dev/run_tests` for coding style tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-13953
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11881.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 #11881
----
commit c7c8c7a562223998f62a706a0c958055bbbe18d5
Author: hyukjinkwon <[email protected]>
Date: 2016-03-22T07:27:59Z
Support for specifying the field name for corrupted record at JSON
datasource
----
---
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]