Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4908

[Apache Spark Plugin Doc] update save api when using spark dataframe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.15.0, 5.1.0
    • None
    • None
    • Patch

    Description

       

      Error, when saving the dataframe to phoenix table as mentioned in https://phoenix.apache.org/phoenix_spark.html (Mentioned In Saving DataFrames section)

      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")) ^
       
      

       

      Attachments

        1. PHOENIX-4908.001.patch
          1 kB
          Sandeep Nemuri
        2. PHOENIX-4908.002.patch
          2 kB
          Sandeep Nemuri

        Activity

          People

            Sandeep Nemuri Sandeep Nemuri
            Sandeep Nemuri Sandeep Nemuri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: