curl --request POST \
--url https://api.example.com/v1/table-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "<string>",
"table_name": "<string>",
"import_type": "NEW",
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": false,
"nullable": true,
"required": true
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"include_load_date": false
}
'import requests
url = "https://api.example.com/v1/table-imports"
payload = {
"asset_id": "<string>",
"table_name": "<string>",
"import_type": "NEW",
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": False,
"nullable": True,
"required": True
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"include_load_date": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: '<string>',
table_name: '<string>',
import_type: 'NEW',
column_mappings: [
{
source_column_name: '<string>',
target_column_name: '<string>',
data_type: 'STRING',
unique: false,
nullable: true,
required: true
}
],
csv: {
char_encoding: 'UTF_8',
column_separator: ',',
quote_character: '"',
header_row: 1,
first_data_row: 2,
date_format: '',
thousands: '<string>'
},
include_load_date: false
})
};
fetch('https://api.example.com/v1/table-imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/table-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset_id' => '<string>',
'table_name' => '<string>',
'import_type' => 'NEW',
'column_mappings' => [
[
'source_column_name' => '<string>',
'target_column_name' => '<string>',
'data_type' => 'STRING',
'unique' => false,
'nullable' => true,
'required' => true
]
],
'csv' => [
'char_encoding' => 'UTF_8',
'column_separator' => ',',
'quote_character' => '"',
'header_row' => 1,
'first_data_row' => 2,
'date_format' => '',
'thousands' => '<string>'
],
'include_load_date' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/table-imports"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/table-imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/table-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Create table import
Import an uploaded file asset into an analyzable table. Use this after creating an upload URL and optionally previewing the asset. import_type NEW creates a table and refuses a name that already exists (409); FULL_REFRESH and INCREMENTAL_REFRESH both replace a previously imported table’s rows (they are equivalent for file imports today) and therefore require confirm=true (400 otherwise). For database-backed data, attach datasets on the connection instead of importing files here.
curl --request POST \
--url https://api.example.com/v1/table-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "<string>",
"table_name": "<string>",
"import_type": "NEW",
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": false,
"nullable": true,
"required": true
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"include_load_date": false
}
'import requests
url = "https://api.example.com/v1/table-imports"
payload = {
"asset_id": "<string>",
"table_name": "<string>",
"import_type": "NEW",
"column_mappings": [
{
"source_column_name": "<string>",
"target_column_name": "<string>",
"data_type": "STRING",
"unique": False,
"nullable": True,
"required": True
}
],
"csv": {
"char_encoding": "UTF_8",
"column_separator": ",",
"quote_character": "\"",
"header_row": 1,
"first_data_row": 2,
"date_format": "",
"thousands": "<string>"
},
"include_load_date": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: '<string>',
table_name: '<string>',
import_type: 'NEW',
column_mappings: [
{
source_column_name: '<string>',
target_column_name: '<string>',
data_type: 'STRING',
unique: false,
nullable: true,
required: true
}
],
csv: {
char_encoding: 'UTF_8',
column_separator: ',',
quote_character: '"',
header_row: 1,
first_data_row: 2,
date_format: '',
thousands: '<string>'
},
include_load_date: false
})
};
fetch('https://api.example.com/v1/table-imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/table-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset_id' => '<string>',
'table_name' => '<string>',
'import_type' => 'NEW',
'column_mappings' => [
[
'source_column_name' => '<string>',
'target_column_name' => '<string>',
'data_type' => 'STRING',
'unique' => false,
'nullable' => true,
'required' => true
]
],
'csv' => [
'char_encoding' => 'UTF_8',
'column_separator' => ',',
'quote_character' => '"',
'header_row' => 1,
'first_data_row' => 2,
'date_format' => '',
'thousands' => '<string>'
],
'include_load_date' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/table-imports"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/table-imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/table-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_id\": \"<string>\",\n \"table_name\": \"<string>\",\n \"import_type\": \"NEW\",\n \"column_mappings\": [\n {\n \"source_column_name\": \"<string>\",\n \"target_column_name\": \"<string>\",\n \"data_type\": \"STRING\",\n \"unique\": false,\n \"nullable\": true,\n \"required\": true\n }\n ],\n \"csv\": {\n \"char_encoding\": \"UTF_8\",\n \"column_separator\": \",\",\n \"quote_character\": \"\\\"\",\n \"header_row\": 1,\n \"first_data_row\": 2,\n \"date_format\": \"\",\n \"thousands\": \"<string>\"\n },\n \"include_load_date\": false\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Required (true) when import_type is FULL_REFRESH or INCREMENTAL_REFRESH — both replace the existing table's rows.
Body
11How the asset is applied: 'NEW' imports it into a new table and refuses a name that already exists; 'FULL_REFRESH' and 'INCREMENTAL_REFRESH' re-import the full asset into a previously imported table, replacing its rows — for file imports the two are equivalent today (neither appends), and both require confirm=true. Case-insensitive.
NEW, FULL_REFRESH, INCREMENTAL_REFRESH Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response