DataCloud File Loader API
Overview
This service allows an API consumer to stage and load a file directly into a target table.
- Allows files up to 1GB
- Autodetects field and record separators (can be overridden)
- Autodetects most primitive data types
- A single date format can be applied to coerce date fields
- Autodetects common compression formats (zip, tar, gzip, tar.gz, 7z)
- Staged files can be reloaded without uploading a second time, if the initial load fails
- Staged files are accessible for up to 7 days (archived for up to 30)
Step 1: Set an API Password
If you have not already done so, you must set a password to enable API access. See Setting Your Password.
Step 2: Locate Your Warehouse Details
-
Login to Actian Data Platform at https://avalanche.actiandatacloud.com.
-
Select the Warehouses tab.
-
Start the desired warehouse if it is not already started:
-
Select the warehouse:
-
Note the values of the Storage, Region, and Warehouse ID for the warehouse:
Step 3: Access the File Loader API Doc
Go to the file loader API page for your warehouse region:
Step 4: Authorize Your Browser
- Tokens are good for up to 10 hrs.
- You will need to authorize different regions separately.
-
Click Authorize:
-
In the Available authorizations dialog, do the following:
-
Enter your username and password from Step 1 above.
-
If your file has a header row, select Authorization header in the Client credentials location dropdown. Otherwise, select Request body.
-
Click Authorize:
-
Step 5: Autoload
-
In the warehouse field, enter your warehouse ID from Step 2.
-
If your file has a header row, select true in the header dropdown.
-
The remaining fields are optional. You can ignore these unless you have more advanced needs, such as specific date formats.
-
Click Browse and select the file to load from your computer.
-
Click Execute.
-
With a successful post, a response such as the following is returned:
Preview Your Data
To preview the table created in the autoload, do the following:
-
On the Warehouses page, click Query Editor:
-
Click the table name. The query editor and table schema are displayed. Click Preview Table to run the query:
-
The query results are displayed: