-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix routine load statements documentation docs #1915
Open
liujiwen-up
wants to merge
1
commit into
apache:master
Choose a base branch
from
liujiwen-up:routine-load
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,108
−3,657
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -27,98 +27,96 @@ under the License. | |||||
|
||||||
## Description | ||||||
|
||||||
This syntax is used to modify an already created routine import job. | ||||||
This syntax is used to modify an existing routine load job. Only jobs in PAUSED state can be modified. | ||||||
|
||||||
Only jobs in the PAUSED state can be modified. | ||||||
|
||||||
grammar: | ||||||
## Syntax | ||||||
|
||||||
```sql | ||||||
ALTER ROUTINE LOAD FOR [db.]job_name | ||||||
[job_properties] | ||||||
FROM data_source | ||||||
[data_source_properties] | ||||||
ALTER ROUTINE LOAD FOR [<db.>]<job_name> | ||||||
[<job_properties>] | ||||||
FROM <data_source> | ||||||
[<data_source_properties>] | ||||||
``` | ||||||
|
||||||
1. `[db.]job_name` | ||||||
|
||||||
Specifies the job name to modify. | ||||||
|
||||||
2. `tbl_name` | ||||||
|
||||||
Specifies the name of the table to be imported. | ||||||
|
||||||
3. `job_properties` | ||||||
|
||||||
Specifies the job parameters that need to be modified. Currently, only the modification of the following parameters is supported: | ||||||
|
||||||
1. `desired_concurrent_number` | ||||||
2. `max_error_number` | ||||||
3. `max_batch_interval` | ||||||
4. `max_batch_rows` | ||||||
5. `max_batch_size` | ||||||
6. `jsonpaths` | ||||||
7. `json_root` | ||||||
8. `strip_outer_array` | ||||||
9. `strict_mode` | ||||||
10. `timezone` | ||||||
11. `num_as_string` | ||||||
12. `fuzzy_parse` | ||||||
13. `partial_columns` | ||||||
14. `max_filter_ratio` | ||||||
|
||||||
|
||||||
4. `data_source` | ||||||
|
||||||
The type of data source. Currently supports: | ||||||
|
||||||
KAFKA | ||||||
|
||||||
5. `data_source_properties` | ||||||
|
||||||
Relevant properties of the data source. Currently only supports: | ||||||
|
||||||
1. `kafka_partitions` | ||||||
2. `kafka_offsets` | ||||||
3. `kafka_broker_list` | ||||||
4. `kafka_topic` | ||||||
5. Custom properties, such as `property.group.id` | ||||||
|
||||||
Note: | ||||||
|
||||||
1. `kafka_partitions` and `kafka_offsets` are used to modify the offset of the kafka partition to be consumed, only the currently consumed partition can be modified. Cannot add partition. | ||||||
|
||||||
## Example | ||||||
|
||||||
1. Change `desired_concurrent_number` to 1 | ||||||
|
||||||
```sql | ||||||
ALTER ROUTINE LOAD FOR db1.label1 | ||||||
PROPERTIES | ||||||
( | ||||||
"desired_concurrent_number" = "1" | ||||||
); | ||||||
``` | ||||||
|
||||||
2. Modify `desired_concurrent_number` to 10, modify the offset of the partition, and modify the group id. | ||||||
|
||||||
```sql | ||||||
ALTER ROUTINE LOAD FOR db1.label1 | ||||||
PROPERTIES | ||||||
( | ||||||
"desired_concurrent_number" = "10" | ||||||
) | ||||||
FROM kafka | ||||||
( | ||||||
"kafka_partitions" = "0, 1, 2", | ||||||
"kafka_offsets" = "100, 200, 100", | ||||||
"property.group.id" = "new_group" | ||||||
); | ||||||
``` | ||||||
|
||||||
## Keywords | ||||||
|
||||||
ALTER, ROUTINE, LOAD | ||||||
|
||||||
## Best Practice | ||||||
|
||||||
## Required Parameters | ||||||
|
||||||
**1. `[db.]job_name`** | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
> Specifies the name of the job to be modified. The identifier must begin with a letter character and cannot contain spaces or special characters unless the entire identifier string is enclosed in backticks. | ||||||
> | ||||||
> The identifier cannot use reserved keywords. For more details, please refer to identifier requirements and reserved keywords. | ||||||
|
||||||
**2. `job_properties`** | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
> Specifies the job parameters to be modified. Currently supported parameters include: | ||||||
> | ||||||
> - desired_concurrent_number | ||||||
> - max_error_number | ||||||
> - max_batch_interval | ||||||
> - max_batch_rows | ||||||
> - max_batch_size | ||||||
> - jsonpaths | ||||||
> - json_root | ||||||
> - strip_outer_array | ||||||
> - strict_mode | ||||||
> - timezone | ||||||
> - num_as_string | ||||||
> - fuzzy_parse | ||||||
> - partial_columns | ||||||
> - max_filter_ratio | ||||||
|
||||||
**3. `data_source`** | ||||||
|
||||||
> The type of data source. Currently supports: | ||||||
> | ||||||
> - KAFKA | ||||||
|
||||||
**4. `data_source_properties`** | ||||||
|
||||||
> Properties related to the data source. Currently supports: | ||||||
> | ||||||
> - kafka_partitions | ||||||
> - kafka_offsets | ||||||
> - kafka_broker_list | ||||||
> - kafka_topic | ||||||
> - Custom properties, such as property.group.id | ||||||
|
||||||
## Privilege Control | ||||||
|
||||||
Users executing this SQL command must have at least the following privileges: | ||||||
|
||||||
| Privilege | Object | Notes | | ||||||
| :-------- | :----- | :---- | | ||||||
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD privilege on the table | | ||||||
|
||||||
## Notes | ||||||
|
||||||
- `kafka_partitions` and `kafka_offsets` are used to modify the offset of kafka partitions to be consumed, and can only modify currently consumed partitions. New partitions cannot be added. | ||||||
|
||||||
## Examples | ||||||
|
||||||
- Modify `desired_concurrent_number` to 1 | ||||||
|
||||||
```sql | ||||||
ALTER ROUTINE LOAD FOR db1.label1 | ||||||
PROPERTIES | ||||||
( | ||||||
"desired_concurrent_number" = "1" | ||||||
); | ||||||
``` | ||||||
|
||||||
- Modify `desired_concurrent_number` to 10, modify partition offsets, and modify group id | ||||||
|
||||||
```sql | ||||||
ALTER ROUTINE LOAD FOR db1.label1 | ||||||
PROPERTIES | ||||||
( | ||||||
"desired_concurrent_number" = "10" | ||||||
) | ||||||
FROM kafka | ||||||
( | ||||||
"kafka_partitions" = "0, 1, 2", | ||||||
"kafka_offsets" = "100, 200, 100", | ||||||
"property.group.id" = "new_group" | ||||||
); | ||||||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.