---
title: "Create a new DWH Integration"
method: POST
path: "/v1/dwh/"
---

# Create a new DWH Integration

`POST /v1/dwh/`

Note: the DWH Integration will not automatically create the TD database and tables.
You need to create the TD database and tables before creating the DWH Integration.

## Request body

- object
  - `schedule_type` 'none' | 'daily' | 'hourly' | 'weekly' | 'monthly' | 'minutes_interval' | 'cron'
  - `schedule_option` string — The schedule value for the schedule_type. For example, if schedule_type is daily, schedule_option should be a time string like `10:00`.
  - `timezone` string — The timezone of the schedule. For example, `UTC` or `Asia/Tokyo`.
  - `name` string, required
  - `basic_configs` union, required — The basic configs of the DWH Integration.
    - object — The parameters for the Snowflake connector
      - `type` string, required — Connector type
      - `td_authentication_id` string, required — The existing Connector Authentication ID
      - `role` string — Specify the role name, Leave blank to use default role.
      - `warehouse` string, required — The Snowflake data Warehouse to use for the connection, e.g. "COMPUTE_WH"
      - `db` string, required
      - `schema` string, required — The schema to use for the connection
      - `incremental` boolean — Enable incremental loading for this connector
    - object — The parameters for the Snowflake connector
      - `type` string, required — Connector type
      - `td_authentication_id` string, required — The existing Connector Authentication ID
      - `role` string — Specify the role name, Leave blank to use default role.
      - `warehouse` string, required — The Snowflake data Warehouse to use for the connection, e.g. "COMPUTE_WH"
      - `db` string, required
      - `schema` string, required — The schema to use for the connection
      - `incremental` boolean — Enable incremental loading for this connector
  - `advanced_configs` object[], required — The DWH Integration advanced configs. The configs contain array of of table configs which combine with the basic configs will be used to create Connector Bulkload Session.
    - `target_table` string — The name of the TD table to import data into.
    - `config` union — The configuration which will merge with the basic_configs to form a complete Connector configuration for Bulkload job. Some of the config from the basic_configs can declare here to override the basic_configs.
      - object — The parameters for the Snowflake connector
        - `type` string — Connector type, e.g. snowflake, redshift
        - `source_type` 'table_view' | 'query' — Specify the import type, either via a table/view or via a query.
        - `query` string — Use with (source_type: query) to specify a custom query for importng.
        - `select` string — Comma-separated list of columns to SELECT. Use with (source_type: table_view) to query for columns
        - `table` string — The table/view to import from. Use with (source_type: table_view)
        - `where` string — Specify a WHERE condition to filter the data
        - `order_by` string — Specify the columns to order the data by
        - `incremental` boolean — Enable incremental loading for this connector?
        - `incremental_columns` string[] — List of column(s) to incremental on. Only timestamp and numeric columns are accepted. If not set, it will try to find and use the primary keys
        - `invalid_value_option` 'fail_job' | 'insert_null' | 'ignore_row' — Specify how to handle invalid data values.
      - object — The parameters for the Snowflake connector
        - `type` string — Connector type, e.g. snowflake, redshift
        - `source_type` 'table_view' | 'query' — Specify the import type, either via a table/view or via a query.
        - `query` string — Use with (source_type: query) to specify a custom query for importng.
        - `select` string — Comma-separated list of columns to SELECT. Use with (source_type: table_view) to query for columns
        - `table` string — The table/view to import from. Use with (source_type: table_view)
        - `where` string — Specify a WHERE condition to filter the data
        - `order_by` string — Specify the columns to order the data by
        - `incremental` boolean — Enable incremental loading for this connector?
        - `incremental_columns` string[] — List of column(s) to incremental on. Only timestamp and numeric columns are accepted. If not set, it will try to find and use the primary keys
        - `invalid_value_option` 'fail_job' | 'insert_null' | 'ignore_row' — Specify how to handle invalid data values.
  - `output_config` OutConfigs, required — Config for how data will be imported into TD.
    - `database` string — The name of the TD database to import data into. The database must be created before the DWH Integration is created.
    - `mode` string — Specify the import mode. The default value is `append`.
    - `time_column` string — The value of the column will be used as the TD timestamp column.
  - `filter_configs` object[] — Config for how data will be filtered before importing into TD. See the connector filters for more info.
    - `type` string — The type of the filter.
    - `from_column` object
    - `to_column` object

## Response `200`

DWH Integration Created

- DwhIntegration
  - `schedule_type` 'none' | 'daily' | 'hourly' | 'weekly' | 'monthly' | 'minutes_interval' | 'cron'
  - `schedule_option` string — The schedule value for the schedule_type. For example, if schedule_type is daily, schedule_option should be a time string like `10:00`.
  - `timezone` string — The timezone of the schedule. For example, `UTC` or `Asia/Tokyo`.
  - `id` integer
  - `name` string — The name of the DWH Integration.
  - `user_id` integer — The ID of the user who created the DWH Integration.
  - `account_id` integer — The TD Account which the DWH Integration belongs to.
  - `workflow_project_id` integer
  - `workflow_project_name` string
  - `dwh_config_id` integer
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad Request
- `401` — Bad Request
- `403` — Unauthorized
- `404` — Not Found
- `500` — Server Error

---

[API](https://skmtc.net/treasure/apis/first-class-data-warehouse-integration-api.md) · [All operations](https://skmtc.net/treasure/apis/first-class-data-warehouse-integration-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/first-class-data-warehouse-integration-api/versions/bec422fd225e/schema)
