kim-up commented on PR #4578:
URL: 
https://github.com/apache/incubator-seatunnel/pull/4578#issuecomment-1522904658

   ## Local Test Images
   ### Text Test
   #### fake_to_obs_file_text
   ```
   env {
     execution.parallelism = 1
     checkpoint.interval = 5000
     job.mode = "BATCH"
   }
   
   source {
     FakeSource {
       schema = {
         fields {
           c_map = "map<string, string>"
           c_array = "array<int>"
           c_string = string
           c_boolean = boolean
           c_tinyint = tinyint
           c_smallint = smallint
           c_int = int
           c_bigint = bigint
           c_float = float
           c_double = double
           c_bytes = bytes
           c_date = date
           c_decimal = "decimal(38, 18)"
           c_timestamp = timestamp
           c_row = {
             c_map = "map<string, string>"
             c_array = "array<int>"
             c_string = string
             c_boolean = boolean
             c_tinyint = tinyint
             c_smallint = smallint
             c_int = int
             c_bigint = bigint
             c_float = float
             c_double = double
             c_bytes = bytes
             c_date = date
             c_decimal = "decimal(38, 18)"
             c_timestamp = timestamp
           }
         }
       }
       result_table_name = "fake"
     }
   }
   
   sink {
     ObsFile {
       path = "/seatunnel/text"
       bucket = "obs://******"
       access_key = "******"
       access_secret = "******"
       endpoint = "obs.cn-east-3.myhuaweicloud.com"
       row_delimiter = "\n"
       partition_dir_expression = "${k0}=${v0}"
       is_partition_field_write_in_file = true
       file_name_expression = "${transactionId}_${now}"
       file_format_type = "text"
       filename_time_format = "yyyy.MM.dd"
       is_enable_transaction = true
     }
   }
   ```
   ##### Result
   
![image](https://user-images.githubusercontent.com/9264192/234497989-2c24633e-fc88-4fa6-ac54-873e095b8c5c.png)
   
   
![image](https://user-images.githubusercontent.com/9264192/234497898-3a4f8740-8f73-4a9b-bda7-ef1b2fbcb3b7.png)
   
   
   ### obs_file_text_projection_to_assert
   ```
   env {
     execution.parallelism = 1
     checkpoint.interval = 5000
     job.mode = "BATCH"
   }
   
   source {
     ObsFile {
       path = "/seatunnel/text"
       bucket = "obs://******"
       access_key = "******"
       access_secret = "******"
       endpoint = "obs.cn-east-3.myhuaweicloud.com"
       file_format_type = "text"
       read_columns = [c_string, c_boolean, c_double]
       schema = {
         fields {
           c_map = "map<string, string>"
           c_array = "array<int>"
           c_string = string
           c_boolean = boolean
           c_tinyint = tinyint
           c_smallint = smallint
           c_int = int
           c_bigint = bigint
           c_float = float
           c_double = double
           c_bytes = bytes
           c_date = date
           c_decimal = "decimal(38, 18)"
           c_timestamp = timestamp
           c_row = {
             c_map = "map<string, string>"
             c_array = "array<int>"
             c_string = string
             c_boolean = boolean
             c_tinyint = tinyint
             c_smallint = smallint
             c_int = int
             c_bigint = bigint
             c_float = float
             c_double = double
             c_bytes = bytes
             c_date = date
             c_decimal = "decimal(38, 18)"
             c_timestamp = timestamp
           }
         }
       }
       result_table_name = "fake"
     }
   }
   
   sink {
     Assert {
       rules {
         row_rules = [
           {
             rule_type = MAX_ROW
             rule_value = 5
           }
         ],
         field_rules = [
           {
             field_name = c_string
             field_type = string
             field_value = [
               {
                 rule_type = NOT_NULL
               }
             ]
           },
           {
             field_name = c_boolean
             field_type = boolean
             field_value = [
               {
                 rule_type = NOT_NULL
               }
             ]
           },
           {
             field_name = c_double
             field_type = double
             field_value = [
               {
                 rule_type = NOT_NULL
               }
             ]
           }
         ]
       }
     }
   }
   ```
   ##### Result
   
   
![image](https://user-images.githubusercontent.com/9264192/234498493-0e9aa21d-a7b1-4fe3-a6ef-9c3e37c73549.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to