You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Jun Zhang <zh...@gmail.com> on 2020/07/29 01:20:57 UTC
[DISCUSS] add a '--filename' parameter for sql-client
I want to execute some flink sql batch jobs regularly, such as 'insert into
select .....', but I can't find a suitable method so far, so reference
hive, I changed the source code and add a '--filename' parameter so
that we can execute a sql file.
like this:
/home/flink/bin/sql-client.sh embedded -f flink.sql
what about any ideas or plans for this feature community?
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
Yes, The pr still needs to be improved.
In most cases, there are more than one statement in the sql file,
so -f option should support multiple statements.
however, a related PR [1] has not completed yet.
[1] https://github.com/apache/flink/pull/8738
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午10:17写道:
> hi,godfrey:
> Thanks for your reply
>
> 1. I have seen the -u parameter, but my sql file may not only include
> 'insert into select ....', but also SET, DDL, etc.
>
> 2. I may not have noticed this issue. I took a look at this issue. I think
> this issue may have some problems. For example, he finally called the
> CliClient.callCommand method.
> But I think that many options in callCommand are not completely suitable
> for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
> a window to display the results, obviously this is not suitable for
> executing sql files
>
> godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
>
>> hi Jun,
>>
>> Currently, sql client has supported -u option, just like:
>> ./bin/sql-client.sh embedded -u "insert_statement".
>>
>> There is already a JIRA [1] that wants to support -f option
>>
>> [1] https://issues.apache.org/jira/browse/FLINK-12828
>>
>> Best,
>> Godfrey
>>
>> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>>
>>> I want to execute some flink sql batch jobs regularly, such as 'insert
>>> into
>>> select .....', but I can't find a suitable method so far, so reference
>>> hive, I changed the source code and add a '--filename' parameter so
>>> that we can execute a sql file.
>>>
>>> like this:
>>>
>>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>>
>>> what about any ideas or plans for this feature community?
>>>
>>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
Yes, The pr still needs to be improved.
In most cases, there are more than one statement in the sql file,
so -f option should support multiple statements.
however, a related PR [1] has not completed yet.
[1] https://github.com/apache/flink/pull/8738
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午10:17写道:
> hi,godfrey:
> Thanks for your reply
>
> 1. I have seen the -u parameter, but my sql file may not only include
> 'insert into select ....', but also SET, DDL, etc.
>
> 2. I may not have noticed this issue. I took a look at this issue. I think
> this issue may have some problems. For example, he finally called the
> CliClient.callCommand method.
> But I think that many options in callCommand are not completely suitable
> for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
> a window to display the results, obviously this is not suitable for
> executing sql files
>
> godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
>
>> hi Jun,
>>
>> Currently, sql client has supported -u option, just like:
>> ./bin/sql-client.sh embedded -u "insert_statement".
>>
>> There is already a JIRA [1] that wants to support -f option
>>
>> [1] https://issues.apache.org/jira/browse/FLINK-12828
>>
>> Best,
>> Godfrey
>>
>> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>>
>>> I want to execute some flink sql batch jobs regularly, such as 'insert
>>> into
>>> select .....', but I can't find a suitable method so far, so reference
>>> hive, I changed the source code and add a '--filename' parameter so
>>> that we can execute a sql file.
>>>
>>> like this:
>>>
>>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>>
>>> what about any ideas or plans for this feature community?
>>>
>>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
Yes, The pr still needs to be improved.
In most cases, there are more than one statement in the sql file,
so -f option should support multiple statements.
however, a related PR [1] has not completed yet.
[1] https://github.com/apache/flink/pull/8738
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午10:17写道:
> hi,godfrey:
> Thanks for your reply
>
> 1. I have seen the -u parameter, but my sql file may not only include
> 'insert into select ....', but also SET, DDL, etc.
>
> 2. I may not have noticed this issue. I took a look at this issue. I think
> this issue may have some problems. For example, he finally called the
> CliClient.callCommand method.
> But I think that many options in callCommand are not completely suitable
> for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
> a window to display the results, obviously this is not suitable for
> executing sql files
>
> godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
>
>> hi Jun,
>>
>> Currently, sql client has supported -u option, just like:
>> ./bin/sql-client.sh embedded -u "insert_statement".
>>
>> There is already a JIRA [1] that wants to support -f option
>>
>> [1] https://issues.apache.org/jira/browse/FLINK-12828
>>
>> Best,
>> Godfrey
>>
>> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>>
>>> I want to execute some flink sql batch jobs regularly, such as 'insert
>>> into
>>> select .....', but I can't find a suitable method so far, so reference
>>> hive, I changed the source code and add a '--filename' parameter so
>>> that we can execute a sql file.
>>>
>>> like this:
>>>
>>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>>
>>> what about any ideas or plans for this feature community?
>>>
>>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by Jun Zhang <zh...@gmail.com>.
hi,godfrey:
Thanks for your reply
1. I have seen the -u parameter, but my sql file may not only include
'insert into select ....', but also SET, DDL, etc.
2. I may not have noticed this issue. I took a look at this issue. I think
this issue may have some problems. For example, he finally called the
CliClient.callCommand method.
But I think that many options in callCommand are not completely suitable
for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
a window to display the results, obviously this is not suitable for
executing sql files
godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
> hi Jun,
>
> Currently, sql client has supported -u option, just like:
> ./bin/sql-client.sh embedded -u "insert_statement".
>
> There is already a JIRA [1] that wants to support -f option
>
> [1] https://issues.apache.org/jira/browse/FLINK-12828
>
> Best,
> Godfrey
>
> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>
>> I want to execute some flink sql batch jobs regularly, such as 'insert
>> into
>> select .....', but I can't find a suitable method so far, so reference
>> hive, I changed the source code and add a '--filename' parameter so
>> that we can execute a sql file.
>>
>> like this:
>>
>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>
>> what about any ideas or plans for this feature community?
>>
>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by Jun Zhang <zh...@gmail.com>.
hi,godfrey:
Thanks for your reply
1. I have seen the -u parameter, but my sql file may not only include
'insert into select ....', but also SET, DDL, etc.
2. I may not have noticed this issue. I took a look at this issue. I think
this issue may have some problems. For example, he finally called the
CliClient.callCommand method.
But I think that many options in callCommand are not completely suitable
for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
a window to display the results, obviously this is not suitable for
executing sql files
godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
> hi Jun,
>
> Currently, sql client has supported -u option, just like:
> ./bin/sql-client.sh embedded -u "insert_statement".
>
> There is already a JIRA [1] that wants to support -f option
>
> [1] https://issues.apache.org/jira/browse/FLINK-12828
>
> Best,
> Godfrey
>
> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>
>> I want to execute some flink sql batch jobs regularly, such as 'insert
>> into
>> select .....', but I can't find a suitable method so far, so reference
>> hive, I changed the source code and add a '--filename' parameter so
>> that we can execute a sql file.
>>
>> like this:
>>
>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>
>> what about any ideas or plans for this feature community?
>>
>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by Jun Zhang <zh...@gmail.com>.
hi,godfrey:
Thanks for your reply
1. I have seen the -u parameter, but my sql file may not only include
'insert into select ....', but also SET, DDL, etc.
2. I may not have noticed this issue. I took a look at this issue. I think
this issue may have some problems. For example, he finally called the
CliClient.callCommand method.
But I think that many options in callCommand are not completely suitable
for sql files, such as HELP, CLEAR, SELECT, etc. The select operation opens
a window to display the results, obviously this is not suitable for
executing sql files
godfrey he <go...@gmail.com> 于2020年7月29日周三 上午9:56写道:
> hi Jun,
>
> Currently, sql client has supported -u option, just like:
> ./bin/sql-client.sh embedded -u "insert_statement".
>
> There is already a JIRA [1] that wants to support -f option
>
> [1] https://issues.apache.org/jira/browse/FLINK-12828
>
> Best,
> Godfrey
>
> Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
>
>> I want to execute some flink sql batch jobs regularly, such as 'insert
>> into
>> select .....', but I can't find a suitable method so far, so reference
>> hive, I changed the source code and add a '--filename' parameter so
>> that we can execute a sql file.
>>
>> like this:
>>
>> /home/flink/bin/sql-client.sh embedded -f flink.sql
>>
>> what about any ideas or plans for this feature community?
>>
>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
hi Jun,
Currently, sql client has supported -u option, just like:
./bin/sql-client.sh embedded -u "insert_statement".
There is already a JIRA [1] that wants to support -f option
[1] https://issues.apache.org/jira/browse/FLINK-12828
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
> I want to execute some flink sql batch jobs regularly, such as 'insert into
> select .....', but I can't find a suitable method so far, so reference
> hive, I changed the source code and add a '--filename' parameter so
> that we can execute a sql file.
>
> like this:
>
> /home/flink/bin/sql-client.sh embedded -f flink.sql
>
> what about any ideas or plans for this feature community?
>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
hi Jun,
Currently, sql client has supported -u option, just like:
./bin/sql-client.sh embedded -u "insert_statement".
There is already a JIRA [1] that wants to support -f option
[1] https://issues.apache.org/jira/browse/FLINK-12828
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
> I want to execute some flink sql batch jobs regularly, such as 'insert into
> select .....', but I can't find a suitable method so far, so reference
> hive, I changed the source code and add a '--filename' parameter so
> that we can execute a sql file.
>
> like this:
>
> /home/flink/bin/sql-client.sh embedded -f flink.sql
>
> what about any ideas or plans for this feature community?
>
Re: [DISCUSS] add a '--filename' parameter for sql-client
Posted by godfrey he <go...@gmail.com>.
hi Jun,
Currently, sql client has supported -u option, just like:
./bin/sql-client.sh embedded -u "insert_statement".
There is already a JIRA [1] that wants to support -f option
[1] https://issues.apache.org/jira/browse/FLINK-12828
Best,
Godfrey
Jun Zhang <zh...@gmail.com> 于2020年7月29日周三 上午9:22写道:
> I want to execute some flink sql batch jobs regularly, such as 'insert into
> select .....', but I can't find a suitable method so far, so reference
> hive, I changed the source code and add a '--filename' parameter so
> that we can execute a sql file.
>
> like this:
>
> /home/flink/bin/sql-client.sh embedded -f flink.sql
>
> what about any ideas or plans for this feature community?
>