@@ -24,12 +24,35 @@ echo "CREATE STAGE s1 FILE_FORMAT = (TYPE = CSV)" | $BENDSQL_CLIENT_CONNECT
24
24
echo " list @s1" | $BENDSQL_CLIENT_CONNECT | awk ' {print $1}'
25
25
26
26
# # Insert with stage use http API
27
- curl -s -u root: -XPOST " http://localhost:${QUERY_HTTP_HANDLER_PORT} /v1/query" --header ' Content-Type: application/json' --header ' X-DATABEND-DEDUPLICATE-LABEL: insert1' -d ' {"sql": "insert into sample (Id, City, Score) values", "stage_attachment": {"location": "@s1/sample.csv"}}' | jq -r ' .stats.scan_progress.bytes, .stats.write_progress.bytes, .error'
27
+ curl -s -u root: -XPOST " http://localhost:${QUERY_HTTP_HANDLER_PORT} /v1/query" \
28
+ --header ' Content-Type: application/json' \
29
+ --header ' X-DATABEND-DEDUPLICATE-LABEL: insert1' \
30
+ -d ' {
31
+ "sql": "insert into sample (Id, City, Score) values",
32
+ "stage_attachment": {
33
+ "location": "@s1/sample.csv"
34
+ },
35
+ "pagination": {
36
+ "wait_time_secs": 3
37
+ }
38
+ }' | jq -r ' .stats.scan_progress.bytes, .stats.write_progress.bytes, .error'
28
39
29
40
echo " select * from sample" | $BENDSQL_CLIENT_CONNECT
30
41
31
42
# # Insert again with the same deduplicate_label will have no effect
32
- curl -s -u root: -XPOST " http://localhost:${QUERY_HTTP_HANDLER_PORT} /v1/query" --header ' Content-Type: application/json' --header ' X-DATABEND-DEDUPLICATE-LABEL: insert1' -d ' {"sql": "insert into sample (Id, City, Score) values", "stage_attachment": {"location": "@s1/sample.csv"}}' | jq -r ' .stats.scan_progress.bytes, .stats.write_progress.bytes, .error'
43
+ curl -s -u root: -XPOST " http://localhost:${QUERY_HTTP_HANDLER_PORT} /v1/query" \
44
+ --header ' Content-Type: application/json' \
45
+ --header ' X-DATABEND-DEDUPLICATE-LABEL: insert1' \
46
+ -d ' {
47
+ "sql": "insert into sample (Id, City, Score) values",
48
+ "stage_attachment": {
49
+ "location": "@s1/sample.csv"
50
+ },
51
+ "pagination": {
52
+ "wait_time_secs": 3
53
+ }
54
+ }' | jq -r ' .stats.scan_progress.bytes, .stats.write_progress.bytes, .error'
55
+
33
56
34
57
echo " select * from sample" | $BENDSQL_CLIENT_CONNECT
35
58
0 commit comments