curl --request POST \
    --url https://api.buster.so/api/v1/parent_data_sources\
    --header 'Content-Type: application/json' \
    --header 'api-key: <API-KEY>' \
    --data '{
        {
    "name": "Buster via API",
    "external_id": "buster",
    "db_type": "snowflake",
    "environment": "dev",
    "tenant_type": "single",
    "credentials": {
        "account_id": "account",
        "warehouse_id": "wh",
        "database_id": "database",
        "user_name": "user",
        "password": "password"
    },
    "tables": [
        {
            "name": "CALL_CENTER",
            "schema": "TPCDS_SF100TCL",
            "synonyms": "call center, contact center, help center, support center, support hub",
            "description": "Use this table to query about call center information such as management, organizational hierarchy, physical specs, number of employees, etc.",
            "columns": [
                {
                    "name": "CC_CALL_CENTER_ID",
                    "data_type": "VARCHAR",
                    "description": "Unique identifier for the call center"
                },
                {
                    "name": "CC_REC_START_DATE",
                    "data_type": "DATE",
                    "description": "The start date of the contact center"
                },
                {
                    "name": "CC_REC_END_DATE",
                    "data_type": "DATE",
                    "description": "The end date of the contact center"
                }
            ],
            "joins": [
                {
                  "primary_table": "table_name",
                  "primary_column": "column_name",
                  "foreign_table": "table_name",
                  "foreign_column": "column_name"
                }...
            ]
        }
    ]
}
    }'
{
	"data_source_id": "c9654cdf-c6d6-4ee1-a48d-676859dbde0a"
}

You will only use this API if you already have definitions defined and context around your schema.

Body Parameters

name
string
required

This is the name of the data source. The one that you will see in the Buster UI.

external_id
string
required

This is the identifier that you assign to your data source.

db_type
enum
required

This is the type of database that you are connecting to. Currently, we support the following: postgres, mysql, mariadb, sqlserver, snowflake, redshift, bigquery, databricks, supabase

environment
prod|dev
required

This is the environment that you are connecting to. Currently, we support the following: prod, dev

tenant_type
multi|single
required

This is the tenant type that you are connecting to. Currently, we support the following: multi, single

credentials
object
required
tables
object[]

Include all tables that you would like to expose to Buster. Anything you do not include will not be queryable.