Warehouse Imports
Create People Import
Create a new warehouse import for user profile data.
People imports sync user properties from your warehouse to Mixpanel user profiles.
Each row represents a user, identified by the user_column_name.
POST
/
projects
/
{projectId}
/
warehouse-sources
/
imports
/
people
Create a people (user profiles) import
curl --request POST \
--url https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"import_type": "people",
"warehouse_source_id": 123,
"table_params": {},
"user_column_name": "<string>",
"json_properties_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"databricks_params": {
"export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": true,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [
{}
]
}
}
}
'import requests
url = "https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people"
payload = {
"import_type": "people",
"warehouse_source_id": 123,
"table_params": {},
"user_column_name": "<string>",
"json_properties_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"databricks_params": { "export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": True,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [{}]
} }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
import_type: 'people',
warehouse_source_id: 123,
table_params: {},
user_column_name: '<string>',
json_properties_column_name: '<string>',
insert_time_column_name: '<string>',
property_mappings: {},
databricks_params: {
export_cluster_config: {
spark_version: '<string>',
node_type_id: '<string>',
driver_node_type_id: '<string>',
num_workers: 1,
autoscale: {min_workers: 1, max_workers: 2},
spark_conf: {},
spark_env_vars: {},
single_user_name: '<string>',
custom_tags: {},
policy_id: '<string>',
instance_pool_id: '<string>',
driver_instance_pool_id: '<string>',
enable_elastic_disk: true,
aws_attributes: {},
azure_attributes: {},
gcp_attributes: {},
init_scripts: [{}]
}
}
})
};
fetch('https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people', 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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people",
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([
'import_type' => 'people',
'warehouse_source_id' => 123,
'table_params' => [
],
'user_column_name' => '<string>',
'json_properties_column_name' => '<string>',
'insert_time_column_name' => '<string>',
'property_mappings' => [
],
'databricks_params' => [
'export_cluster_config' => [
'spark_version' => '<string>',
'node_type_id' => '<string>',
'driver_node_type_id' => '<string>',
'num_workers' => 1,
'autoscale' => [
'min_workers' => 1,
'max_workers' => 2
],
'spark_conf' => [
],
'spark_env_vars' => [
],
'single_user_name' => '<string>',
'custom_tags' => [
],
'policy_id' => '<string>',
'instance_pool_id' => '<string>',
'driver_instance_pool_id' => '<string>',
'enable_elastic_disk' => true,
'aws_attributes' => [
],
'azure_attributes' => [
],
'gcp_attributes' => [
],
'init_scripts' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people"
payload := strings.NewReader("{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"results": {
"id": 123,
"created": "2023-11-07T05:31:56Z",
"creator_id": 123,
"creator_name": "<string>",
"creator_email": "<string>",
"warehouse_source_id": 123,
"table_params": {},
"paused": true,
"last_dispatch": 123,
"is_deleted": true,
"event_name": "<string>",
"event_column_name": "<string>",
"time_column_name": "<string>",
"user_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"group_key": "<string>",
"group_id_column": "<string>",
"databricks_params": {
"export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": true,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [
{}
]
}
}
}
}{
"error": "<string>",
"status": "error"
}{
"error": "<string>",
"status": "error"
}{
"error": "<string>",
"status": "error"
}Authorizations
Service Account
Path Parameters
Your project id (eg: 12345)
Body
application/json
Available options:
people Table location parameters (structure depends on warehouse type)
Available options:
time_based, mirror_mode, full_sync, one_time Sync frequency in nanoseconds. Only these values are accepted:
0- API-triggered only (use the manual-sync endpoint to trigger)3600000000000- Hourly86400000000000- Daily604800000000000- Weekly
Available options:
0, 3600000000000, 86400000000000, 604800000000000 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create a people (user profiles) import
curl --request POST \
--url https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"import_type": "people",
"warehouse_source_id": 123,
"table_params": {},
"user_column_name": "<string>",
"json_properties_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"databricks_params": {
"export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": true,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [
{}
]
}
}
}
'import requests
url = "https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people"
payload = {
"import_type": "people",
"warehouse_source_id": 123,
"table_params": {},
"user_column_name": "<string>",
"json_properties_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"databricks_params": { "export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": True,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [{}]
} }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
import_type: 'people',
warehouse_source_id: 123,
table_params: {},
user_column_name: '<string>',
json_properties_column_name: '<string>',
insert_time_column_name: '<string>',
property_mappings: {},
databricks_params: {
export_cluster_config: {
spark_version: '<string>',
node_type_id: '<string>',
driver_node_type_id: '<string>',
num_workers: 1,
autoscale: {min_workers: 1, max_workers: 2},
spark_conf: {},
spark_env_vars: {},
single_user_name: '<string>',
custom_tags: {},
policy_id: '<string>',
instance_pool_id: '<string>',
driver_instance_pool_id: '<string>',
enable_elastic_disk: true,
aws_attributes: {},
azure_attributes: {},
gcp_attributes: {},
init_scripts: [{}]
}
}
})
};
fetch('https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people', 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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people",
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([
'import_type' => 'people',
'warehouse_source_id' => 123,
'table_params' => [
],
'user_column_name' => '<string>',
'json_properties_column_name' => '<string>',
'insert_time_column_name' => '<string>',
'property_mappings' => [
],
'databricks_params' => [
'export_cluster_config' => [
'spark_version' => '<string>',
'node_type_id' => '<string>',
'driver_node_type_id' => '<string>',
'num_workers' => 1,
'autoscale' => [
'min_workers' => 1,
'max_workers' => 2
],
'spark_conf' => [
],
'spark_env_vars' => [
],
'single_user_name' => '<string>',
'custom_tags' => [
],
'policy_id' => '<string>',
'instance_pool_id' => '<string>',
'driver_instance_pool_id' => '<string>',
'enable_elastic_disk' => true,
'aws_attributes' => [
],
'azure_attributes' => [
],
'gcp_attributes' => [
],
'init_scripts' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people"
payload := strings.NewReader("{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{regionAndDomain}.com/api/app/projects/{projectId}/warehouse-sources/imports/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"import_type\": \"people\",\n \"warehouse_source_id\": 123,\n \"table_params\": {},\n \"user_column_name\": \"<string>\",\n \"json_properties_column_name\": \"<string>\",\n \"insert_time_column_name\": \"<string>\",\n \"property_mappings\": {},\n \"databricks_params\": {\n \"export_cluster_config\": {\n \"spark_version\": \"<string>\",\n \"node_type_id\": \"<string>\",\n \"driver_node_type_id\": \"<string>\",\n \"num_workers\": 1,\n \"autoscale\": {\n \"min_workers\": 1,\n \"max_workers\": 2\n },\n \"spark_conf\": {},\n \"spark_env_vars\": {},\n \"single_user_name\": \"<string>\",\n \"custom_tags\": {},\n \"policy_id\": \"<string>\",\n \"instance_pool_id\": \"<string>\",\n \"driver_instance_pool_id\": \"<string>\",\n \"enable_elastic_disk\": true,\n \"aws_attributes\": {},\n \"azure_attributes\": {},\n \"gcp_attributes\": {},\n \"init_scripts\": [\n {}\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"results": {
"id": 123,
"created": "2023-11-07T05:31:56Z",
"creator_id": 123,
"creator_name": "<string>",
"creator_email": "<string>",
"warehouse_source_id": 123,
"table_params": {},
"paused": true,
"last_dispatch": 123,
"is_deleted": true,
"event_name": "<string>",
"event_column_name": "<string>",
"time_column_name": "<string>",
"user_column_name": "<string>",
"insert_time_column_name": "<string>",
"property_mappings": {},
"group_key": "<string>",
"group_id_column": "<string>",
"databricks_params": {
"export_cluster_config": {
"spark_version": "<string>",
"node_type_id": "<string>",
"driver_node_type_id": "<string>",
"num_workers": 1,
"autoscale": {
"min_workers": 1,
"max_workers": 2
},
"spark_conf": {},
"spark_env_vars": {},
"single_user_name": "<string>",
"custom_tags": {},
"policy_id": "<string>",
"instance_pool_id": "<string>",
"driver_instance_pool_id": "<string>",
"enable_elastic_disk": true,
"aws_attributes": {},
"azure_attributes": {},
"gcp_attributes": {},
"init_scripts": [
{}
]
}
}
}
}{
"error": "<string>",
"status": "error"
}{
"error": "<string>",
"status": "error"
}{
"error": "<string>",
"status": "error"
}