[
https://issues.apache.org/jira/browse/PHOENIX-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708469#comment-14708469
]
ASF GitHub Bot commented on PHOENIX-2196:
-----------------------------------------
Github user randerzander commented on the pull request:
https://github.com/apache/phoenix/pull/114#issuecomment-133893731
As an example, reading a CSV file where headers aren't capitalized, the
below is necessary before calling df.save:
var df =
sqlContext.read.format("com.databricks.spark.csv").option("header",
"true").option("DROPMALFORMED", "true").load(input)
val columns = df.columns.map(x => x.toUpperCase)
df = df.toDF(columns:_*)
It would be nice for end users if the .save implementation handled this
detail
> phoenix-spark should automatically convert DataFrame field names to all caps
> ----------------------------------------------------------------------------
>
> Key: PHOENIX-2196
> URL: https://issues.apache.org/jira/browse/PHOENIX-2196
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Randy Gelhausen
> Priority: Minor
>
> phoenix-spark will fail to save a DF into a Phoenix table if the DataFrame's
> fields are not all capitalized. Since Phoenix internally capitalizes all
> column names, the DataFrame.save method should automatically capitalize DF
> field names as a convenience to the end user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)