Getting started
ingest()
Reference for upload() to send files.
1 min read
Service obtained with sdk.ingest().
upload(params)
await sdk.ingest().upload({ dataset, table, partitions, file })| Name | Type | Required | Description |
|---|---|---|---|
dataset |
string |
Yes | Dataset that receives the file. |
table |
string |
Yes | Inbox table. |
partitions |
object |
Yes | Values for the table partitions. |
file |
File |
Yes | A single File object. |
The file must be .json.gz: one JSON object per line (a format sometimes
called JSON Lines or NDJSON), compressed with gzip. This requirement comes
from the platform and is not validated by the SDK — sending another format
does not raise an error in the call, but processing on the platform side
may fail.
upload() does not check the file's format or content. A successful call
(ingestId returned) only confirms that the file reached storage — it does
not confirm that it was accepted in the expected format.
Returns: a Promise with no value, resolved when the upload succeeds.
Error conditions
- The promise rejects when
fileis missing or is not a singleFileobject. - The promise rejects when the upload address cannot be obtained.
- The promise rejects when sending the file fails.
Minimal example
<script src="https://cdn.infinity6.ai/releases/sdkweb/latest/bundle/i6sdk-web.js"></script>
<input type="file" id="arquivo" />
<script type="module">
async function main() {
const sdk = new window.I6Sdk();
const user = await sdk.auth().requireUser();
if (!user) return;
const input = document.querySelector("#arquivo");
input.addEventListener("change", async () => {
const file = input.files[0];
if (!file) return;
await sdk.ingest().upload({
dataset: "<your-dataset>",
table: "<your-table>",
partitions: { "<your-key>": "<your-value>" },
file,
});
});
}
main();
</script>Notes
- The SDK asks the platform for a signed upload address and sends the file to
that address with
PUT. - Each call sends one file.
- The SDK validates only
file.dataset,tableandpartitionsare sent to the platform without local validation.
Guide
First call
Complete page with a file upload.
Support
Implementation support
Official channels for questions during integration.
Technical support email
Response within 1 business day
Send implementation questions with the context of your current step.
Send emailResponse according to the support queue
Direct assistance for quick integration questions.
Support assistant
Immediate response
i6 documentation and implementation assistant.
