diff --git a/spiceaidocs/docs/components/data-connectors/odbc.md b/spiceaidocs/docs/components/data-connectors/odbc.md index 3cb194f4..e8c606bc 100644 --- a/spiceaidocs/docs/components/data-connectors/odbc.md +++ b/spiceaidocs/docs/components/data-connectors/odbc.md @@ -52,6 +52,35 @@ For the best `JOIN` performance, ensure all ODBC datasets from the same database ::: +## ODBC Connection String + +The ODBC connection string requires the use of an installed and registered driver based on your system type: + +- Unix systems; ODBC driver installations can be managed using [unixODBC](https://www.unixodbc.org/), or directly edited through `/etc/odbc.ini` or `/etc/odbcinst.ini`. For example, in the [Databricks DSN Connection Setup Guide](https://docs.databricks.com/en/integrations/odbc/dsn.html#linux) for Linux. +- Windows systems; ODBC driver installations are managed using the [ODBC Data Source Administrator](https://support.microsoft.com/en-au/office/administer-odbc-data-sources-b19f856b-5b9b-48c9-8b93-07484bfab5a7). + +For an example Unix system with an installed PostgreSQL driver where the contents of `/etc/odbcinst.ini` is: + +```ini +[PostgreSQL Unicode] +Description=PostgreSQL ODBC driver (Unicode version) +Driver=psqlodbcw.so +Setup=libodbcpsqlS.so +Debug=0 +CommLog=1 +UsageCount=1 +``` + +The Spice Runtime can use this driver installation where `Driver={PostgreSQL Unicode}` is used in the connection string, like: + +```yaml +datasets: + - from: odbc:my_table + name: my_dataset + params: + odbc_connection_string: Driver={PostgreSQL Unicode};Server=localhost;Port=5432;Database=postgres;Uid=myuser;Pwd=mypass +``` + ## Configuration In addition to the connection string, the following [arrow_odbc builder parameters](https://docs.rs/arrow-odbc/latest/arrow_odbc/struct.OdbcReaderBuilder.html) are exposed as params: diff --git a/spiceaidocs/docs/components/secret-stores/env/index.md b/spiceaidocs/docs/components/secret-stores/env/index.md index 9a553291..ec4e5e40 100644 --- a/spiceaidocs/docs/components/secret-stores/env/index.md +++ b/spiceaidocs/docs/components/secret-stores/env/index.md @@ -67,12 +67,24 @@ MY_PG_PASSWORD=postgres ### Additional Parameters -To load environment variables from a specific `.env` file, use the `file_path` parameter. When using specific environment variable file using `file_path` environment variables from the default `.env` or `.env.local` files will not be loaded. +To load environment variables from a specific `.env` file, use the `file_path` parameter. When a `file_path` parameter is specified, environment variables from `.env` or `.env.local` will not be loaded. ```yaml secrets: - from: env name: env params: - file_path: /custom/path/to/.env -``` \ No newline at end of file + file_path: ./custom/path/to/.env +``` + +To continue loading `.env` or `.env.local`, specify them as additional secret stores: + +```yaml +secrets: + - from: env + name: env + - from: env + name: env + params: + file_path: ./custom/path/to/.env +``` diff --git a/spiceaidocs/docs/components/secret-stores/index.md b/spiceaidocs/docs/components/secret-stores/index.md index 22803708..491b3f21 100644 --- a/spiceaidocs/docs/components/secret-stores/index.md +++ b/spiceaidocs/docs/components/secret-stores/index.md @@ -30,6 +30,7 @@ The Secret Store type and name are specified using the `from` and `name` fields. Additional parameters may be specified in the `params` field, which are typically specific to the secret store type. Example: + ```yaml secrets: - from: kubernetes:my_secret @@ -43,6 +44,7 @@ secrets: Secrets may be used by components with the syntax `${:}`. For example, to reference a secret stored as an environment variable named `MY_SECRET` in the `env` secret store, use `${env:MY_SECRET}`. Example: + ```yaml datasets: - from: postgres:my_table @@ -67,6 +69,7 @@ datasets: The `` value in `${:}` is the `name` value defined in the secret store configuration. This can be renamed to any value. Example: + ```yaml secrets: - from: env @@ -91,6 +94,7 @@ Spice supports configuring multiple secret stores which are loaded in the order To load a secret from any of the configured secret stores in precedence order, use the `${secrets:}` syntax. Example: + ```yaml secrets: - from: env