zzzzzzzs opened a new pull request, #23362:
URL: https://github.com/apache/doris/pull/23362

   
   ## Proposed changes
   
   Using stream load in SQL mode
   
   for example:
   example.csv
   ```
   10000,北京
   10001,天津
   ```
   
   ``` curl
   curl -v --location-trusted -u root: -H "sql: insert into test.t1(c1, c2) 
select c1,c2 from stream(\"format\" = \"CSV\", \"column_separator\" = \",\")" 
-T example.csv http://127.0.0.1:8030/api/_stream_load_with_sql
   ```
   
   ``` curl
   curl -v --location-trusted -u root: -H "sql: insert into test.t2(c1, c2, c3) 
select c1,c2, 'aaa' from stream(\"format\" = \"CSV\", \"column_separator\" = 
\",\")" -T example.csv http://127.0.0.1:8030/api/_stream_load_with_sql
   ```
   
   ``` curl
   curl -v --location-trusted -u root: -H "sql: insert into test.t3(c1, c2) 
select c1, count(1) from stream(\"format\" = \"CSV\", \"column_separator\" = 
\",\") group by c1" -T example.csv 
http://127.0.0.1:8030/api/_stream_load_with_sql
   ```
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) 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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to