Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update embeddable.md docs #21

Merged
merged 3 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)).
Loading