Class DefaultCortexProfileWriter.CortexWriteParameters
- java.lang.Object
-
- com.c12e.cortex.profiles.module.profile.DefaultCortexProfileWriter.CortexWriteParameters
-
- All Implemented Interfaces:
CortexWriter<CortexProfileWriter>
,CortexProfileWriter
- Enclosing class:
- DefaultCortexProfileWriter
public class DefaultCortexProfileWriter.CortexWriteParameters extends java.lang.Object implements CortexProfileWriter
-
-
Field Summary
Fields Modifier and Type Field Description CortexDeltaMergeBuilder
deltaMergeBuilder
io.delta.tables.DeltaTable
deltaTable
org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
ds
org.apache.spark.sql.SaveMode
mode
java.lang.String[]
partitionColumns
protected com.c12e.cortex.phoenix.ProfileSchema
profileSchema
java.lang.String
profileSchemaName
java.lang.String
project
SparkOptionsHandler
sparkOptionsHandler
-
Constructor Summary
Constructors Constructor Description CortexWriteParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CortexProfileWriter
deltaMerge(CortexDeltaMergeBuilder mergeBuilder)
An instance of a builder to perform delta table merge.CortexProfileWriter
deltaTable(io.delta.tables.DeltaTable deltaTable)
The delta table to writeCortexProfileWriter
mode(org.apache.spark.sql.SaveMode saveMode)
Spark save modeCortexProfileWriter
option(java.lang.String key, java.lang.String value)
Overwrites value at keyCortexProfileWriter
options(java.util.Map<java.lang.String,java.lang.String> writeOptions)
Merges new options with current optionsCortexProfileWriter
partitionBy(java.lang.String... columnNames)
Create partitions on column name(s)CortexProfileWriter
project(java.lang.String project)
Sets the projectCortexProfileWriter
resourceName(java.lang.String resourceName)
Sets the resource to write tovoid
save()
Completes building and begins write processCortexProfileWriter
setDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds)
Sets the dataset to writeCortexProfileWriter
withProfileSchema(com.c12e.cortex.phoenix.ProfileSchema profileSchema)
The ProfileSchema to write
-
-
-
Field Detail
-
project
public java.lang.String project
-
profileSchemaName
public java.lang.String profileSchemaName
-
ds
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds
-
sparkOptionsHandler
public SparkOptionsHandler sparkOptionsHandler
-
mode
public org.apache.spark.sql.SaveMode mode
-
partitionColumns
public java.lang.String[] partitionColumns
-
deltaMergeBuilder
public CortexDeltaMergeBuilder deltaMergeBuilder
-
deltaTable
public io.delta.tables.DeltaTable deltaTable
-
profileSchema
protected com.c12e.cortex.phoenix.ProfileSchema profileSchema
-
-
Method Detail
-
project
public CortexProfileWriter project(java.lang.String project)
Description copied from interface:CortexWriter
Sets the project- Specified by:
project
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
resourceName
public CortexProfileWriter resourceName(java.lang.String resourceName)
Description copied from interface:CortexWriter
Sets the resource to write to- Specified by:
resourceName
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
setDataset
public CortexProfileWriter setDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds)
Description copied from interface:CortexWriter
Sets the dataset to write- Specified by:
setDataset
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
options
public CortexProfileWriter options(java.util.Map<java.lang.String,java.lang.String> writeOptions)
Description copied from interface:CortexWriter
Merges new options with current options- Specified by:
options
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
option
public CortexProfileWriter option(java.lang.String key, java.lang.String value)
Description copied from interface:CortexWriter
Overwrites value at key- Specified by:
option
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
mode
public CortexProfileWriter mode(org.apache.spark.sql.SaveMode saveMode)
Description copied from interface:CortexWriter
Spark save mode- Specified by:
mode
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
partitionBy
public CortexProfileWriter partitionBy(java.lang.String... columnNames)
Description copied from interface:CortexWriter
Create partitions on column name(s)- Specified by:
partitionBy
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
save
public void save()
Description copied from interface:CortexWriter
Completes building and begins write process- Specified by:
save
in interfaceCortexWriter<CortexProfileWriter>
-
withProfileSchema
public CortexProfileWriter withProfileSchema(com.c12e.cortex.phoenix.ProfileSchema profileSchema)
Description copied from interface:CortexProfileWriter
The ProfileSchema to write- Specified by:
withProfileSchema
in interfaceCortexProfileWriter
- Returns:
- this instance
-
deltaMerge
public CortexProfileWriter deltaMerge(CortexDeltaMergeBuilder mergeBuilder)
Description copied from interface:CortexWriter
An instance of a builder to perform delta table merge. Only applicable ifContentType
is delta- Specified by:
deltaMerge
in interfaceCortexWriter<CortexProfileWriter>
- Returns:
- this instance
-
deltaTable
public CortexProfileWriter deltaTable(io.delta.tables.DeltaTable deltaTable)
Description copied from interface:CortexProfileWriter
The delta table to write- Specified by:
deltaTable
in interfaceCortexProfileWriter
- Returns:
- this instance
-
-