You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Sandeep Nemuri (JIRA)" <ji...@apache.org> on 2018/09/20 17:42:00 UTC

[jira] [Updated] (PHOENIX-4908) [Apache Spark Plugin Doc] update save api when using spark dataframe

     [ https://issues.apache.org/jira/browse/PHOENIX-4908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandeep Nemuri updated PHOENIX-4908:
------------------------------------
    Attachment: PHOENIX-4908.002.patch

> [Apache Spark Plugin Doc] update save api when using spark dataframe
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-4908
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4908
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Sandeep Nemuri
>            Assignee: Sandeep Nemuri
>            Priority: Major
>         Attachments: PHOENIX-4908.001.patch, PHOENIX-4908.002.patch
>
>
>  
> Error, when saving the dataframe to phoenix table as mentioned in [https://phoenix.apache.org/phoenix_spark.html] (Mentioned In Saving DataFrames section)
> {code:java}
> scala> val df = sqlContext.load("org.apache.phoenix.spark", Map("table" -> "INPUT_TABLE", | "zkUrl" -> "c221-node4.com:2181")) 
> warning: there was one deprecation warning; re-run with -deprecation for details df: org.apache.spark.sql.DataFrame = [ID: bigint, COL1: string ... 1 more field] 
> scala> dfin.show() 
> +---+----------+----+ 
> | ID| COL1|COL2| 
> +---+----------+----+ 
> | 1|test_row_1| 1| 
> +---+----------+----+ 
>  
> scala> df.save("org.apache.phoenix.spark", SaveMode.Overwrite, Map("table" -> "OUTPUT_TABLE","zkUrl" -> "c221-node4.com:2181")) <console>:32: error: value save is not a member of org.apache.spark.sql.DataFrame df.save("org.apache.phoenix.spark", SaveMode.Overwrite, Map("table" -> "OUTPUT_TABLE","zkUrl" -> "c221-node4.com:2181")) ^
>  
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)