Class DefaultCortexDataSourceWriter.CortexWriteParameters
- java.lang.Object
-
- com.c12e.cortex.profiles.module.datasource.DefaultCortexDataSourceWriter.CortexWriteParameters
-
- All Implemented Interfaces:
CortexWriter<CortexDataSourceWriter>
,CortexDataSourceWriter
- Enclosing class:
- DefaultCortexDataSourceWriter
public class DefaultCortexDataSourceWriter.CortexWriteParameters extends java.lang.Object implements CortexDataSourceWriter
-
-
Field Summary
Fields Modifier and Type Field Description com.c12e.cortex.phoenix.DataSource
dataSource
java.lang.String
dataSourceName
org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
ds
CortexDeltaMergeBuilder
mergeBuilder
org.apache.spark.sql.SaveMode
mode
java.lang.String[]
partitionColumns
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 CortexDataSourceWriter
deltaMerge(CortexDeltaMergeBuilder mergeBuilder)
An instance of a builder to perform delta table merge.CortexDataSourceWriter
mode(org.apache.spark.sql.SaveMode saveMode)
Spark save modeCortexDataSourceWriter
option(java.lang.String key, java.lang.String value)
Overwrites value at keyCortexDataSourceWriter
options(java.util.Map<java.lang.String,java.lang.String> writeOptions)
Merges new options with current optionsCortexDataSourceWriter
partitionBy(java.lang.String... columnNames)
Create partitions on column name(s)CortexDataSourceWriter
project(java.lang.String project)
Sets the projectCortexDataSourceWriter
resourceName(java.lang.String resourceName)
Sets the resource to write tovoid
save()
Completes building and begins write processCortexDataSourceWriter
setDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds)
Sets the dataset to writeCortexDataSourceWriter
withDataSource(com.c12e.cortex.phoenix.DataSource dataSource)
The DataSource to write to
-
-
-
Field Detail
-
project
public java.lang.String project
-
dataSourceName
public java.lang.String dataSourceName
-
ds
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds
-
dataSource
public com.c12e.cortex.phoenix.DataSource dataSource
-
sparkOptionsHandler
public SparkOptionsHandler sparkOptionsHandler
-
mode
public org.apache.spark.sql.SaveMode mode
-
partitionColumns
public java.lang.String[] partitionColumns
-
mergeBuilder
public CortexDeltaMergeBuilder mergeBuilder
-
-
Method Detail
-
project
public CortexDataSourceWriter project(java.lang.String project)
Description copied from interface:CortexWriter
Sets the project- Specified by:
project
in interfaceCortexWriter<CortexDataSourceWriter>
- Returns:
- this instance
-
resourceName
public CortexDataSourceWriter resourceName(java.lang.String resourceName)
Description copied from interface:CortexWriter
Sets the resource to write to- Specified by:
resourceName
in interfaceCortexWriter<CortexDataSourceWriter>
- Returns:
- this instance
-
setDataset
public CortexDataSourceWriter 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<CortexDataSourceWriter>
- Returns:
- this instance
-
options
public CortexDataSourceWriter 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<CortexDataSourceWriter>
- Returns:
- this instance
-
option
public CortexDataSourceWriter option(java.lang.String key, java.lang.String value)
Description copied from interface:CortexWriter
Overwrites value at key- Specified by:
option
in interfaceCortexWriter<CortexDataSourceWriter>
- Returns:
- this instance
-
mode
public CortexDataSourceWriter mode(org.apache.spark.sql.SaveMode saveMode)
Description copied from interface:CortexWriter
Spark save mode- Specified by:
mode
in interfaceCortexWriter<CortexDataSourceWriter>
- Returns:
- this instance
-
partitionBy
public CortexDataSourceWriter partitionBy(java.lang.String... columnNames)
Description copied from interface:CortexWriter
Create partitions on column name(s)- Specified by:
partitionBy
in interfaceCortexWriter<CortexDataSourceWriter>
- Returns:
- this instance
-
save
public void save()
Description copied from interface:CortexWriter
Completes building and begins write process- Specified by:
save
in interfaceCortexWriter<CortexDataSourceWriter>
-
withDataSource
public CortexDataSourceWriter withDataSource(com.c12e.cortex.phoenix.DataSource dataSource)
Description copied from interface:CortexDataSourceWriter
The DataSource to write to- Specified by:
withDataSource
in interfaceCortexDataSourceWriter
- Returns:
- this instance
-
deltaMerge
public CortexDataSourceWriter 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<CortexDataSourceWriter>
- Returns:
- this instance
-
-