Closed sj15600520109 closed 2 weeks ago
我验证了下这样可以,后续等#7928 合并后试试
transform { Sql { source_table_name = "fake" result_table_name = "fake1" query = "SELECT * FROM fake LATERAL VIEW OUTER EXPLODE(cpe_nodes) as cpe_nodes" } JsonPath { source_table_name = "fake1" result_table_name = "fake2" columns = [ { "src_field" = "cpe_nodes" "path" = "$.dataTestId" "dest_field" = "dataTestId" }, { "src_field" = "cpe_nodes" "path" = "$.cpe22Uri" "dest_field" = "cpe22Uri" }, { "src_field" = "cpe_nodes" "path" = "$.cpe23Uri" "dest_field" = "cpe23Uri" }, { "src_field" = "cpe_nodes" "path" = "$.id" "dest_field" = "id" }, ] } Sql { source_table_name = "fake2" result_table_name = "fake3" query = "SELECT id,cpe22Uri,cpe23Uri,dataTestId FROM fake" } }
console sink:
SeaTunnelRow#tableId=Optional[fake] SeaTunnelRow#kind=INSERT : 13345369, cpe:/a:microsoft:azure_stack_hci:-, cpe:2.3:a:microsoft:azure_stack_hci:-:::::::, vuln-software-cpe-1-0-0 SeaTunnelRow#tableId=Optional[fake] SeaTunnelRow#kind=INSERT : 13345390, cpe:/a:microsoft:azure_stack_hci:-, cpe:2.3:a:microsoft:azure_stack_hci2:-:::::::*, vuln-software-cpe-1-0-0
Originally posted by @CosmosNi in https://github.com/apache/seatunnel/issues/7961#issuecomment-2456152373
console sink:
Originally posted by @CosmosNi in https://github.com/apache/seatunnel/issues/7961#issuecomment-2456152373