Package com.c12e.cortex.profiles.reader
Class DefaultCortexSparkReader
- java.lang.Object
-
- com.c12e.cortex.profiles.reader.DefaultCortexSparkReader
-
- All Implemented Interfaces:
CortexSparkReader
public class DefaultCortexSparkReader extends java.lang.Object implements CortexSparkReader
Default implementation with reader builder retrieval and mandatory options set. Implementation may be overridden with "spark.cortex.reader.impl"
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultCortexSparkReader(CortexConnectionReaderModule cortexConnectionReaderModule, CortexDataSourceReaderModule cortexDataSourceReaderModule, CortexProfileReaderModule cortexProfileReaderModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CortexConnectionReader
connection(com.c12e.cortex.phoenix.Connection connection)
Read a dataset from a Cortex ConnectionCortexConnectionReader
connection(java.lang.String project, java.lang.String connectionName)
Read a dataset from a Cortex ConnectionCortexDataSourceReader
dataSource(com.c12e.cortex.phoenix.DataSource dataSource)
Read a dataset from a Cortex DataSourceCortexDataSourceReader
dataSource(java.lang.String project, java.lang.String dataSourceName)
Read a dataset from a Cortex DataSourceCortexProfileReader
profile(com.c12e.cortex.phoenix.ProfileSchema profileSchema)
Read a dataset from a Cortex ProfileSchemaCortexProfileReader
profile(java.lang.String project, java.lang.String profileSchemaName)
Read a dataset from a Cortex ProfileSchema
-
-
-
Constructor Detail
-
DefaultCortexSparkReader
@Inject protected DefaultCortexSparkReader(CortexConnectionReaderModule cortexConnectionReaderModule, CortexDataSourceReaderModule cortexDataSourceReaderModule, CortexProfileReaderModule cortexProfileReaderModule)
-
-
Method Detail
-
connection
public CortexConnectionReader connection(java.lang.String project, java.lang.String connectionName)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex Connection- Specified by:
connection
in interfaceCortexSparkReader
- Parameters:
project
- the name of the projectconnectionName
- the name of the Connection within the project- Returns:
- The connection reader builder
- See Also:
Connection
-
connection
public CortexConnectionReader connection(com.c12e.cortex.phoenix.Connection connection)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex Connection- Specified by:
connection
in interfaceCortexSparkReader
- Parameters:
connection
- the Connection to read from- Returns:
- The connection reader builder
- See Also:
Connection
-
dataSource
public CortexDataSourceReader dataSource(java.lang.String project, java.lang.String dataSourceName)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex DataSource- Specified by:
dataSource
in interfaceCortexSparkReader
- Parameters:
project
- the name of the projectdataSourceName
- the name of the DataSource within the project- Returns:
- The data source reader builder
- See Also:
DataSource
-
dataSource
public CortexDataSourceReader dataSource(com.c12e.cortex.phoenix.DataSource dataSource)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex DataSource- Specified by:
dataSource
in interfaceCortexSparkReader
- Parameters:
dataSource
- the DataSource to read from- Returns:
- The data source reader builder
- See Also:
DataSource
-
profile
public CortexProfileReader profile(java.lang.String project, java.lang.String profileSchemaName)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex ProfileSchema- Specified by:
profile
in interfaceCortexSparkReader
- Parameters:
project
- the name of the projectprofileSchemaName
- the name of the ProfileSchema within the project- Returns:
- The profile schema reader builder
- See Also:
ProfileSchema
-
profile
public CortexProfileReader profile(com.c12e.cortex.phoenix.ProfileSchema profileSchema)
Description copied from interface:CortexSparkReader
Read a dataset from a Cortex ProfileSchema- Specified by:
profile
in interfaceCortexSparkReader
- Parameters:
profileSchema
- the ProfileSchema to reade from- Returns:
- The profile schema reader builder
- See Also:
ProfileSchema
-
-