[flink-1.9] how to read local json file through Flink SQL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[flink-1.9] how to read local json file through Flink SQL

Anyang Hu
Hi guys,

In flink1.9, is there a way to read local json file in Flink SQL like the reading of csv file?

Now we can read local csv file like the following, replacing of  'csv' to 'json' can not work:
create table source (
first varchar,
id int
) with (
'connector.type' = 'filesystem',
'connector.path' = '/path/to/csv',
'format.type' = 'csv'
)

Best regards,
Anyang

Reply | Threaded
Open this post in threaded view
|

Re: [flink-1.9] how to read local json file through Flink SQL

Wesley Peng-2
On 2019/9/8 5:40 下午, Anyang Hu wrote:
> In flink1.9, is there a way to read local json file in Flink SQL like
> the reading of csv file?

hi,

might this thread help you?
http://mail-archives.apache.org/mod_mbox/flink-dev/201604.mbox/%3cCAK+0a_o5=c1_p3SYLrhTznqbhPLExpb7JG_oQ-sPtRE2neoO2g@...%3e

regards.
Reply | Threaded
Open this post in threaded view
|

Re: [flink-1.9] how to read local json file through Flink SQL

Anyang Hu
Hi Wesley,

This is not the way I want, I want to read local json data in Flink SQL by defining DDL.

Best regards,
Anyang

Wesley Peng <[hidden email]> 于2019年9月8日周日 下午6:14写道:
On 2019/9/8 5:40 下午, Anyang Hu wrote:
> In flink1.9, is there a way to read local json file in Flink SQL like
> the reading of csv file?

hi,

might this thread help you?
http://mail-archives.apache.org/mod_mbox/flink-dev/201604.mbox/%3cCAK+0a_o5=c1_p3SYLrhTznqbhPLExpb7JG_oQ-sPtRE2neoO2g@...%3e

regards.