@celigo/api-specs 0.2.109 → 0.2.110
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/dist/storagequery.yml +89 -19
- package/package.json +1 -1
- package/schemas.json +1 -1
package/dist/storagequery.yml
CHANGED
|
@@ -44,13 +44,16 @@ paths:
|
|
|
44
44
|
|
|
45
45
|
Everything that can be checked before running is checked here and answered
|
|
46
46
|
synchronously, and a rejected submit creates no job: the statement must parse, be
|
|
47
|
-
exactly one `SELECT
|
|
47
|
+
exactly one `SELECT` (a `DESCRIBE <query>` or `SUMMARIZE <query>` over a storage
|
|
48
|
+
file is accepted as well and returns the column or summary rows), use only
|
|
49
|
+
allow-listed functions, reference files only through
|
|
48
50
|
bare storage paths or the storage reader functions, and every path must resolve to
|
|
49
51
|
a file — or a folder of same-format files — the caller can read. A statement that
|
|
50
52
|
references no file is accepted only when it is a pure constant expression. Supported
|
|
51
53
|
file formats are CSV/TSV, JSON, NDJSON/JSONL, and Parquet; the reader is chosen from
|
|
52
54
|
the file's extension (or its MIME type), and an explicit reader function must match
|
|
53
|
-
it.
|
|
55
|
+
it. A folder is referenced with a trailing slash and contributes its direct child
|
|
56
|
+
files only; wildcard paths are not supported.
|
|
54
57
|
|
|
55
58
|
Read options are named arguments of the reader call, checked against a per-reader
|
|
56
59
|
allowlist — for `read_csv`/`read_csv_auto`: `header`, `delim`, `quote`, `escape`,
|
|
@@ -186,9 +189,11 @@ paths:
|
|
|
186
189
|
file's format (`STORAGE_QUERY_READER_FORMAT_MISMATCH`); a row generator with no
|
|
187
190
|
file reference (`STORAGE_QUERY_NO_STORAGE_REFERENCE`) or one that would generate
|
|
188
191
|
more rows than allowed (`STORAGE_QUERY_GENERATOR_TOO_LARGE`); a schema- or
|
|
189
|
-
catalog-qualified table name
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
catalog-qualified table name, or a path carrying a wildcard
|
|
193
|
+
(`STORAGE_QUERY_INVALID_SOURCE`); a folder path without its trailing slash
|
|
194
|
+
(`STORAGE_NOT_A_FILE`) or a file path with one (`STORAGE_ITEM_NOT_FOLDER`); an
|
|
195
|
+
unsupported file type (`STORAGE_QUERY_UNSUPPORTED_FILE_TYPE`); a folder that is
|
|
196
|
+
empty, mixes formats, or holds too many files (`STORAGE_QUERY_FOLDER_EMPTY`,
|
|
192
197
|
`STORAGE_QUERY_MIXED_FORMAT_FOLDER`, `STORAGE_QUERY_FOLDER_TOO_MANY_FILES`); too
|
|
193
198
|
many distinct files (`STORAGE_QUERY_TOO_MANY_SOURCES`); or more input bytes than
|
|
194
199
|
the cap (`STORAGE_QUERY_INPUT_TOO_LARGE`).
|
|
@@ -233,6 +238,18 @@ paths:
|
|
|
233
238
|
errors:
|
|
234
239
|
- code: STORAGE_QUERY_NO_STORAGE_REFERENCE
|
|
235
240
|
message: A query that generates rows must read at least one Celigo Storage file; only constant expressions may omit a file reference
|
|
241
|
+
wildcardPath:
|
|
242
|
+
summary: Wildcard in a storage path
|
|
243
|
+
value:
|
|
244
|
+
errors:
|
|
245
|
+
- code: STORAGE_QUERY_INVALID_SOURCE
|
|
246
|
+
message: FROM target "orders/2026/*.csv" is not a valid Celigo Storage file path
|
|
247
|
+
folderWithoutSlash:
|
|
248
|
+
summary: Folder path missing its trailing slash
|
|
249
|
+
value:
|
|
250
|
+
errors:
|
|
251
|
+
- code: STORAGE_NOT_A_FILE
|
|
252
|
+
message: Storage item "orders/2026" is not a file
|
|
236
253
|
'429':
|
|
237
254
|
description: |-
|
|
238
255
|
Too many submits for this account in the current window
|
|
@@ -404,9 +421,12 @@ paths:
|
|
|
404
421
|
description: |-
|
|
405
422
|
Returns one page of a completed job's rows. Pages run from 1 to the job's
|
|
406
423
|
`pageCount`; omit `page` for the first one and keep requesting `page + 1` while
|
|
407
|
-
`hasMore` is true. A
|
|
408
|
-
|
|
409
|
-
|
|
424
|
+
`hasMore` is true. A page holds as many whole rows as fit the service's page size,
|
|
425
|
+
which is a byte budget rather than a row count — a result of several hundred
|
|
426
|
+
thousand small rows can arrive as a single page — and no parameter changes it, so a
|
|
427
|
+
caller that must hold a page in memory bounds the result with `LIMIT` in the
|
|
428
|
+
statement. A completed job that matched nothing has `pageCount` 0 and still serves
|
|
429
|
+
page 1 as an empty page, so an empty result set never looks like a bad request. Rows exist only for a `completed` job: a `queued` or `running` job answers
|
|
410
430
|
409 until it finishes, and a `failed` job answers 409 permanently — read its `error`
|
|
411
431
|
from the status route instead. Jobs are scoped to the submitting account, and an
|
|
412
432
|
expired job answers 404. Requires the account's license to include the Storage
|
|
@@ -565,21 +585,34 @@ components:
|
|
|
565
585
|
description: |-
|
|
566
586
|
A single `SELECT` statement. Storage files are its tables: write a file or
|
|
567
587
|
folder path where a table name would go, quoted as an identifier
|
|
568
|
-
(`FROM "orders/2026/september.csv"`), or pass the path as
|
|
569
|
-
argument of a reader function (`read_csv_auto`, `read_csv`,
|
|
570
|
-
`read_json`, `read_ndjson_auto`, `read_ndjson`, `read_parquet`)
|
|
571
|
-
needs explicit read options. Paths are relative to the account's
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
588
|
+
(`FROM "orders/2026/september.csv"`) or as a string literal, or pass the path as
|
|
589
|
+
the first, literal argument of a reader function (`read_csv_auto`, `read_csv`,
|
|
590
|
+
`read_json_auto`, `read_json`, `read_ndjson_auto`, `read_ndjson`, `read_parquet`)
|
|
591
|
+
when the file needs explicit read options. Paths are relative to the account's
|
|
592
|
+
storage root and case-sensitive; a leading `/` is accepted. A folder is
|
|
593
|
+
referenced with a trailing `/` (`FROM "orders/2026/"`) and reads its direct
|
|
594
|
+
child files — not its subfolders — as one table; a folder path without the
|
|
595
|
+
slash is refused at submit with 422 `STORAGE_NOT_A_FILE`, a file path with one
|
|
596
|
+
with 422 `STORAGE_ITEM_NOT_FOLDER`. Wildcards are not supported: a `*` or `?`
|
|
597
|
+
in a path answers 422 `STORAGE_QUERY_INVALID_SOURCE`. Anything other than one
|
|
598
|
+
`SELECT` — an `UPDATE`, two statements, a table function that is not a storage
|
|
599
|
+
reader, or a function outside the allowlist — is rejected at submit with a 4xx
|
|
600
|
+
and creates no job; `DESCRIBE <query>` and `SUMMARIZE <query>` are accepted and
|
|
601
|
+
run as ordinary jobs. A statement that references no file is accepted only when
|
|
602
|
+
it is a pure constant expression.
|
|
576
603
|
examples:
|
|
577
604
|
- SELECT customer_id, SUM(total) AS spend FROM "orders/2026/september.csv" GROUP BY customer_id ORDER BY spend DESC LIMIT 100
|
|
605
|
+
- SELECT status, COUNT(*) AS orders FROM "orders/2026/" GROUP BY status
|
|
578
606
|
x-celigo-ai-guidance:
|
|
579
607
|
- |-
|
|
580
608
|
Quote storage paths as identifiers relative to the account root: FROM
|
|
581
609
|
"folder/file.csv". A path that does not resolve fails the submit with 404
|
|
582
610
|
STORAGE_QUERY_SOURCE_NOT_FOUND and the response carries no jobId.
|
|
611
|
+
- |-
|
|
612
|
+
End a folder path with a slash — FROM "folder/" — to read its direct child files
|
|
613
|
+
as one table; "folder" without the slash fails the submit with 422
|
|
614
|
+
STORAGE_NOT_A_FILE. Never write a wildcard such as "folder/*.csv": it fails with
|
|
615
|
+
422 STORAGE_QUERY_INVALID_SOURCE.
|
|
583
616
|
- |-
|
|
584
617
|
Put read options inside the SQL as named arguments of the reader call, e.g.
|
|
585
618
|
read_csv_auto('folder/file.csv', header = true, delim = ';'). An option the reader
|
|
@@ -815,9 +848,19 @@ components:
|
|
|
815
848
|
type: array
|
|
816
849
|
description: |-
|
|
817
850
|
Rows on this page, in the statement's output order. Each row is an object keyed
|
|
818
|
-
by column name (see `columns` on the job's status).
|
|
819
|
-
|
|
820
|
-
|
|
851
|
+
by column name (see `columns` on the job's status). `TINYINT`, `SMALLINT`,
|
|
852
|
+
`INTEGER`, `FLOAT`, `DOUBLE` and `BOOLEAN` values arrive as JSON numbers and
|
|
853
|
+
booleans. `BIGINT`, `UBIGINT`, `HUGEINT` and `DECIMAL` values arrive as strings so
|
|
854
|
+
no precision is lost (`"9007199254740993"`, `"1.50"`) — and every whole-number
|
|
855
|
+
column inferred from a CSV, JSON or NDJSON file is `BIGINT`, as are `COUNT`, `SUM`
|
|
856
|
+
over integer columns and the ranking window functions, so those come back as
|
|
857
|
+
strings such as `"40"`. `DATE`, `TIME` and `TIMESTAMP` values arrive as strings
|
|
858
|
+
(`2026-09-01`, `10:00:00`, `2026-09-01 10:00:00`). A list column (`INTEGER[]`,
|
|
859
|
+
`VARCHAR[]` — including a JSON array the reader typed as a list) arrives as a JSON
|
|
860
|
+
array, a `STRUCT` as a JSON object, a `MAP` as an array of `{"key", "value"}`
|
|
861
|
+
pairs, an `INTERVAL` as `{"months", "days", "micros"}` where `months` and `days`
|
|
862
|
+
are numbers and `micros` is a string (`{"months": 0, "days": 1, "micros": "0"}`
|
|
863
|
+
for `INTERVAL 1 DAY`). Empty on an empty result set.
|
|
821
864
|
items:
|
|
822
865
|
type: object
|
|
823
866
|
additionalProperties: true
|
|
@@ -826,6 +869,33 @@ components:
|
|
|
826
869
|
letter: a
|
|
827
870
|
num: '2.5'
|
|
828
871
|
flag: true
|
|
872
|
+
- - customer_id: C001
|
|
873
|
+
orders: '7'
|
|
874
|
+
spend: 1840.5
|
|
875
|
+
- - h: '170141183460469231731687303715884105727'
|
|
876
|
+
l:
|
|
877
|
+
- 1
|
|
878
|
+
- 2
|
|
879
|
+
- 3
|
|
880
|
+
s:
|
|
881
|
+
a: 1
|
|
882
|
+
b: x
|
|
883
|
+
tm: '10:00:00'
|
|
884
|
+
iv:
|
|
885
|
+
months: 0
|
|
886
|
+
days: 1
|
|
887
|
+
micros: '0'
|
|
888
|
+
x-celigo-ai-guidance:
|
|
889
|
+
- |-
|
|
890
|
+
Read the type from columns on the job's status before using a value: a
|
|
891
|
+
COUNT(*) or SUM over an integer column is BIGINT and arrives as the string
|
|
892
|
+
"40", not the number 40. When the consumer needs a JSON number, cast in the
|
|
893
|
+
statement — COUNT(*)::DOUBLE and COUNT(*)::INTEGER both arrive as the number
|
|
894
|
+
40. A cast to INTEGER fails the job when the BIGINT value is outside the
|
|
895
|
+
32-bit range: `SELECT 2147483648::INTEGER` fails with
|
|
896
|
+
STORAGE_QUERY_EXECUTION_FAILED ("Type INT64 with value 2147483648 can't be
|
|
897
|
+
cast because the value is out of range for the destination type INT32"), so
|
|
898
|
+
prefer DOUBLE for counts and sums whose size is unknown.
|
|
829
899
|
responses:
|
|
830
900
|
401-unauthorized:
|
|
831
901
|
description: |-
|
package/package.json
CHANGED