Skip to content

Commit

Permalink
resovle
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Dec 11, 2024
2 parents e2ccfb3 + 359ed5e commit f1c4a10
Show file tree
Hide file tree
Showing 11 changed files with 207 additions and 28 deletions.
15 changes: 3 additions & 12 deletions website/docs/docs/cloud/git/connect-gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Connecting your GitLab account to dbt Cloud provides convenience and another lay
- Clone repos using HTTPS rather than SSH.
- Carry GitLab user permissions through to dbt Cloud or dbt Cloud CLI's git actions.
- Trigger [Continuous integration](/docs/deploy/continuous-integration) builds when merge requests are opened in GitLab.
- GitLab automatically registers a webhook in your GitLab repository to enable seamless integration with dbt Cloud.

The steps to integrate GitLab in dbt Cloud depend on your plan. If you are on:
- the Developer or Team plan, read these [instructions](#for-dbt-cloud-developer-and-team-tiers).
Expand Down Expand Up @@ -114,20 +115,10 @@ If your GitLab account is not connected, you’ll see "No connected account". Se

Once you approve authorization, you will be redirected to dbt Cloud, and you should see your connected account. You're now ready to start developing in the dbt Cloud IDE or dbt Cloud CLI.


## Troubleshooting

### Errors when importing a repository on dbt Cloud project set up
If you do not see your repository listed, double-check that:
- Your repository is in a Gitlab group you have access to. dbt Cloud will not read repos associated with a user.

If you do see your repository listed, but are unable to import the repository successfully, double-check that:
- You are a maintainer of that repository. Only users with maintainer permissions can set up repository connections.

If you imported a repository using the dbt Cloud native integration with GitLab, you should be able to see the clone strategy is using a `deploy_token`. If it's relying on an SSH key, this means the repository was not set up using the native GitLab integration, but rather using the generic git clone option. The repository must be reconnected in order to get the benefits described above.

## FAQs

<FAQ path="Troubleshooting/gitlab-webhook"/>
<FAQ path="Troubleshooting/error-importing-repo"/>
<FAQ path="Git/gitignore"/>
<FAQ path="Git/gitlab-authentication"/>
<FAQ path="Git/gitlab-selfhosted"/>
Expand Down
1 change: 1 addition & 0 deletions website/docs/docs/dbt-versions/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo
+tags: order_metrics
```
</File>
- **Fix**: [The dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl) now respects the BigQuery [`execution_project` attribute](/docs/core/connect-data-platform/bigquery-setup#execution-project), including for exports.
- **New**: [Model notifications](/docs/deploy/model-notifications) are now generally available in dbt Cloud. These notifications alert model owners through email about any issues encountered by models and tests as soon as they occur while running a job.
- **New**: You can now use your [Azure OpenAI key](/docs/cloud/account-integrations?ai-integration=azure#ai-integrations) (available in beta) to use dbt Cloud features like [dbt Copilot](/docs/cloud/dbt-copilot) and [Ask dbt](/docs/cloud-integrations/snowflake-native-app) . Additionally, you can use your own [OpenAI API key](/docs/cloud/account-integrations?ai-integration=openai#ai-integrations) or use [dbt Labs-managed OpenAI](/docs/cloud/account-integrations?ai-integration=dbtlabs#ai-integrations) key. Refer to [AI integrations](/docs/cloud/account-integrations#ai-integrations) for more information.
- **New**: The [`hard_deletes`](/reference/resource-configs/hard-deletes) config gives you more control on how to handle deleted rows from the source. Supported options are `ignore` (default), `invalidate` (replaces the legacy `invalidate_hard_deletes=true`), and `new_record`. Note that `new_record` will create a new metadata column in the snapshot table.
Expand Down
3 changes: 3 additions & 0 deletions website/docs/docs/deploy/ci-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ To validate _all_ semantic nodes in your project, add the following command to d

## Troubleshooting

<FAQ path="Troubleshooting/gitlab-webhook"/>

<DetailsToggle alt_header="Temporary schemas aren't dropping">
If your temporary schemas aren't dropping after a PR merges or closes, this typically indicates one of these issues:
- You have overridden the <code>generate_schema_name</code> macro and it isn't using <code>dbt_cloud_pr_</code> as the prefix.
Expand All @@ -201,6 +203,7 @@ A macro is creating a schema but there are no dbt models writing to that schema.

</DetailsToggle>


<DetailsToggle alt_header="Error messages that refer to schemas from previous PRs">

If you receive a schema-related error message referencing a <i>previous</i> PR, this is usually an indicator that you are not using a production job for your deferral and are instead using <i>self</i>. If the prior PR has already been merged, the prior PR's schema may have been dropped by the time the CI job for the current PR is kicked off.
Expand Down
20 changes: 15 additions & 5 deletions website/docs/docs/get-started-dbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pagination_next: null
pagination_prev: null
---

Begin your dbt journey by trying one of our quickstarts, which provides a step-by-step guide to help you set up dbt Cloud or dbt Core with a [variety of data platforms](/docs/cloud/connect-data-platform/about-connections).
Begin your dbt journey by trying one of our quickstarts, which provides a step-by-step guide to help you set up [dbt Cloud](#dbt-cloud) or [dbt Core](#dbt-core) with a [variety of data platforms](/docs/cloud/connect-data-platform/about-connections).

## dbt Cloud

Expand Down Expand Up @@ -76,13 +76,23 @@ Learn more about [dbt Cloud features](/docs/cloud/about-cloud/dbt-cloud-feature

[dbt Core](/docs/core/about-core-setup) is a command-line [open-source tool](https://github.com/dbt-labs/dbt-core) that enables data practitioners to transform data using analytics engineering best practices. It suits individuals and small technical teams who prefer manual setup and customization, supports community adapters, and open-source standards.

Refer to the following quickstarts to get started with dbt Core:
<div className="grid--3-col">

<Card
title="dbt Core from a manual install"
body="Learn how to install dbt Core and set up a project."
link="https://docs.getdbt.com/guides/manual-install"
icon="dbt-bit"/>

- [dbt Core from a manual install](/guides/manual-install) to learn how to install dbt Core and set up a project.
- [dbt Core using GitHub Codespace](/guides/codespace?step=1) to learn how to create a codespace and execute the `dbt build` command.
<Card
title="dbt Core using GitHub Codespace"
body="Learn how to create a codespace and execute the dbt build command."
link="https://docs.getdbt.com/guides/codespace?step=1"
icon="dbt-bit"/>
</div>

## Related docs
<!-- use as an op to link to other useful guides when the query params pr is merged -->

Expand your dbt knowledge and expertise with these additional resources:

- [Join the bi-weekly demos](https://www.getdbt.com/resources/webinars/dbt-cloud-demos-with-experts) to see dbt Cloud in action and ask questions.
Expand Down
14 changes: 14 additions & 0 deletions website/docs/faqs/Troubleshooting/error-importing-repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Errors importing a repository on dbt Cloud project set up
description: "Errors importing a repository on dbt Cloud project set up"
sidebar_label: 'Errors importing a repository on dbt Cloud project set up'
id: error-importing-repo
---

If you don't see your repository listed, double-check that:
- Your repository is in a Gitlab group you have access to. dbt Cloud will not read repos associated with a user.

If you do see your repository listed, but are unable to import the repository successfully, double-check that:
- You are a maintainer of that repository. Only users with maintainer permissions can set up repository connections.

If you imported a repository using the dbt Cloud native integration with GitLab, you should be able to see if the clone strategy is using a `deploy_token`. If it's relying on an SSH key, this means the repository was not set up using the native GitLab integration, but rather using the generic git clone option. The repository must be reconnected in order to get the benefits described above.
19 changes: 19 additions & 0 deletions website/docs/faqs/Troubleshooting/gitlab-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Unable to trigger a CI job with GitLab
description: "Unable to trigger a CI job"
sidebar_label: 'Unable to trigger a CI job'
id: gitlab-webhook
---

When you connect dbt Cloud to a GitLab repository, GitLab automatically registers a webhook in the background, viewable under the repository settings. This webhook is also used to trigger [CI jobs](/docs/deploy/ci-jobs) when you push to the repository.

If you're unable to trigger a CI job, this usually indicates that the webhook registration is missing or incorrect.

To resolve this issue, navigate to the repository settings in GitLab and view the webhook registrations by navigating to GitLab --> **Settings** --> **Webhooks**.

Some things to check:

- The webhook registration is enabled in GitLab.
- The webhook registration is configured with the correct URL and secret.

If you're still experiencing this issue, reach out to the Support team at [email protected] and we'll be happy to help!
2 changes: 1 addition & 1 deletion website/docs/guides/mesh-qs.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ To set a production environment:
6. Click **Test Connection** to confirm the deployment connection.
6. Click **Save** to create a production environment.

<Lightbox src="/img/docs/dbt-cloud/using-dbt-cloud/prod-settings.jpg" width="70%" title="Set your production environment as the default environment in your Environment Settings"/>
<Lightbox src="/img/docs/dbt-cloud/using-dbt-cloud/prod-settings-1.png" width="100%" title="Set your production environment as the default environment in your Environment Settings"/>


## Set up a foundational project
Expand Down
15 changes: 10 additions & 5 deletions website/docs/reference/model-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ models:
[+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): <materialization_name>
[+](/reference/resource-configs/plus-prefix)[sql_header](/reference/resource-configs/sql_header): <string>
[+](/reference/resource-configs/plus-prefix)[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail #only for materialized views on supported adapters
[+](/reference/resource-configs/plus-prefix)[unique_key](/reference/resource-configs/unique_key): <column_name_or_expression>

```


</File>

</TabItem>
Expand All @@ -57,6 +59,7 @@ models:
[materialized](/reference/resource-configs/materialized): <materialization_name>
[sql_header](/reference/resource-configs/sql_header): <string>
[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail #only for materialized views on supported adapters
[unique_key](/reference/resource-configs/unique_key): <column_name_or_expression>

```

Expand All @@ -69,12 +72,13 @@ models:

<File name='models/<model_name>.sql'>

```jinja
```sql

{{ config(
[materialized](/reference/resource-configs/materialized)="<materialization_name>",
[sql_header](/reference/resource-configs/sql_header)="<string>"
[on_configuration_change](/reference/resource-configs/on_configuration_change): apply | continue | fail #only for materialized views for supported adapters
[unique_key](/reference/resource-configs/unique_key)='column_name_or_expression'
) }}

```
Expand Down Expand Up @@ -212,7 +216,7 @@ models:
<VersionBlock lastVersion="1.8">
```jinja
```sql

{{ config(
[enabled](/reference/resource-configs/enabled)=true | false,
Expand All @@ -233,7 +237,7 @@ models:

<VersionBlock firstVersion="1.9">

```jinja
```sql

{{ config(
[enabled](/reference/resource-configs/enabled)=true | false,
Expand All @@ -246,8 +250,9 @@ models:
[persist_docs](/reference/resource-configs/persist_docs)={<dict>},
[meta](/reference/resource-configs/meta)={<dict>},
[grants](/reference/resource-configs/grants)={<dict>},
[contract](/reference/resource-configs/contract)={<dictionary>}
[event_time](/reference/resource-configs/event-time): my_time_field
[contract](/reference/resource-configs/contract)={<dictionary>},
[event_time](/reference/resource-configs/event-time)='my_time_field',

) }}

```
Expand Down
Loading

0 comments on commit f1c4a10

Please sign in to comment.