diff --git a/docs/cloud/onboarding/configure-user.mdx b/docs/cloud/onboarding/configure-user.mdx new file mode 100644 index 000000000..ffaef5ad7 --- /dev/null +++ b/docs/cloud/onboarding/configure-user.mdx @@ -0,0 +1,19 @@ +--- +title: "Configure Elementary user" +sidebarTitle: "2. Configure user" +--- + +To run Elementary cloud, you will need to provide connection info to a user with access to your elementary schema. +You can configure the user by yourself, or use [our guild](/cloud/onboarding/create-data-warehouse-user/create-data-warehouse-user) to create the user automatically. + +### Permissions and security + +**Elementary cloud doesn't need permissions to your sensitive data.** + +It is recommended to create a read only user for the elementary schema only, and provide it to Elementary Cloud. +For more details, refer to [security and privacy](/cloud/security-and-privacy). + +### What's next? + +1. [Singup to Elementary cloud](/cloud/sonboarding/signup). +2. [Connect your Elementary schema to Elementary cloud](/cloud/onboarding/connect-data-warehouse). diff --git a/docs/cloud/onboarding/connect-data-warehouse.mdx b/docs/cloud/onboarding/connect-data-warehouse.mdx index c04ada506..cc6528ffa 100644 --- a/docs/cloud/onboarding/connect-data-warehouse.mdx +++ b/docs/cloud/onboarding/connect-data-warehouse.mdx @@ -7,15 +7,14 @@ You can connect Elementary to a data warehouse that has an Elementary schema (cr Elementary Cloud needs: -- [`profiles.yml`](/cloud/onboarding/create-profile) with connection details -- Read permissions to the Elementary schema (and not the rest of your data) +- [A user](/cloud/onboarding/configure-user) with permissions to the Elementary schema (and not the rest of your data) - Network access (might require to allowlist Elementary IP address) ### Connect Elementary cloud On the `Account settings` under `Integrations`, press `Connect` on the "Connect Your data warehouse" section. -Provide an environment name, select a data warehouse type, and upload the `profiles.yml` file with the `elementary` profile. +Provide an environment name, select a data warehouse type, and fill the required fields. ### Allowlist Elementary IP diff --git a/docs/cloud/onboarding/create-data-warehouse-user/create-data-warehouse-user.mdx b/docs/cloud/onboarding/create-data-warehouse-user/create-data-warehouse-user.mdx new file mode 100644 index 000000000..8ee294ba1 --- /dev/null +++ b/docs/cloud/onboarding/create-data-warehouse-user/create-data-warehouse-user.mdx @@ -0,0 +1,42 @@ +--- +title: "Create data warehouse user" +--- + +**Elementary cloud doesn't need permissions to your sensitive data.** + +It is recommended to create a read only user for the elementary schema only, and provide it to Elementary Cloud in the profile. + +This guild will walk you through the process of creating such a user. + +# Snowflake, Redshift, Postgres + +Run the following `dbt` command: + +```bash +dbt run-operation create_elementary_user +``` + +This command will generate a query to create a user with the necessary permissions. Run this query on your data warehouse to proceed. + +By default, the users name, password and role name (Snowflake) will be generated automatically, if you wish to overwrite them, you may use the following args: + +```bash +dbt run-operation create_elementary_user --args '{"name": "custom_elementary_user_name", "password": "MySuperDuperStrongPassword123", "role": "custom_elementary_role"}' +``` + +# BigQuery + +As BigQuery doesn't support creating users through SQL, you will need to create a service account manually. Follow these steps: + +- Create the service account ([docs](https://cloud.google.com/iam/docs/service-account-overview)). +- Grant it the `roles/bigquery.jobUser` role on the project ([docs](https://cloud.google.com/bigquery/docs/access-control#bigquery_iam_roles)). +- Grant is the `roles/bigquery.dataViewer` role on your elementary dataset (usually `_elementary`). +- Grant it the `roles/bigquery.metadataViewer` role on your dbt dataset. + +# Databricks + +As with BigQuery, Databricks doesn't support creating users through SQL, you will need to create a service principal manually, you may want to consult the [documentation](https://docs.databricks.com/administration-guide/users-groups/users.html). + +Create a service principal with the following permissions: + +- read on all the tables in your `elementary` schema (usually `_elementary`) diff --git a/docs/cloud/onboarding/create-profile.mdx b/docs/cloud/onboarding/create-profile.mdx deleted file mode 100644 index a17255277..000000000 --- a/docs/cloud/onboarding/create-profile.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: "Create `profiles.yml` file" -sidebarTitle: "2. Create profiles.yml" ---- - -You will need to provide Elementary cloud a `profiles.yml` file with a connection profile named `elementary`. - -- The profile needs to point at the database and schema name where your elementary tables are. -- The provided credentials need to have read permissions to the elementary schema. - -The easiest way to generate the profile is: - -1. Run the following command in the dbt project where elementary dbt package is deployed (works in dbt cloud as well): - -```shell -dbt run-operation elementary.generate_elementary_cli_profile -``` - -2. Copy and save the output to a `profiles.yml` file, update the missing details, and you are ready. - -### Permissions and security - -**Elementary cloud doesn't need permissions to your sensitive data.** - -It is recommended to create a read only user for the elementary schema only, and provide it to Elementary Cloud in the profile. -For more details, refer to [security and privacy](/cloud/security-and-privacy). - -### `profiles.yml` examples - -Here is the format of `profiles.yml` for each supported data warehouse: - - - -```yml Snowflake -## SNOWFLAKE ## -## Configure the database and schema of elementary models. - -elementary: - outputs: - default: - type: snowflake - account: [account id] - - ## User/password auth ## - user: [username] - password: [password] - - port: 5439 - role: [user role] - database: [database name] - warehouse: [warehouse name] - schema: [schema name]_elementary - threads: 4 - -``` - -```yml BigQuery -## BIGQUERY ## -## Configure the database and schema of elementary models. - -elementary: - outputs: - default: - type: bigquery - - ## Service account auth ## - method: service-account - keyfile: empty - - project: [project id] - dataset: [dataset name] # elementary dataset, usually [dataset name]_elementary - threads: 4 - location: [dataset location] - priority: interactive -``` - -```yml Redshift -## REDSHIFT ## -## Configure the database and schema of elementary models. - -elementary: - outputs: - default: - type: redshift - host: [hostname, like hostname.region.redshift.amazonaws.com] - - ## User/password auth ## - user: [username] - password: [password] - - dbname: [database name] - schema: [schema name] # elementary schema, usually [schema name]_elementary - threads: 4 -``` - -```yml Databricks -## DATABRICKS ## -## Configure the database and schema of elementary models. - -elementary: - outputs: - default: - type: databricks - host: [hostname, like .cloud.databricks.com] - http_path: [like /sql/1.0/endpoints/] - schema: [schema name] # elementary schema, usually [schema name]_elementary - token: [token] - threads: [number of threads like 8] -``` - -```yml Postgres -## POSTGRES ## -## Configure the database and schema of elementary models. - -elementary: - outputs: - default: - type: postgres - host: [hostname] - user: [username] - password: [password] - port: [port] - dbname: [database name] - schema: [schema name] # elementary schema, usually [schema name]_elementary - threads: [1 or more] -``` - - - -### What's next? - -1. [Singup to Elementary cloud](/cloud/sonboarding/signup). -2. [Connect your Elementary schema to Elementary cloud](/cloud/onboarding/connect-data-warehouse). diff --git a/docs/cloud/onboarding/quickstart-dbt-package.mdx b/docs/cloud/onboarding/quickstart-dbt-package.mdx index f5b7fb189..322eb13af 100644 --- a/docs/cloud/onboarding/quickstart-dbt-package.mdx +++ b/docs/cloud/onboarding/quickstart-dbt-package.mdx @@ -51,6 +51,6 @@ If you see data in these models you completed the package deployment (Congrats! ### What's next? -1. [Create a connection profile](/cloud/onboarding/create-profile). +1. [Configure a user for elementary](/cloud/onboarding/configure-user). 2. [Singup to Elementary cloud](/cloud/sonboarding/signup). 3. [Connect your Elementary schema to Elementary cloud](/cloud/onboarding/connect-data-warehouse). diff --git a/docs/mint.json b/docs/mint.json index 8b9f9da42..1f4c47ddc 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -218,13 +218,17 @@ }, { "group": "Elementary Cloud", - "pages": ["cloud/introduction", "cloud/general/security-and-privacy"] + "pages": [ + "cloud/introduction", + "cloud/general/security-and-privacy", + "cloud/onboarding/create-data-warehouse-user/create-data-warehouse-user" + ] }, { "group": "Getting Started", "pages": [ "cloud/onboarding/quickstart-dbt-package", - "cloud/onboarding/create-profile", + "cloud/onboarding/configure-user", "cloud/onboarding/signup", "cloud/onboarding/connect-data-warehouse", "cloud/manage-team"