Documentation

Getting started

ingest()

Reference for upload() to send files.

1 min read

Service obtained with sdk.ingest().

upload(params)

js
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 file is missing or is not a single File object.
  • The promise rejects when the upload address cannot be obtained.
  • The promise rejects when sending the file fails.

Minimal example

html
<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, table and partitions are sent to the platform without local validation.

Guide

First call

Complete page with a file upload.

See guide

Support

Implementation support

Official channels for questions during integration.

Response within 1 business day

Technical support email

Response within 1 business day

Send implementation questions with the context of your current step.

Send email
Coming soon

WhatsApp

Response according to the support queue

Direct assistance for quick integration questions.

Available

Support assistant

Immediate response

i6 documentation and implementation assistant.