Overview
Concepts
Cluster Architecture
Strengths
Scenarios
LOAD LABEL example_db.label1(DATA INFILE("bos://my_bucket/input/file.txt")INTO TABLE `my_table`COLUMNS TERMINATED BY ",")WITH BROKER bos("bos_endpoint" = "http://bj.bcebos.com","bos_accesskey" = "xxxxxxxxxxxxxxxxxxxxxxxxxx","bos_secret_accesskey"="yyyyyyyyyyyyyyyyyyyyyyyyyy")PROPERTIES("strict_mode" = "true")
curl --location-trusted -u user:passwd \\-H "strict_mode: true" \\-T 1.txt \\http://host:port/api/example_db/my_table/_stream_load
CREATE ROUTINE LOAD example_db.test_job ON my_tablePROPERTIES("strict_mode" = "true")FROM KAFKA("kafka_broker_list" = "broker1:9092,broker2:9092,broker3:9092","kafka_topic" = "my_topic");
SET enable_insert_strict = true;INSERT INTO my_table ...;
null, but result is null after the column type conversion.column type conversionreferred to here does not include the null value calculated by the function.decimal(1,0) and the original data is 10, it belongs to the range that can be converted by type but is not within the scope of the column declaration. This kind of data strict has no effect on it.Original data type | Examples of original data | Converted Value to TinyInt | Strict pattern | Result |
Null value | \\N | NULL | Turn On or Off | NULL |
Non-null Value | "abc" or 2000 | NULL | Enabled | Illegal Value (Filtered) |
Non-null Value | "abc" | NULL | Off | NULL |
Non-null Value | 1 | 1 | Turn On or Off | Correct Import |
abc and 2000 will become NULL after being converted to TinyInt due to type or precision issues. When strict mode is on, this data will be filtered. And if it is closed, null will be imported.Original data type | Examples of original data | Value after converting to Decimal | Strict pattern | Result |
Null value | \\N | null | Turn On or Off | NULL |
Non-null Value | aaa | NULL | Enabled | Illegal Value (Filtered) |
Non-null Value | aaa | NULL | Off | NULL |
Non-null Value | 1 or 10 | 1 or 10 | Turn On or Off | Correct Import |
abc will turn into NULL due to type issues after converting to Decimal. When strict pattern is enabled, this type of data will be filtered. Whereas if it is disabled, it will import null.10 is a value that exceeds the range, since its type meets the requirements of decimal, the strict mode does not affect it. 10 will eventually be filtered in other import processing procedures. However, it won't be filtered by the strict mode.Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários