aito.api.upload_file

aito.api.upload_file(client: aito.client.aito_client.AitoClient, table_name: str, file_path: os.PathLike, polling_time: int = 10, optimize_on_finished: bool = True)

upload a file to the specfied table

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

  • file_path (PathLike) – path to the file to be uploaded

  • polling_time (int) – polling wait time

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

Raises

ValueError – incorrect file extension, should be .ndjson.gz