You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by 大森林 <ap...@foxmail.com> on 2020/10/14 13:15:16 UTC

what's the datasets used in flink sql document?

Could anyone tell me&nbsp;
what's the datasets used in flink sql document?


For sql like:
val revenue = orders   .filter($"cCountry" === "FRANCE")   .groupBy($"cID", $"cName")   .select($"cID", $"cName", $"revenue".sum AS "revSum")
Thanks for your help

Re: what's the datasets used in flink sql document?

Posted by David Anderson <da...@alpinegizmo.com>.
For a dockerized playground that includes a dataset, many working examples,
and training slides, see [1].

[1] https://github.com/ververica/sql-training

David

On Thu, Oct 15, 2020 at 10:18 AM Piotr Nowojski <pn...@apache.org>
wrote:

> Hi,
>
> The examples in the documentation are not fully functional. They assume
> (like in this case), that you would have an already predefined table
> orders, with the required fields. As I mentioned before, there are working
> examples available and you can also read the documentation on how to
> register tables on your own (both linked in my previous messages).
>
> Best
> Piotrek
>
> śr., 14 paź 2020 o 18:12 大森林 <ap...@foxmail.com> napisał(a):
>
>> much Manks for your replies
>>
>> I mean,where the "france revenue"
>> in the following document ?
>>
>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html
>>
>> Thanks for your help~
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "Piotr Nowojski" <pn...@apache.org>;
>> *发送时间:* 2020年10月14日(星期三) 晚上10:20
>> *收件人:* "大森林"<ap...@foxmail.com>;
>> *抄送:* "user"<us...@flink.apache.org>;
>> *主题:* Re: what's the datasets used in flink sql document?
>>
>> Hi,
>>
>> Can you link what document do you have in mind? The documentation [1]? I
>> don't think so.
>>
>> There are working examples, located in the binary distribution under the
>> `examples/table/` directory. Their code is available in the repository [2].
>>
>> Best regards,
>> Piotrek
>>
>> [1]
>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#query-a-table
>> [2]
>> https://github.com/apache/flink/tree/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/basics
>>
>> śr., 14 paź 2020 o 15:55 大森林 <ap...@foxmail.com> napisał(a):
>>
>>> sorry that I did not make it clear.
>>>
>>> I mean:
>>> Is there such a dataset can be downloaded
>>> to satisfy all the examples in the document?
>>>
>>> Thanks for your help
>>>
>>> ------------------ 原始邮件 ------------------
>>> *发件人:* "Piotr Nowojski" <pn...@apache.org>;
>>> *发送时间:* 2020年10月14日(星期三) 晚上9:52
>>> *收件人:* "大森林"<ap...@foxmail.com>;
>>> *抄送:* "user"<us...@flink.apache.org>;
>>> *主题:* Re: what's the datasets used in flink sql document?
>>>
>>> Hi,
>>>
>>> It depends how you defined `orders` in your example. For example here [1]
>>>
>>> > Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)
>>>
>>> `orders` is obtained from the environment, from a table registered under
>>> the name "Orders". You would need to first register such table, or register
>>> a catalog with such table [2]
>>>
>>> Piotrek
>>>
>>> [1]
>>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
>>> [2]
>>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment
>>>
>>> śr., 14 paź 2020 o 15:15 大森林 <ap...@foxmail.com> napisał(a):
>>>
>>>> Could anyone tell me
>>>> what's the datasets used in flink sql document?
>>>>
>>>> For sql like:
>>>>
>>>> val revenue = orders
>>>>   .filter($"cCountry" === "FRANCE")
>>>>   .groupBy($"cID", $"cName")
>>>>   .select($"cID", $"cName", $"revenue".sum AS "revSum")
>>>>
>>>>
>>>> Thanks for your help
>>>>
>>>>

Re: what's the datasets used in flink sql document?

Posted by Piotr Nowojski <pn...@apache.org>.
Hi,

The examples in the documentation are not fully functional. They assume
(like in this case), that you would have an already predefined table
orders, with the required fields. As I mentioned before, there are working
examples available and you can also read the documentation on how to
register tables on your own (both linked in my previous messages).

Best
Piotrek

śr., 14 paź 2020 o 18:12 大森林 <ap...@foxmail.com> napisał(a):

