Skip to content

Commit

Permalink
Update embeddable.md docs (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: goodroot <[email protected]>
  • Loading branch information
eugeneoshepkov and goodroot authored Jul 18, 2024
1 parent 282bb3b commit 20a493d
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions third-party-tools/embeddable.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,16 @@ The above represents a `CREATE` action, but all `CRUD` operations are available.
The `apiKey` can be found by clicking “**Publish**” on one of your Embeddable
dashboards.

The `name` is a unique name to identify this **connection**.

- By default your **data models** will look for a **connection** called
“default”, but you can supply models with different
[**data_source**](https://cube.dev/docs/reference/data-model/cube#data_source)
names to support connecting different **data models** to different
**connections**. To do so , specify the
**[data_source](https://cube.dev/docs/reference/data-model/cube#data_source)**
name in the model.

The `type` tells Embeddable which driver to use, in this case `questdb`. You can
also connect multiple datasources like `postgres`, `bigquery` or `mongodb`. For
a full list, see
[the documentaiton](https://cube.dev/docs/product/configuration/data-sources).

The `credentials` is a javascript object containing the credentials expected by
the driver:

- Credentials are securely encrypted and only used to retrieve exactly the data
described in the data models.
- Emeddable strongly encourages you to create a **read-only** database user for
each connection. Embeddable will only ever read from your database, not write.

To support connecting to different databases for prod, qa, test, etc, or to
support different databases for different customers, you can assign each
**connection** to an **environment**. For more information, see
[Environments API](https://www.notion.so/Environments-API-497169036b5148b38f7936aa75e62949?pvs=21).
The `name` is a unique name to identify this connection.

- By default your data models will look for a connection called “default”, but you can supply your models with different `data_source` names to support connecting different data models to different connections (simply specify the data_source name in the model)

The `type` tells Embeddable which driver to use

- Here you'll want to use `questbd`, but you can connect multiple different datasources to one Embeddable workspace so you may use others such as: `postgres`, `bigquery`, `mongodb`, etc.

The `credentials` is a javascript object containing the necessary credentials expected by the driver
- These are securely encrypted and only used to retrieve exactly the data you have described in your data models.
- Embeddable strongly encourage you to create a read-only database user for each connection (Embeddable will only ever read from your database, not write).

In order to support connecting to different databases for prod, qa, test, etc (or to support different databases for different customers) you can assign each connection to an environment (see [Environments API](https://www.notion.so/Environments-API-497169036b5148b38f7936aa75e62949?pvs=21)).

0 comments on commit 20a493d

Please sign in to comment.