Cai-Yao opened a new pull request, #16940:
URL: https://github.com/apache/doris/pull/16940

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   In stream load,  add a 'sql' parameter to the header to replace the 
'column_separator', 'line_delimiter', 'where', 'columns' in the previous 
parameter, which is convenient to use.
   
   ```
   curl --location-trusted -u user:passwd [-H "sql: ${load_sql}"...] -T 
data.file -XPUT http://fe_host:http_port/api/{db}/{table}/_stream_load_with_sql
   
   
   # -- load_sql
   # insert into db.table (col, ...) select stream_col, ... from 
stream("property1"="value1");
   
   # stream
   # (
   #     "column_separator" = ",",
   #     "format" = "CSV",
   #     ...
   # )
   ```
   
   Examples:
   
   ```
   curl  --location-trusted -u root: -T test.csv  -H "sql:insert into 
demo.example_tbl_1(user_id, age, cost) select c1, c4, c7 * 2 from 
stream("format" = "CSV", "column_separator" = "," ) where age >= 30"  
http://127.0.0.1:28030/api/demo/example_tbl_1/_stream_load_with_sql
   ```
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to