You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There is a discussion about removing the INSERT/SELECT command from ksqlDB (see KLIP-17). The discussion does not have an agreement yet. However, users are still using the INSERT/SELECT in their environments, and there is not good experience when using this command in SQL scripts, especially when terminating the INSERT/SELECT queries.
When a user executes an INSERT/SELECT command, ksqlDB registers the query with the INSERT_{randomN} ID. To terminate the query, the user must know this {randomN}. ksqlDB uses an algorithm to get this number based on the command topic offset. Users might able to guess this and use it in their SQL scripts, but this is not a good user experience when working with SQL scripts and migrations.
Describe the solution you'd like
To help users terminate INSERT/SELECT queries from their SQL scripts without guessing the {randomN}, we should let them choose an appropriate query ID they want to use, and let them terminate the query with such ID.
For example:
INSERT INTO s1 WITH(ID='my-insert-1') SELECT * FROM s0;
TERMINATE 'my-insert-1';
With this approach, users could have the following benefits:
Give a meaning to the query ID, such as insert_missing_rows, insert_valid_metrics, etc.
Terminate queries without knowing the {randomN} (very useful when working with SQL scripts)
It is desired that the new ID is displayed by SHOW QUERIES too. I don't know if this new ID should replace the INSERT_{randomN} ID or just use as an alias.
The text was updated successfully, but these errors were encountered:
spena
changed the title
feat: new WITH(id = '<query-id-name>') clause to INSERT/SELECT
feat: new WITH(id = '<query-id>') clause to INSERT/SELECT
Oct 27, 2020
Is your feature request related to a problem? Please describe.
There is a discussion about removing the
INSERT/SELECT
command from ksqlDB (see KLIP-17). The discussion does not have an agreement yet. However, users are still using theINSERT/SELECT
in their environments, and there is not good experience when using this command in SQL scripts, especially when terminating theINSERT/SELECT
queries.When a user executes an
INSERT/SELECT
command, ksqlDB registers the query with theINSERT_{randomN}
ID. To terminate the query, the user must know this{randomN}
. ksqlDB uses an algorithm to get this number based on the command topic offset. Users might able to guess this and use it in their SQL scripts, but this is not a good user experience when working with SQL scripts and migrations.Describe the solution you'd like
To help users terminate
INSERT/SELECT
queries from their SQL scripts without guessing the{randomN}
, we should let them choose an appropriate query ID they want to use, and let them terminate the query with such ID.For example:
With this approach, users could have the following benefits:
insert_missing_rows
,insert_valid_metrics
, etc.{randomN}
(very useful when working with SQL scripts)It is desired that the new ID is displayed by
SHOW QUERIES
too. I don't know if this new ID should replace theINSERT_{randomN}
ID or just use as an alias.The text was updated successfully, but these errors were encountered: