Sfoglia il codice sorgente

fix: phoenix转换

许家凯 3 anni fa
parent
commit
a581aab5d0

+ 5 - 0
src/main/scala/com/winhc/bigdata/spark/implicits/PhoenixHelper.scala

@@ -40,6 +40,11 @@ object PhoenixHelper {
       import org.apache.spark.sql.functions.col
       df.select(cols.map(column => col(column).cast("string")): _*).save2PhoenixByJDBC(tableName)
     }
+
+    def save2PhoenixByJDBCPro(tableName: String): Unit = {
+      import org.apache.spark.sql.functions.col
+      df.select(df.columns.map(column => col(column).cast("string")): _*).save2PhoenixByJDBC(tableName)
+    }
   }
 
 }