Package org.apache.flink.table.sources
Class CsvTableSource
- java.lang.Object
 - 
- org.apache.flink.table.sources.CsvTableSource
 
 
- 
- All Implemented Interfaces:
 StreamTableSource<org.apache.flink.types.Row>,org.apache.flink.table.legacy.sources.LookupableTableSource<org.apache.flink.types.Row>,org.apache.flink.table.legacy.sources.ProjectableTableSource<org.apache.flink.types.Row>,org.apache.flink.table.legacy.sources.TableSource<org.apache.flink.types.Row>
@Internal @Deprecated public class CsvTableSource extends Object implements StreamTableSource<org.apache.flink.types.Row>, org.apache.flink.table.legacy.sources.LookupableTableSource<org.apache.flink.types.Row>, org.apache.flink.table.legacy.sources.ProjectableTableSource<org.apache.flink.types.Row>
Deprecated.The legacy CSV connector has been replaced byFileSource. It is kept only to support tests for the legacy connector stack.AStreamTableSourcefor simple CSV files with a (logically) unlimited number of fields. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCsvTableSource.BuilderDeprecated.A builder for creating CsvTableSource instances.static classCsvTableSource.CsvLookupFunctionDeprecated.LookupFunction to support lookup in CsvTableSource. 
- 
Constructor Summary
Constructors Constructor Description CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields.CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes, int[] selectedFields, String fieldDelim, String lineDelim, Character quoteCharacter, boolean ignoreFirstLine, String ignoreComments, boolean lenient)Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields.CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes, String fieldDelim, String lineDelim, Character quoteCharacter, boolean ignoreFirstLine, String ignoreComments, boolean lenient)Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CsvTableSource.Builderbuilder()Deprecated.Return a new builder that builds a CsvTableSource.booleanequals(Object o)Deprecated.StringexplainSource()Deprecated.org.apache.flink.table.functions.AsyncTableFunction<org.apache.flink.types.Row>getAsyncLookupFunction(String[] lookupKeys)Deprecated.org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row>getDataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment execEnv)Deprecated.Returns the data of the table as aDataStream.org.apache.flink.table.functions.TableFunction<org.apache.flink.types.Row>getLookupFunction(String[] lookupKeys)Deprecated.org.apache.flink.table.types.DataTypegetProducedDataType()Deprecated.org.apache.flink.table.legacy.api.TableSchemagetTableSchema()Deprecated.inthashCode()Deprecated.booleanisAsyncEnabled()Deprecated.booleanisBounded()Deprecated.Returns true if this is a bounded source, false if this is an unbounded source.CsvTableSourceprojectFields(int[] fields)Deprecated. 
 - 
 
- 
- 
Constructor Detail
- 
CsvTableSource
public CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields.- Parameters:
 path- The path to the CSV file.fieldNames- The names of the table fields.fieldTypes- The types of the table fields.
 
- 
CsvTableSource
public CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes, String fieldDelim, String lineDelim, Character quoteCharacter, boolean ignoreFirstLine, String ignoreComments, boolean lenient)
Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields.- Parameters:
 path- The path to the CSV file.fieldNames- The names of the table fields.fieldTypes- The types of the table fields.fieldDelim- The field delimiter, "," by default.lineDelim- The row delimiter, "\n" by default.quoteCharacter- An optional quote character for String values, null by default.ignoreFirstLine- Flag to ignore the first line, false by default.ignoreComments- An optional prefix to indicate comments, null by default.lenient- Flag to skip records with parse error instead to fail, false by default.
 
- 
CsvTableSource
public CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes, int[] selectedFields, String fieldDelim, String lineDelim, Character quoteCharacter, boolean ignoreFirstLine, String ignoreComments, boolean lenient)
Deprecated.AInputFormatTableSourceandLookupableTableSourcefor simple CSV files with a (logically) unlimited number of fields.- Parameters:
 path- The path to the CSV file.fieldNames- The names of the table fields.fieldTypes- The types of the table fields.selectedFields- The fields which will be read and returned by the table source. If None, all fields are returned.fieldDelim- The field delimiter, "," by default.lineDelim- The row delimiter, "\n" by default.quoteCharacter- An optional quote character for String values, null by default.ignoreFirstLine- Flag to ignore the first line, false by default.ignoreComments- An optional prefix to indicate comments, null by default.lenient- Flag to skip records with parse error instead to fail, false by default.
 
 - 
 
- 
Method Detail
- 
builder
public static CsvTableSource.Builder builder()
Deprecated.Return a new builder that builds a CsvTableSource. For example:CsvTableSource source = new CsvTableSource.builder() .path("/path/to/your/file.csv") .field("myfield", Types.STRING) .field("myfield2", Types.INT) .build();- Returns:
 - a new builder to build a CsvTableSource
 
 
- 
getProducedDataType
public org.apache.flink.table.types.DataType getProducedDataType()
Deprecated.- Specified by:
 getProducedDataTypein interfaceorg.apache.flink.table.legacy.sources.TableSource<org.apache.flink.types.Row>
 
- 
getTableSchema
public org.apache.flink.table.legacy.api.TableSchema getTableSchema()
Deprecated.- Specified by:
 getTableSchemain interfaceorg.apache.flink.table.legacy.sources.TableSource<org.apache.flink.types.Row>
 
- 
projectFields
public CsvTableSource projectFields(int[] fields)
Deprecated.- Specified by:
 projectFieldsin interfaceorg.apache.flink.table.legacy.sources.ProjectableTableSource<org.apache.flink.types.Row>
 
- 
isBounded
public boolean isBounded()
Deprecated.Description copied from interface:StreamTableSourceReturns true if this is a bounded source, false if this is an unbounded source. Default is unbounded for compatibility.- Specified by:
 isBoundedin interfaceStreamTableSource<org.apache.flink.types.Row>
 
- 
getDataStream
public org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> getDataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment execEnv)
Deprecated.Description copied from interface:StreamTableSourceReturns the data of the table as aDataStream.NOTE: This method is for internal use only for defining a
TableSource. Do not use it in Table API programs.- Specified by:
 getDataStreamin interfaceStreamTableSource<org.apache.flink.types.Row>
 
- 
getLookupFunction
public org.apache.flink.table.functions.TableFunction<org.apache.flink.types.Row> getLookupFunction(String[] lookupKeys)
Deprecated.- Specified by:
 getLookupFunctionin interfaceorg.apache.flink.table.legacy.sources.LookupableTableSource<org.apache.flink.types.Row>
 
- 
getAsyncLookupFunction
public org.apache.flink.table.functions.AsyncTableFunction<org.apache.flink.types.Row> getAsyncLookupFunction(String[] lookupKeys)
Deprecated.- Specified by:
 getAsyncLookupFunctionin interfaceorg.apache.flink.table.legacy.sources.LookupableTableSource<org.apache.flink.types.Row>
 
- 
isAsyncEnabled
public boolean isAsyncEnabled()
Deprecated.- Specified by:
 isAsyncEnabledin interfaceorg.apache.flink.table.legacy.sources.LookupableTableSource<org.apache.flink.types.Row>
 
- 
explainSource
public String explainSource()
Deprecated.- Specified by:
 explainSourcein interfaceorg.apache.flink.table.legacy.sources.TableSource<org.apache.flink.types.Row>
 
 - 
 
 -