Class DefaultCortexDataSourceReader
- java.lang.Object
-
- com.c12e.cortex.profiles.module.datasource.DefaultCortexDataSourceReader
-
- All Implemented Interfaces:
CortexModule<CortexDataSourceReader>
,CortexDataSourceReaderModule
public class DefaultCortexDataSourceReader extends java.lang.Object implements CortexDataSourceReaderModule
Default implementation of DefaultCortexDataSourceReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DefaultCortexDataSourceReader.CortexReadParameters
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultCortexDataSourceReader(CortexContext cortexContext, com.c12e.cortex.phoenix.Catalog catalog, CortexValidator validator, PhoenixRemoteStorage phoenixRemoteStorage, CortexConnectionReaderModule cortexConnectionReaderModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CortexDataSourceReader
getBuilder()
Create module specific builderprotected com.c12e.cortex.phoenix.DataSource
getDataSource(DefaultCortexDataSourceReader.CortexReadParameters cortexReadParameters)
protected com.c12e.cortex.phoenix.Connection
getReadConnection(java.lang.String project, java.lang.String dataSourceName)
io.delta.tables.DeltaTable
read(DefaultCortexDataSourceReader.CortexReadParameters cortexReadParameters)
Read from a Cortex DataSource using the builder instanceprotected io.delta.tables.DeltaTable
readFromDataSource(DefaultCortexDataSourceReader.CortexReadParameters readParameters, com.c12e.cortex.phoenix.Connection phoenixProfileConnection)
protected void
validateDataSource(DefaultCortexDataSourceReader.CortexReadParameters readParameters)
-
-
-
Constructor Detail
-
DefaultCortexDataSourceReader
@Inject protected DefaultCortexDataSourceReader(CortexContext cortexContext, com.c12e.cortex.phoenix.Catalog catalog, CortexValidator validator, PhoenixRemoteStorage phoenixRemoteStorage, CortexConnectionReaderModule cortexConnectionReaderModule)
-
-
Method Detail
-
getDataSource
protected com.c12e.cortex.phoenix.DataSource getDataSource(DefaultCortexDataSourceReader.CortexReadParameters cortexReadParameters)
-
validateDataSource
protected void validateDataSource(DefaultCortexDataSourceReader.CortexReadParameters readParameters)
-
getReadConnection
protected com.c12e.cortex.phoenix.Connection getReadConnection(java.lang.String project, java.lang.String dataSourceName)
-
readFromDataSource
protected io.delta.tables.DeltaTable readFromDataSource(DefaultCortexDataSourceReader.CortexReadParameters readParameters, com.c12e.cortex.phoenix.Connection phoenixProfileConnection)
-
read
public io.delta.tables.DeltaTable read(DefaultCortexDataSourceReader.CortexReadParameters cortexReadParameters)
Read from a Cortex DataSource using the builder instance- Parameters:
cortexReadParameters
- builder instance
-
getBuilder
public CortexDataSourceReader getBuilder()
Description copied from interface:CortexModule
Create module specific builder- Specified by:
getBuilder
in interfaceCortexModule<CortexDataSourceReader>
- Returns:
- builder instance
-
-