client.exports.post_files_csv
A method of the Exports endpoint.
- post_files_csv(source: dict, destination: dict, *, name: str = None, include_header: bool = None, compression: str = None, column_delimiter: str = None, hidden: bool = None, force_multifile: bool = None, max_file_size: int = None) Response
Create a CSV Export
API URL:
POST /exports/files/csvimport civis client = civis.APIClient() response = client.exports.post_files_csv(...)
- Parameters:
- sourcedict
- sqlstr
The SQL query for this Csv Export job
- remote_host_idint
The ID of the destination database host.
- credential_idint
The ID of the credentials for the destination database.
- destinationdict
- filename_prefixstr
The prefix of the name of the file returned to the user.
- storage_pathdict
- file_pathstr
The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”
- storage_host_idint
The ID of the destination storage host.
- credential_idint
The ID of the credentials for the destination storage host.
- existing_filesstr
Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.
- namestr, optional
The name of this Csv Export job.
- include_headerbool, optional
A boolean value indicating whether or not the header should be included. Defaults to true.
- compressionstr, optional
The compression of the output file. Valid arguments are gzip, zip or none. Defaults to “gzip”.
- column_delimiterstr, optional
The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- hiddenbool, optional
A boolean value indicating whether or not this request should be hidden. Defaults to false.
- force_multifilebool, optional
Whether or not the csv should be split into multiple files. Default: false
- max_file_sizeint, optional
The max file size, in MB, created files will be. Only available when force_multifile is true.
- Returns:
civis.Response- idint
The ID of this Csv Export job.
- namestr
The name of this Csv Export job.
- source
civis.Response - sqlstr
The SQL query for this Csv Export job
- remote_host_idint
The ID of the destination database host.
- credential_idint
The ID of the credentials for the destination database.
- source
- destination
civis.Response - filename_prefixstr
The prefix of the name of the file returned to the user.
- storage_path
civis.Response - file_pathstr
The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”
- storage_host_idint
The ID of the destination storage host.
- credential_idint
The ID of the credentials for the destination storage host.
- existing_filesstr
Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.
- storage_path
- destination
- include_headerbool
A boolean value indicating whether or not the header should be included. Defaults to true.
- compressionstr
The compression of the output file. Valid arguments are gzip, zip or none. Defaults to “gzip”.
- column_delimiterstr
The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- hiddenbool
A boolean value indicating whether or not this request should be hidden. Defaults to false.
- force_multifilebool
Whether or not the csv should be split into multiple files. Default: false
- max_file_sizeint
The max file size, in MB, created files will be. Only available when force_multifile is true.
- my_permission_levelstr
Your permission level on the object. One of “read”, “write”, or “manage”.