FileSource. It is kept only to
support tests for the legacy connector stack.@Internal @Deprecated public class CsvTableSource extends Object implements StreamTableSource<org.apache.flink.types.Row>, org.apache.flink.table.sources.LookupableTableSource<org.apache.flink.types.Row>, org.apache.flink.table.sources.ProjectableTableSource<org.apache.flink.types.Row>
StreamTableSource for simple CSV files with a (logically) unlimited number of fields.| 限定符和类型 | 类和说明 |
|---|---|
static class |
CsvTableSource.Builder
已过时。
A builder for creating CsvTableSource instances.
|
static class |
CsvTableSource.CsvLookupFunction
已过时。
LookupFunction to support lookup in CsvTableSource.
|
| 构造器和说明 |
|---|
CsvTableSource(String path,
String[] fieldNames,
org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
已过时。
A
InputFormatTableSource and LookupableTableSource for 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)
已过时。
A
InputFormatTableSource and LookupableTableSource for 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)
已过时。
A
InputFormatTableSource and LookupableTableSource for simple CSV files with
a (logically) unlimited number of fields. |
| 限定符和类型 | 方法和说明 |
|---|---|
static CsvTableSource.Builder |
builder()
已过时。
Return a new builder that builds a CsvTableSource.
|
boolean |
equals(Object o)
已过时。
|
String |
explainSource()
已过时。
|
org.apache.flink.table.functions.AsyncTableFunction<org.apache.flink.types.Row> |
getAsyncLookupFunction(String[] lookupKeys)
已过时。
|
org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> |
getDataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment execEnv)
已过时。
Returns the data of the table as a
DataStream. |
org.apache.flink.table.functions.TableFunction<org.apache.flink.types.Row> |
getLookupFunction(String[] lookupKeys)
已过时。
|
org.apache.flink.table.types.DataType |
getProducedDataType()
已过时。
|
org.apache.flink.table.api.TableSchema |
getTableSchema()
已过时。
|
int |
hashCode()
已过时。
|
boolean |
isAsyncEnabled()
已过时。
|
boolean |
isBounded()
已过时。
Returns true if this is a bounded source, false if this is an unbounded source.
|
CsvTableSource |
projectFields(int[] fields)
已过时。
|
public CsvTableSource(String path, String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
InputFormatTableSource and LookupableTableSource for simple CSV files with
a (logically) unlimited number of fields.path - The path to the CSV file.fieldNames - The names of the table fields.fieldTypes - The types of the table fields.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)
InputFormatTableSource and LookupableTableSource for simple CSV files with
a (logically) unlimited number of fields.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.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)
InputFormatTableSource and LookupableTableSource for simple CSV files with
a (logically) unlimited number of fields.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.public static CsvTableSource.Builder builder()
CsvTableSource source = new CsvTableSource.builder()
.path("/path/to/your/file.csv")
.field("myfield", Types.STRING)
.field("myfield2", Types.INT)
.build();
public org.apache.flink.table.types.DataType getProducedDataType()
getProducedDataType 在接口中 org.apache.flink.table.sources.TableSource<org.apache.flink.types.Row>public org.apache.flink.table.api.TableSchema getTableSchema()
getTableSchema 在接口中 org.apache.flink.table.sources.TableSource<org.apache.flink.types.Row>public CsvTableSource projectFields(int[] fields)
projectFields 在接口中 org.apache.flink.table.sources.ProjectableTableSource<org.apache.flink.types.Row>public boolean isBounded()
StreamTableSourceisBounded 在接口中 StreamTableSource<org.apache.flink.types.Row>public org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> getDataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment execEnv)
StreamTableSourceDataStream.
NOTE: This method is for internal use only for defining a TableSource. Do not use
it in Table API programs.
getDataStream 在接口中 StreamTableSource<org.apache.flink.types.Row>public org.apache.flink.table.functions.TableFunction<org.apache.flink.types.Row> getLookupFunction(String[] lookupKeys)
getLookupFunction 在接口中 org.apache.flink.table.sources.LookupableTableSource<org.apache.flink.types.Row>public org.apache.flink.table.functions.AsyncTableFunction<org.apache.flink.types.Row> getAsyncLookupFunction(String[] lookupKeys)
getAsyncLookupFunction 在接口中 org.apache.flink.table.sources.LookupableTableSource<org.apache.flink.types.Row>public boolean isAsyncEnabled()
isAsyncEnabled 在接口中 org.apache.flink.table.sources.LookupableTableSource<org.apache.flink.types.Row>public String explainSource()
explainSource 在接口中 org.apache.flink.table.sources.TableSource<org.apache.flink.types.Row>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.