-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Change strategy of incorrect data #1237
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
This file contains hidden or 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
20 changes: 20 additions & 0 deletions
20
docs/documentation/cn/administrator-guide/config/be_config.md
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # be 配置项说明 | ||
| ## enable load strict 配置说明 | ||
|
Contributor
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. 把这个变成一个session variable吧。这样用户能够明确的感知自己行为的确定性。如果只是在BE上进行配置,用户在不同集群中的行为不一致,会让他们产生困惑 |
||
|
|
||
| be 的配置中有一个参数 enable_load_strict 用于限制所有导入方式中类型转换如果遇到错误数据,是否严格 filter。 | ||
|
|
||
| enable load strict 参数只对导入中的类型转换有效,对于类型转换来说,如果 enable_load_strict 为true,则错误的数据将被filter。 | ||
|
|
||
| 对于导入的某列包含函数变换的,导入的值和函数的结果一致,strict 对其不产生影响。(其中 strftime 等 broker 系统支持的函数也属于这类)。 | ||
|
|
||
| ### strict 与类型转换关系 | ||
|
|
||
| 这里以列类型为 int 来举例 | ||
| 注:当表中的列允许导入空值时 | ||
|
|
||
| source data | source data example | string to int | enable_load_strict | load_data | ||
| ------------|---------------------|-----------------|--------------------|--------- | ||
| 空值 | \N | N/A | true or false | NULL | ||
| not null | aaa | NULL | true | filtered | ||
| not null | aaa | NULL | false | NULL | ||
| not null | 1 | 1 | true or false | correct data | ||
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.
The comment is not accurate.
In fact, all incorrect data should be filtered when loading, here we just use this configuration to allow data which can be converted to null