Skip to content

Create a bulk load session

Request

Creates a bulk load session.

Security
ApiKeyAuth
Bodyapplication/x-www-form-urlencoded
configobject(BulkLoadConfig)

bulk load config

cronstring
namestringrequired
delayinteger
timezonestring(Timezone)
Example:"UTC"
databasestringrequired
tablestring
time_columnstring
curl -i -X POST \
  https://api.treasuredata.com/v3/bulk_loads \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d '{

  "config": {
    "in": {
      "type": "postgresql",
      "host": "127.0.0.1",
      "port": 3306,
      "user": "testuser",
      "table": "table",
      "password": "password",
      "schema": "test_schema",
      "database": "database",
      "column_options": {
        "id": {
          "type": "long"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "out": {
      "database": "database_out",
      "endpoint": "api.treasuredata.com",
      "mode": "append",
      "table": "table_out",
      "type": "td"
    },
    "filters": [
    ],
    "exec": {
    }
  },
  "cron": "@daily",
  "name": "test",
  "timezone": "UTC",
  "database": "aa100bjt5",
  "table": "av03w9klv",
  "time_column": "test"
}'

Responses

OK

Bodyapplication/json
idinteger(BulkLoadSessionId)
Example:43
namestring
cronstring or null
timezonestring(Timezone)
Example:"UTC"
delayinteger
start_at(string or null) or DateTimeISO8601 (string)
Any of:
string or null
databasestring(name)

database name

Example:"Alpha"
tablestring(name)
Example:"Bravo"
configobject(BulkLoadConfig)

bulk load config

config_diffobject
Response
{ "id": 43, "name": "string", "cron": "string", "timezone": "UTC", "delay": 0, "start_at": "string", "database": "Alpha", "table": "Bravo", "config": { "in": {}, "filters": [], "exec": {}, "out": {} }, "config_diff": {} }