Package org.jpmml.sparkml
Class DatasetUtil
java.lang.Object
org.jpmml.sparkml.DatasetUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>castColumn(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, String name, org.apache.spark.sql.types.DataType sparkDataType) static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>castColumns(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, org.apache.spark.sql.types.StructType schema) static org.apache.spark.sql.catalyst.plans.logical.LogicalPlancreateAnalyzedLogicalPlan(org.apache.spark.sql.SparkSession sparkSession, org.apache.spark.sql.types.StructType schema, String statement) static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>static org.apache.spark.sql.types.StructTypeloadSchema(File file) static voidstatic voidstoreSchema(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, File file) static voidstoreSchema(org.apache.spark.sql.types.StructType schema, File file) static org.dmg.pmml.DataTypetranslateAtomicType(org.apache.spark.sql.types.AtomicType atomicType) static org.dmg.pmml.DataTypetranslateDataType(org.apache.spark.sql.types.DataType sparkDataType) static org.dmg.pmml.DataTypetranslateFractionalType(org.apache.spark.sql.types.FractionalType fractionalType) static org.dmg.pmml.DataTypetranslateIntegralType(org.apache.spark.sql.types.IntegralType integralType)
-
Method Details
-
loadSchema
- Throws:
IOException
-
storeSchema
public static void storeSchema(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, File file) throws IOException - Throws:
IOException
-
storeSchema
public static void storeSchema(org.apache.spark.sql.types.StructType schema, File file) throws IOException - Throws:
IOException
-
loadCsv
public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> loadCsv(org.apache.spark.sql.SparkSession sparkSession, File file) throws IOException - Throws:
IOException
-
storeCsv
public static void storeCsv(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, File file) throws IOException - Throws:
IOException
-
castColumn
public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> castColumn(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, String name, org.apache.spark.sql.types.DataType sparkDataType) -
castColumns
public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> castColumns(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, org.apache.spark.sql.types.StructType schema) -
createAnalyzedLogicalPlan
public static org.apache.spark.sql.catalyst.plans.logical.LogicalPlan createAnalyzedLogicalPlan(org.apache.spark.sql.SparkSession sparkSession, org.apache.spark.sql.types.StructType schema, String statement) -
translateDataType
public static org.dmg.pmml.DataType translateDataType(org.apache.spark.sql.types.DataType sparkDataType) -
translateAtomicType
public static org.dmg.pmml.DataType translateAtomicType(org.apache.spark.sql.types.AtomicType atomicType) -
translateIntegralType
public static org.dmg.pmml.DataType translateIntegralType(org.apache.spark.sql.types.IntegralType integralType) -
translateFractionalType
public static org.dmg.pmml.DataType translateFractionalType(org.apache.spark.sql.types.FractionalType fractionalType)
-