Class DefaultCortexConnectionWriter.CortexWriteParameters
- java.lang.Object
-
- com.c12e.cortex.profiles.module.connection.DefaultCortexConnectionWriter.CortexWriteParameters
-
- All Implemented Interfaces:
CortexConnectionWriter
,CortexWriter<CortexConnectionWriter>
- Enclosing class:
- DefaultCortexConnectionWriter
public class DefaultCortexConnectionWriter.CortexWriteParameters extends java.lang.Object implements CortexConnectionWriter
-
-
Field Summary
Fields Modifier and Type Field Description CortexDeltaMergeBuilder
mergeBuilder
-
Constructor Summary
Constructors Constructor Description CortexWriteParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CortexConnectionWriter
deltaMerge(CortexDeltaMergeBuilder mergeBuilder)
An instance of a builder to perform delta table merge.CortexConnectionWriter
mode(org.apache.spark.sql.SaveMode saveMode)
Spark save modeCortexConnectionWriter
option(java.lang.String key, java.lang.String value)
Overwrites value at keyCortexConnectionWriter
options(java.util.Map<java.lang.String,java.lang.String> writeOptions)
Merges new options with current optionsCortexConnectionWriter
partitionBy(java.lang.String... columnNames)
Create partitions on column name(s)CortexConnectionWriter
project(java.lang.String project)
Sets the projectCortexConnectionWriter
resourceName(java.lang.String resourceName)
Sets the resource to write tovoid
save()
Completes building and begins write processCortexConnectionWriter
setDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds)
Sets the dataset to writeCortexConnectionWriter
withConnection(com.c12e.cortex.phoenix.Connection connection)
Override connection write
-
-
-
Field Detail
-
mergeBuilder
public CortexDeltaMergeBuilder mergeBuilder
-
-
Method Detail
-
project
public CortexConnectionWriter project(java.lang.String project)
Description copied from interface:CortexWriter
Sets the project- Specified by:
project
in interfaceCortexWriter<CortexConnectionWriter>
- Returns:
- this instance
-
resourceName
public CortexConnectionWriter resourceName(java.lang.String resourceName)
Description copied from interface:CortexWriter
Sets the resource to write to- Specified by:
resourceName
in interfaceCortexWriter<CortexConnectionWriter>
- Returns:
- this instance
-
setDataset
public CortexConnectionWriter 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<CortexConnectionWriter>
- Returns:
- this instance
-
options
public CortexConnectionWriter 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<CortexConnectionWriter>
- Returns:
- this instance
-
option
public CortexConnectionWriter option(java.lang.String key, java.lang.String value)
Description copied from interface:CortexWriter
Overwrites value at key- Specified by:
option
in interfaceCortexWriter<CortexConnectionWriter>
- Returns:
- this instance
-
save
public void save()
Description copied from interface:CortexWriter
Completes building and begins write process- Specified by:
save
in interfaceCortexWriter<CortexConnectionWriter>
-
mode
public CortexConnectionWriter mode(org.apache.spark.sql.SaveMode saveMode)
Description copied from interface:CortexWriter
Spark save mode- Specified by:
mode
in interfaceCortexWriter<CortexConnectionWriter>
- Returns:
- this instance
-
partitionBy
public CortexConnectionWriter partitionBy(java.lang.String... columnNames)
Description copied from interface:CortexWriter
Create partitions on column name(s)- Specified by:
partitionBy
in interfaceCortexWriter<CortexConnectionWriter>
- Returns:
- this instance
-
withConnection
public CortexConnectionWriter withConnection(com.c12e.cortex.phoenix.Connection connection)
Description copied from interface:CortexConnectionWriter
Override connection write- Specified by:
withConnection
in interfaceCortexConnectionWriter
- Returns:
- this instance
-
deltaMerge
public CortexConnectionWriter 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<CortexConnectionWriter>
- Returns:
- this instance
-
-