[ 
https://issues.apache.org/jira/browse/FLINK-9813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550695#comment-16550695
 ] 

Timo Walther commented on FLINK-9813:
-------------------------------------

Hi François,

the last and the upcoming Flink version 1.6 have changed how we deal with 
connectors, formats, and schema. Flink 1.6 will be the first release where 
those APIs can be considered as "stable". I totally understand your goal of 
having an Avro schema as the common schema definition. However, I think we 
should not mix Avro and CSV. 

If CSV would understand an Avro format, it would pull in Jackson dependencies 
and/or Avro dependencies. Avoiding dependency conflicts was one of the main 
goals of the connector/format separation. The nice thing is that your use case 
is already possible. FLINK-9444 introduced 
{{AvroSchemaConverter#convertToTypeInfo()}} and you can pass the result to Csv: 
{{Csv.schema(TableSchema.fromTypeInfo(...))}}. 

> Build xTableSource from Avro schemas
> ------------------------------------
>
>                 Key: FLINK-9813
>                 URL: https://issues.apache.org/jira/browse/FLINK-9813
>             Project: Flink
>          Issue Type: Wish
>          Components: Table API & SQL
>    Affects Versions: 1.5.0
>            Reporter: François Lacombe
>            Priority: Trivial
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> As Avro provide efficient data schemas formalism, it may be great to be able 
> to build Flink Tables Sources with such files.
> More info about Avro schemas 
> :[https://avro.apache.org/docs/1.8.1/spec.html#schemas]
> For instance, with CsvTableSource :
> Parser schemaParser = new Schema.Parser();
> Schema tableSchema = schemaParser.parse("avro.json");
> Builder bld = CsvTableSource.builder().schema(tableSchema);
>  
> This would give me a fully available CsvTableSource with columns defined in 
> avro.json
> It may be possible to do so for every TableSources since avro format is 
> really common and versatile.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to