> much Manks for your replies
>
> I mean,where the "france revenue"
> in the following document ?
>
> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html
>
> Thanks for your help~
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Piotr Nowojski" <pn...@apache.org>;
> *发送时间:* 2020年10月14日(星期三) 晚上10:20
> *收件人:* "大森林"<ap...@foxmail.com>;
> *抄送:* "user"<us...@flink.apache.org>;
> *主题:* Re: what's the datasets used in flink sql document?
>
> Hi,
>
> Can you link what document do you have in mind? The documentation [1]? I
> don't think so.
>
> There are working examples, located in the binary distribution under the
> `examples/table/` directory. Their code is available in the repository [2].
>
> Best regards,
> Piotrek
>
> [1]
> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#query-a-table
> [2]
> https://github.com/apache/flink/tree/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/basics
>
> śr., 14 paź 2020 o 15:55 大森林 <ap...@foxmail.com> napisał(a):
>
>> sorry that I did not make it clear.
>>
>> I mean:
>> Is there such a dataset can be downloaded
>> to satisfy all the examples in the document?
>>
>> Thanks for your help
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "Piotr Nowojski" <pn...@apache.org>;
>> *发送时间:* 2020年10月14日(星期三) 晚上9:52
>> *收件人:* "大森林"<ap...@foxmail.com>;
>> *抄送:* "user"<us...@flink.apache.org>;
>> *主题:* Re: what's the datasets used in flink sql document?
>>
>> Hi,
>>
>> It depends how you defined `orders` in your example. For example here [1]
>>
>> > Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)
>>
>> `orders` is obtained from the environment, from a table registered under
>> the name "Orders". You would need to first register such table, or register
>> a catalog with such table [2]
>>
>> Piotrek
>>
>> [1]
>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
>> [2]
>> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment
>>
>> śr., 14 paź 2020 o 15:15 大森林 <ap...@foxmail.com> napisał(a):
>>
>>> Could anyone tell me
>>> what's the datasets used in flink sql document?
>>>
>>> For sql like:
>>>
>>> val revenue = orders
>>>   .filter($"cCountry" === "FRANCE")
>>>   .groupBy($"cID", $"cName")
>>>   .select($"cID", $"cName", $"revenue".sum AS "revSum")
>>>
>>>
>>> Thanks for your help
>>>
>>>

回复: what's the datasets used in flink sql document?

Posted by 大森林 <ap...@foxmail.com>.
much Manks for your replies


I mean,where the "france revenue"
in the following document ?
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html


Thanks for your help~


------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "Piotr Nowojski"                                                                                    <pnowojski@apache.org&gt;;
发送时间:&nbsp;2020年10月14日(星期三) 晚上10:20
收件人:&nbsp;"大森林"<appleyuchi@foxmail.com&gt;;
抄送:&nbsp;"user"<user@flink.apache.org&gt;;
主题:&nbsp;Re: what's the datasets used in flink sql document?



Hi,

Can you link what document do you have in mind? The documentation [1]? I don't think so.


There are working examples,  located in the binary distribution under the `examples/table/` directory. Their code is available in the repository [2].


Best regards,
Piotrek


[1]&nbsp;https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#query-a-table
[2]&nbsp;https://github.com/apache/flink/tree/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/basics


śr., 14 paź 2020 o 15:55&nbsp;大森林 <appleyuchi@foxmail.com&gt; napisał(a):

sorry that I did not make it clear.


I mean:
Is there such a dataset can be downloaded&nbsp;
to satisfy all the examples in the document?


Thanks for your help


------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "Piotr Nowojski"                                                                                    <pnowojski@apache.org&gt;;
发送时间:&nbsp;2020年10月14日(星期三) 晚上9:52
收件人:&nbsp;"大森林"<appleyuchi@foxmail.com&gt;;
抄送:&nbsp;"user"<user@flink.apache.org&gt;;
主题:&nbsp;Re: what's the datasets used in flink sql document?



Hi,

It depends how you defined `orders` in your example. For example here [1]


&gt;&nbsp;Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)


`orders` is obtained from the environment, from a table registered under the name "Orders". You would need to first register such table, or register a catalog with such table [2]


Piotrek


[1]&nbsp;https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
[2]&nbsp;https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment


śr., 14 paź 2020 o 15:15&nbsp;大森林 <appleyuchi@foxmail.com&gt; napisał(a):

Could anyone tell me&nbsp;
what's the datasets used in flink sql document?


