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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16622386#comment-16622386 ] 

Ankit Singhal commented on PHOENIX-4908:
----------------------------------------

can you please also add this as an option to save dataframe:-
{code}
df.write.format("org.apache.phoenix.spark").mode(SaveMode.Overwrite).option("table", "OUTPUT_TABLE").option("zkUrl", "c221-node4.sandy.com:2181").save()
{code}

> [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
>            Priority: Major
>         Attachments: PHOENIX-4908.001.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)