Upload multiple files to Civis

imports_post_batches(
  file_ids,
  schema,
  table,
  remote_host_id,
  credential_id,
  column_delimiter = NULL,
  first_row_is_header = NULL,
  compression = NULL,
  hidden = NULL
)

Arguments

file_ids

array required. The file IDs for the import.

schema

string required. The destination schema name. This schema must already exist in Redshift.

table

string required. The destination table name, without the schema prefix. This table must already exist in Redshift.

remote_host_id

integer required. The ID of the destination database host.

credential_id

integer required. The ID of the credentials to be used when performing the database import.

column_delimiter

string optional. The column delimiter for the file. Valid arguments are "comma", "tab", and "pipe". If unspecified, defaults to "comma".

first_row_is_header

boolean optional. A boolean value indicating whether or not the first row is a header row. If unspecified, defaults to false.

compression

string optional. The type of compression. Valid arguments are "gzip", "zip", and "none". If unspecified, defaults to "gzip".

hidden

boolean optional. The hidden status of the item.

Value

A list containing the following elements:

id

integer, The ID for the import.

schema

string, The destination schema name. This schema must already exist in Redshift.

table

string, The destination table name, without the schema prefix. This table must already exist in Redshift.

remoteHostId

integer, The ID of the destination database host.

state

string, The state of the run; one of "queued", "running", "succeeded", "failed", or "cancelled".

startedAt

string, The time the last run started at.

finishedAt

string, The time the last run completed.

error

string, The error returned by the run, if any.

hidden

boolean, The hidden status of the item.