readme.md
file here.
Let’s look at sample codes showing how to connect to each of the supported integrations.
CREATE DATABASE airtable_datasource --- display name for the database
WITH ENGINE = 'airtable', --- name of the MindsDB handler
PARAMETERS = {
"base_id": " ", --- the Airtable base ID
"table_name": " ", --- the Airtable table name
"api_key": " " --- the API key for the Airtable API
};
CREATE DATABASE dynamodb_datasource --- display name for the database
WITH ENGINE = 'dynamodb', --- name of the MindsDB handler
PARAMETERS = {
"aws_access_key_id": " ", --- the AWS access key
"aws_secret_access_key": " ", --- the AWS secret access key
"region_name": " " --- the AWS region
};
CREATE DATABASE amazonredshift_datasource --- display name for the database
WITH ENGINE = 'amazonredshift', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address of the Redshift cluster
"port": , --- port used when connecting to the Redshift cluster
"database": " ", --- database name used when connecting to the Redshift cluster
"user": " ", --- user to authenticate with the Redshift cluster
"password": " " --- password used to authenticate with the Redshift cluster
};
CREATE DATABASE amazons3_datasource --- display name for the database
WITH ENGINE = 's3', --- name of the MindsDB handler
PARAMETERS = {
"aws_access_key_id": " ", --- the AWS access key
"aws_secret_access_key": " ", --- the AWS secret access key
"region_name": " ", --- the AWS region
"bucket": " ", --- name of the S3 bucket
"key": " ", --- key of the object to be queried
"input_serialization": " " --- format of the data to be queried
};
CREATE DATABASE cassandra_datasource --- display name for the database
WITH ENGINE = 'cassandra', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- database user
"password": " ", --- database password
"keyspace": " ", --- database name
"protocol_version": , --- optional, protocol version (defaults to 4 if left blank)
"secure_connect_bundle": { --- optional, secure connect bundle file
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE druid_datasource --- display name for the database
WITH ENGINE = 'druid', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address of Apache Druid
"port": , --- port where Apache Druid runs
"user": " ", --- optional, user to authenticate with Apache Druid
"password": " ", --- optional, password used to authenticate with Apache Druid
"path": " ", --- query path
"scheme": " " --- the URI scheme (defaults to `http` if left blank)
};
CREATE DATABASE hive_datasource --- display name for the database
WITH ENGINE = 'hive', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"auth": " " --- defaults to CUSTOM if not provided; check for options here: https://pypi.org/project/PyHive/
};
CREATE DATABASE impala_datasource --- display name for the database
WITH ENGINE = 'impala', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
};
CREATE DATABASE pinot_datasource --- display name for the database
WITH ENGINE = 'pinot', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address of the Apache Pinot cluster
"broker_port": , --- port where the broker of the Apache Pinot cluster runs
"controller_port": , --- port where the controller of the Apache Pinot cluster runs
"path": " ", --- query path
"scheme": " ", --- scheme (defaults to `http` if left blank)
"username": " ", --- optional, user
"password": " ", --- optional, password
"verify_ssl": " " --- optional, verify SSL
};
CREATE DATABASE solr_datasource --- display name for the database
WITH ENGINE = 'solr', --- name of the MindsDB handler
PARAMETERS = {
"username": " ", --- optional, username used to authenticate with the Solr server
"password": " ", --- optional, password used to authenticate with the Solr server
"host": " ", --- host name or IP address of the Solr serve
"port": , --- port number of the Solr server
"server_path": " ", --- defaults to `solr` if left blank
"collection": " ", --- Solr Collection name
"use_ssl": " " --- defaults to `false` if left blank; refer to https://pypi.org/project/sqlalchemy-solr/
};
CREATE DATABASE ckan_datasource --- display name for the database
WITH ENGINE = 'ckan', --- name of the MindsDB handler
PARAMETERS = {
"url": " ", --- host name, IP address, or a URL
"apikey": " " --- the API key used for authentication
};
CREATE DATABASE clickhouse_datasource --- display name for the database
WITH ENGINE = 'clickhouse', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"protocol": " " --- optional, http or https (defaults to `native`)
};
CREATE DATABASE cloud_spanner_datasource --- display name for the database
WITH ENGINE = 'cloud_spanner', --- name of the MindsDB handler
PARAMETERS = {
"instance_id": " ", --- the instance identifier
"database_id": , --- the database identifier
"project_id": " ", --- the identifier of the project that owns the instances and data
"credentials": " ", --- a stringified GCP service account key JSON
};
CREATE DATABASE cockroach_datasource --- display name for the database
WITH ENGINE = 'cockroachdb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"publish": " " --- optional, publish
};
CREATE DATABASE couchbase_datasource --- display name for the database
WITH ENGINE = 'couchbase', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address of the Couchbase server
"user": " ", --- user to authenticate with the Couchbase server
"password": " ", --- password used to authenticate with the Couchbase server
"bucket": " ", --- bucket name
"scope": " " --- scope used to query (defaults to `_default` if left blank)
}; --- a scope in Couchbase is equivalent to a schema in MySQL
CREATE DATABASE cratedb_datasource --- display name for the database
WITH ENGINE = 'crate', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- database user
"password": " ", --- database password
"schema_name": " " --- database schema name (defaults to `doc` if left blank)
};
CREATE DATABASE d0lt_datasource --- display name for the database
WITH ENGINE = 'd0lt', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl_ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"ssl_cert": { --- optional, SSL certificates
"url": " " --- either "path" or "url"
},
"ssl_key": { --- optional, SSL keys
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE databend_datasource --- display name for the database
WITH ENGINE = 'databend', --- name of the MindsDB handler
PARAMETERS = {
"protocol": " ", --- protocol used to query Databend (defaults to `native` if left blank); supported protocols: native, http, https
"user": " ", --- username used to authenticate with the Databend warehouse
"port": , --- TCP/IP port of the Databend warehouse
"password": " ", --- password used to authenticate with the Databend warehouse
"host": " ", --- host name or IP address of the Databend warehouse (use '127.0.0.1' instead of 'localhost' when connecting to a local server)
"database": " " --- database name used when connecting to the Databend warehouse
};
CREATE DATABASE databricks_datasource --- display name for the database
WITH ENGINE = 'databricks', --- name of the MindsDB handler
PARAMETERS = {
"server_hostname": " ", --- server hostname of the cluster or SQL warehouse
"http_path": " ", --- http path to the cluster or SQL warehouse
"access_token": " ", --- personal Databricks access token
"schema": " ", --- schema name (defaults to `default` if left blank)
"session_configuration": " ", --- optional, dictionary of Spark session configuration parameters
"http_headers": " ", --- optional, additional (key, value) pairs to set in HTTP headers on every RPC request the client makes
"catalog": " " --- catalog (defaults to `hive_metastore` if left blank)
};
CREATE DATABASE datastax_datasource --- display name for the database
WITH ENGINE = 'astra', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- user to be authenticated
"password": " ", --- password for authentication
"secure_connection_bundle": { --- secure connection bundle zip file
"path": " " --- either "path" or "url"
},
"host": " ", --- optional, host name or IP address
"port": , --- optional, port used to make TCP/IP connection
"protocol_version": , --- optional, protocol version
"keyspace": " " --- optional, keyspace
};
CREATE DATABASE duckdb_datasource --- display name for the database
WITH ENGINE = 'duckdb', --- name of the MindsDB handler
PARAMETERS = {
"database": " ", --- database file name
"read_only": --- flag used to set the connection to read-only mode
};
CREATE DATABASE elastic_datasource --- display name for the database
WITH ENGINE = 'elasticsearch', --- name of the MindsDB handler
PARAMETERS = {
"hosts": " ", --- one or more host names or IP addresses of the Elasticsearch server
"username": " ", --- optional, username to authenticate with the Elasticsearch server
"password": " ", --- optional, password used to authenticate with the Elasticsearch server
"cloud_id": " " --- optional, unique ID of your hosted Elasticsearch cluster (must be provided when "hosts" is left blank)
};
CREATE DATABASE firebird_datasource --- display name for the database
WITH ENGINE = 'firebird', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address of the Firebird server
"database": " ", --- database name
"user": " ", --- user to authenticate with the Firebird server
"password": " " --- password used to authenticate with the Firebird server
};
CREATE DATABASE bigquery_datasource --- display name for the database
WITH ENGINE = 'bigquery', --- name of the MindsDB handler
PARAMETERS = {
"project_id": " ", --- globally unique project identifier
"dataset": " ", --- default dataset
"service_account_keys": " ", --- service account keys file
"service_account_json": {...} --- it is an alternative to using 'service_account_keys'
};
CREATE DATABASE sheets_datasource --- display name for the database
WITH ENGINE = 'sheets', --- name of the MindsDB handler
PARAMETERS = {
"spreadsheet_id": " ", --- unique ID of the Google Sheet
"sheet_name": " " --- name of the Google Sheet
};
CREATE DATABASE db2_datasource --- display name for the database
WITH ENGINE = 'DB2', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"schema_name": " " --- database schema name
};
CREATE DATABASE informix_datasource --- display name for the database
WITH ENGINE = 'informix', --- name of the MindsDB handler
PARAMETERS = {
"server": " ", --- server name
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"schema_name": " ", --- database schema name
"logging_enabled": --- indicates whether logging is enabled (defaults to `True` if left blank)
};
CREATE DATABASE maria_datasource --- display name for the database
WITH ENGINE = 'mariadb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host IP address or URL
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl_ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"ssl_cert": { --- optional, SSL certificates
"url": " " --- either "path" or "url"
},
"ssl_key": { --- optional, SSL keys
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE skysql --- display name for the database
WITH ENGINE = 'mariadb', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host IP address or URL
"port": , --- port used to make TCP/IP connection
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl-ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"database": " " --- database name
};
CREATE DATABASE matrixone_datasource --- display name for the database
WITH ENGINE = 'matrixone', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host IP address or URL
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl_ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"ssl_cert": { --- optional, SSL certificates
"url": " " --- either "path" or "url"
},
"ssl_key": { --- optional, SSL keys
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE access_datasource --- display name for the database
WITH ENGINE = 'access', --- name of the MindsDB handler
PARAMETERS = {
"db_file": " " --- path to the database file to be used
};
CREATE DATABASE mssql_datasource --- display name for the database
WITH ENGINE = 'mssql', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " " --- database password
};
CREATE DATABASE monetdb_datasource --- display name for the database
WITH ENGINE = 'monetdb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"schema_name": " " --- database schema name (defaults to the current schema if left blank)
};
CREATE DATABASE mongo_datasource --- display name for the database
WITH ENGINE = 'mongo', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- database user
"password": " " --- database password
"database": " " --- database name
};
CREATE DATABASE mysql_datasource --- display name for the database
WITH ENGINE = 'mysql', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl_ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"ssl_cert": { --- optional, SSL certificates
"url": " " --- either "path" or "url"
},
"ssl_key": { --- optional, SSL keys
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE oceanbase_datasource --- display name for the database
WITH ENGINE = 'oceanbase', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"user": " ", --- database user
"password": " ", --- database password
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
};
CREATE DATABASE opengauss_datasource --- display name for the database
WITH ENGINE = 'opengauss', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
};
CREATE DATABASE oracle_datasource --- display name for the database
WITH ENGINE = 'oracle', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"sid": " ", --- unique identifier of the database instance
"user": " ", --- database user
"password": " " --- database password
};
CREATE DATABASE orioledb_datasource --- display name for the database
WITH ENGINE = 'orioledb', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"server": " ", --- sets the current server
"database": " " --- sets the current database
};
CREATE DATABASE planetscale_datasource --- display name for the database
WITH ENGINE = 'planet_scale', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- database user
"password": " ", --- database password
"database": " " --- database name
};
CREATE DATABASE psql_datasource --- display name for the database
WITH ENGINE = 'postgres', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " " --- database password
};
CREATE DATABASE questdb_datasource --- display name for the database
WITH ENGINE = 'questdb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"public": --- value of `True` or `False` (defaults to `True` if left blank)
};
CREATE DATABASE sap_hana_datasource --- display name for the database
WITH ENGINE = 'hana', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- user
"password": " ", --- password
"schema": " ", --- database schema name (defaults to the current schema if left blank)
"encrypt": --- indicates whether connection is encrypted (required for cloud usage)
};
CREATE DATABASE scylladb_datasource --- display name for the database
WITH ENGINE = 'scylladb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"user": " ", --- user
"password": " ", --- password
"protocol_version": , --- optional, protocol version (defaults to 4 if left blank)
"keyspace": " ", --- keyspace name (it is the top level container for tables)
"secure_connect_bundle": { --- secure connect bundle file
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE singlestore_datasource --- display name for the database
WITH ENGINE = 'singlestore', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"ssl": , --- optional, the `ssl` parameter value indicates whether SSL is enabled (`True`) or disabled (`False`)
"ssl_ca": { --- optional, SSL Certificate Authority
"path": " " --- either "path" or "url"
},
"ssl_cert": { --- optional, SSL certificates
"url": " " --- either "path" or "url"
},
"ssl_key": { --- optional, SSL keys
"path": " " --- either "path" or "url"
}
};
CREATE DATABASE snowflake_datasource --- display name for the database
WITH ENGINE = 'snowflake', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"account": " ", --- the Snowflake account
"schema": " ", --- schema name (defaults to `public` if left blank)
"protocol": " ", --- protocol (defaults to `https` if left blank)
"warehouse": " " --- the warehouse account
};
CREATE DATABASE sqlany_datasource --- display name for the database
WITH ENGINE = 'sqlany', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- username
"password": " ", --- password
"host": " ", --- host name or IP address of the SAP SQL Anywhere instance
"port": , --- port number of the SAP SQL Anywhere instance
"server": " ", --- sets the current server
"database": " " --- sets the current database
};
CREATE DATABASE sqlite_datasource --- display name for the database
WITH ENGINE = 'sqlite', --- name of the MindsDB handler
PARAMETERS = {
"db_file": " " --- path to the database file to be used
};
CREATE DATABASE starrocks_datasource --- display name for the database
WITH ENGINE = 'starrocks', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"user": " ", --- database user
"password": " ", --- database password
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
};
CREATE DATABASE supabase_datasource --- display name for the database
WITH ENGINE = 'supabase', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
};
CREATE DATABASE tdengine_datasource --- display name for the database
WITH ENGINE = 'tdengine', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- server username
"password": " ", --- server password
"url": " ", --- URL to the TDEngine server (for local server, it is localhost:6041 by default)
"token": " ", --- unique token provided when using TDEngine Cloud
"database": " " --- database name
};
CREATE DATABASE teradata_datasource --- display name for the database
WITH ENGINE = 'teradata', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"user": " ", --- database user
"password": " ", --- database password
"database": " ", --- database name
"port": --- port used to make TCP/IP connection
};
CREATE DATABASE tidb_datasource --- display name for the database
WITH ENGINE = 'tidb', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
};
CREATE DATABASE timescaledb_datasource --- display name for the database
WITH ENGINE = 'timescaledb', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
};
CREATE DATABASE trino_datasource --- display name for the database
WITH ENGINE = 'trino', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"auth": " ", --- optional, authentication method, currently only `basic` is supported
"http_scheme": " ", --- optional, `http`(default) or `https`
"user": " ", --- database user
"password": " ", --- database password
"catalog": " ", --- optional, catalog
"schema": " " --- optional, schema
"with": --- optional, default WITH-clause (properties) for ALL tables
--- this parameter is experimental and might be changed or removed in future release
};
CREATE DATABASE vertica_datasource --- display name for the database
WITH ENGINE = 'vertica', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " ", --- database name
"user": " ", --- database user
"password": " ", --- database password
"schema_name": " " --- database schema name
};
CREATE DATABASE vitess_datasource --- display name for the database
WITH ENGINE = 'vitess', --- name of the MindsDB handler
PARAMETERS = {
"host": " ", --- host name or IP address
"user": " ", --- database user
"password": " ", --- database password
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
};
CREATE DATABASE yugabyte_datasource --- display name for the database
WITH ENGINE = 'yugabyte', --- name of the MindsDB handler
PARAMETERS = {
"user": " ", --- database user
"password": " ", --- database password
"host": " ", --- host name or IP address
"port": , --- port used to make TCP/IP connection
"database": " " --- database name
"schema": " " --- schema name, if multiple schemas then comma separated
};