Send a parquet file
Inline rows travel inside the JSON body, which is fine for a few hundred rows
and wasteful for a real table. Upload the file instead: send the request as
multipart/form-data, with the query in a part named query and the data in
a part of its own.
This is the one case where the request isn't plain JSON, so here is the whole
curl call:
Code
query.json is the same request body you would have posted as JSON, except
that source points at the uploaded part with a uri instead of carrying
rows:
Code
model names the forecasting model and is required on every call to this
endpoint.
The part name is yours to choose. inline://sales means the part sent as
-F "[email protected]" — the name in the URL is the part name, not a
file name, so inline://sales.parquet would not resolve.
Two errors tell you the two halves are out of step: the query reads inline://x, but no part was uploaded under that name, and part x is not read by the query.
One part per source
A uri names a single part; it does not take a list. To forecast several
files as one table, concatenate them before uploading.
Several parts are for several sources. A covariate has a source of its own, so it can come from its own part:
Code
Code
Parts can be Parquet or Arrow IPC files. Write Arrow uncompressed — an
LZ4-compressed Arrow file is rejected with lz4 IPC decompression requires the lz4 feature.
What comes back
The same response as any other request. One row per (store, time step), since
store is an identifier and nothing aggregates it away:
Code
It is JSON either way — uploading a file changes how the input arrives, not how the forecast comes back.