For sql like:
val revenue = orders   .filter($"cCountry" === "FRANCE")   .groupBy($"cID", $"cName")   .select($"cID", $"cName", $"revenue".sum AS "revSum")
Thanks for your help

Re: what's the datasets used in flink sql document?

Posted by Piotr Nowojski <pn...@apache.org>.
Hi,

Can you link what document do you have in mind? The documentation [1]? I
don't think so.

There are working examples, located in the binary distribution under the
`examples/table/` directory. Their code is available in the repository [2].

Best regards,
Piotrek

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#query-a-table
[2]
https://github.com/apache/flink/tree/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/basics

śr., 14 paź 2020 o 15:55 大森林 <ap...@foxmail.com> napisał(a):

> sorry that I did not make it clear.
>
> I mean:
> Is there such a dataset can be downloaded
> to satisfy all the examples in the document?
>
> Thanks for your help
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Piotr Nowojski" <pn...@apache.org>;
> *发送时间:* 2020年10月14日(星期三) 晚上9:52
> *收件人:* "大森林"<ap...@foxmail.com>;
> *抄送:* "user"<us...@flink.apache.org>;
> *主题:* Re: what's the datasets used in flink sql document?
>
> Hi,
>
> It depends how you defined `orders` in your example. For example here [1]
>
> > Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)
>
> `orders` is obtained from the environment, from a table registered under
> the name "Orders". You would need to first register such table, or register
> a catalog with such table [2]
>
> Piotrek
>
> [1]
> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
> [2]
> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment
>
> śr., 14 paź 2020 o 15:15 大森林 <ap...@foxmail.com> napisał(a):
>
>> Could anyone tell me
>> what's the datasets used in flink sql document?
>>
>> For sql like:
>>
>> val revenue = orders
>>   .filter($"cCountry" === "FRANCE")
>>   .groupBy($"cID", $"cName")
>>   .select($"cID", $"cName", $"revenue".sum AS "revSum")
>>
>>
>> Thanks for your help
>>
>>

回复: what's the datasets used in flink sql document?

Posted by 大森林 <ap...@foxmail.com>.
sorry that I did not make it clear.


I mean:
Is there such a dataset can be downloaded&nbsp;
to satisfy all the examples in the document?


Thanks for your help


------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "Piotr Nowojski"                                                                                    <pnowojski@apache.org&gt;;
发送时间:&nbsp;2020年10月14日(星期三) 晚上9:52
收件人:&nbsp;"大森林"<appleyuchi@foxmail.com&gt;;
抄送:&nbsp;"user"<user@flink.apache.org&gt;;
主题:&nbsp;Re: what's the datasets used in flink sql document?



Hi,

It depends how you defined `orders` in your example. For example here [1]


&gt;&nbsp;Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)


`orders` is obtained from the environment, from a table registered under the name "Orders". You would need to first register such table, or register a catalog with such table [2]


Piotrek


[1]&nbsp;https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
[2]&nbsp;https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment


śr., 14 paź 2020 o 15:15&nbsp;大森林 <appleyuchi@foxmail.com&gt; napisał(a):

Could anyone tell me&nbsp;
what's the datasets used in flink sql document?


For sql like:
val revenue = orders   .filter($"cCountry" === "FRANCE")   .groupBy($"cID", $"cName")   .select($"cID", $"cName", $"revenue".sum AS "revSum")
Thanks for your help

Re: what's the datasets used in flink sql document?

Posted by Piotr Nowojski <pn...@apache.org>.
Hi,

It depends how you defined `orders` in your example. For example here [1]

> Table orders = tEnv.from("Orders"); // schema (a, b, c, rowtime)

`orders` is obtained from the environment, from a table registered under
the name "Orders". You would need to first register such table, or register
a catalog with such table [2]

Piotrek

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/tableApi.html#overview--examples
[2]
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/common.html#create-a-tableenvironment

śr., 14 paź 2020 o 15:15 大森林 <ap...@foxmail.com> napisał(a):

> Could anyone tell me
> what's the datasets used in flink sql document?
>
> For sql like:
>
> val revenue = orders
>   .filter($"cCountry" === "FRANCE")
>   .groupBy($"cID", $"cName")
>   .select($"cID", $"cName", $"revenue".sum AS "revSum")
>
>
> Thanks for your help
>
>