Hi Vino,

Thanks for this answer.
I can't find in the docs where it's about BatchTableDescriptor
https://ci.apache.org/projects/flink/flink-docs-release-1.6/dev/table/connect.html#csv-format

It sounds like the withFormat method is applied on TableEnvironment object
on this page.

All the best

François

2018-08-28 4:37 GMT+02:00 vino yang <[email protected]>:

> Hi Francois,
>
> Yes, the withFormat API comes from an instance of BatchTableDescriptor,
> and the BatchTableDescriptor instance is returned by the connect API, so
> you should call BatchTableEnvironment#connect first.
>
> Thanks, vino.
>
> françois lacombe <[email protected]> 于2018年8月27日周一 下午10:26写道:
>
>> Hi all,
>>
>> I'm currently trying to load a CSV file content with Flink 1.6.0 table
>> API.
>> This error is raised as a try to execute the code written in docs
>> https://ci.apache.org/projects/flink/flink-docs-
>> release-1.6/dev/table/connect.html#csv-format
>>
>> ExecutionEnvironment env = ExecutionEnvironment.
>> getExecutionEnvironment();
>> BatchTableEnvironment tEnv = TableEnvironment.getTableEnvironment(env);
>> tEnv.withFormat(new Csv(...));
>>
>> > Exception in thread "main" java.lang.Error: Unresolved compilation
>> problem:
>>    The method withFormat(Csv) is undefined for the type
>> BatchTableEnvironment
>>
>> Am I wrong?
>>
>> Thanks in advance for any hint
>>
>> François
>>
>

Reply via email to