@clickzetta/cz-cli-darwin-arm64 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cz-cli
CHANGED
|
Binary file
|
|
@@ -184,7 +184,7 @@ COPY INTO ods.kafka_orders FROM (
|
|
|
184
184
|
```sql
|
|
185
185
|
DESC PIPE EXTENDED kafka_orders_pipe;
|
|
186
186
|
SELECT COUNT(*) FROM ods.kafka_orders;
|
|
187
|
-
SELECT * FROM load_history('ods.kafka_orders') ORDER BY
|
|
187
|
+
SELECT * FROM load_history('ods.kafka_orders') ORDER BY last_copy_time DESC LIMIT 10;
|
|
188
188
|
```
|
|
189
189
|
|
|
190
190
|
---
|
|
@@ -227,7 +227,7 @@ DESC PIPE EXTENDED <pipe_name>;
|
|
|
227
227
|
SHOW PIPES;
|
|
228
228
|
|
|
229
229
|
-- Load history (retained 7 days)
|
|
230
|
-
SELECT * FROM load_history('<schema>.<table>') ORDER BY
|
|
230
|
+
SELECT * FROM load_history('<schema>.<table>') ORDER BY last_copy_time DESC LIMIT 20;
|
|
231
231
|
|
|
232
232
|
-- Pipe jobs by query_tag
|
|
233
233
|
SHOW JOBS WHERE query_tag = 'pipe.<workspace>.<schema>.<pipe_name>';
|
|
@@ -132,6 +132,7 @@ SHOW VOLUME DIRECTORY my_oss_volume;
|
|
|
132
132
|
|
|
133
133
|
> **Syntax limitation**: ClickZetta does not support the `@volume_name` shorthand (Snowflake Stage syntax). You must use the full `FROM VOLUME name USING format` syntax.
|
|
134
134
|
> **Multi-format file handling**: If a Volume contains mixed-format files (e.g., .csv and .json), omitting `FILES()` or `SUBDIRECTORY` will attempt to read all files and may fail due to format mismatch. Use `FILES('xxx.csv')` or `SUBDIRECTORY 'csv_data/'`.
|
|
135
|
+
> **CSV column names**: `SELECT * FROM VOLUME ... USING CSV` without schema definition returns columns as `f0, f1, f2, ...` (not the original header names). To get meaningful column names, define the schema explicitly: `FROM VOLUME vol (col1 STRING, col2 INT) USING CSV OPTIONS('header'='true')`.
|
|
135
136
|
> **JSON nested field access**: Use `data['key']` syntax (not Snowflake's `data:key` syntax).
|
|
136
137
|
|
|
137
138
|
```sql
|
|
@@ -312,6 +313,7 @@ FILE_FORMAT = (TYPE = PARQUET);
|
|
|
312
313
|
|
|
313
314
|
> `COPY INTO VOLUME` exports use `FILE_FORMAT = (TYPE = CSV/PARQUET)`, not `USING CSV`.
|
|
314
315
|
> The `USING` keyword is only for `SELECT FROM VOLUME` queries.
|
|
316
|
+
> **SUBDIRECTORY is required**: `COPY INTO VOLUME` without `SUBDIRECTORY` causes a syntax error. Always specify a target subdirectory, e.g., `SUBDIRECTORY 'export/'`.
|
|
315
317
|
|
|
316
318
|
### Export to Local (GET Command)
|
|
317
319
|
|
|
@@ -354,6 +356,8 @@ DROP VOLUME IF EXISTS my_managed_volume;
|
|
|
354
356
|
|---|---|---|
|
|
355
357
|
| SHOW VOLUME DIRECTORY shows no files | Directory not refreshed | Run `ALTER VOLUME name REFRESH` |
|
|
356
358
|
| SELECT FROM VOLUME fails | Format mismatch | Ensure USING format matches actual file format; use `FILES()` to specify files |
|
|
359
|
+
| CSV query returns columns named f0, f1, f2 | `SELECT *` without explicit schema | Use `FROM VOLUME vol (col1 STRING, col2 INT) USING CSV OPTIONS('header'='true')` to define column names |
|
|
360
|
+
| COPY INTO VOLUME syntax error | Missing `SUBDIRECTORY` clause | `COPY INTO VOLUME` requires `SUBDIRECTORY 'path/'` — it cannot be omitted |
|
|
357
361
|
| COPY INTO fails with mixed format files | Mixed format files in Volume | Use `FILES('xxx.csv')` or `SUBDIRECTORY` to narrow scope |
|
|
358
362
|
| PUT command fails | Local path does not exist | Verify local file path is correct |
|
|
359
363
|
| COPY INTO errors | Insufficient permissions | Check STORAGE CONNECTION access key permissions |
|