You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Anyang Hu <hu...@gmail.com> on 2019/09/08 09:40:55 UTC

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

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

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

Posted by Anyang Hu <hu...@gmail.com>.
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 <we...@thepeng.eu> 于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@mail.gmail.com%3e
>
> regards.
>

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

Posted by Wesley Peng <we...@thepeng.eu>.
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@mail.gmail.com%3e

regards.