aito.api.upload_binary_file

aito.api.upload_binary_file(client: AitoClient, table_name: str, binary_file: BinaryIO, polling_time: int = 10, optimize_on_finished: bool = True, batch_size: int = 1000)

upload a binary file object to a table

For multitenant instances, this function uses streaming batch uploads instead of S3 file upload, as S3 file upload is not supported in multitenant environments.

Note

requires the client to be setup with the READ-WRITE API key

Parameters:
  • client (AitoClient) – the AitoClient instance

  • table_name (str) – the name of the table to be uploaded

  • binary_file (BinaryIO) – binary file object

  • polling_time (int) – polling wait time (only used for non-multitenant S3 upload)

  • optimize_on_finished (bool) – optimize_table() when finished uploading, defaults to True

  • batch_size (int) – batch size for streaming upload (only used for multitenant), defaults to 1000