Skip to content

Commit

Permalink
Merge branch 'current' into wazi55/dbt-bq-doc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
wazi55 authored Oct 3, 2023
2 parents 02c7a0c + 144f599 commit f96daee
Show file tree
Hide file tree
Showing 47 changed files with 618 additions and 1,077 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/contribute-to-developer-blog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Contribute to the dbt Developer Blog
name: Propose a dbt Developer Blog idea
description: >
For proposing a new post on the dbt Developer Blog.
labels: ["content","developer blog"]
Expand Down
36 changes: 22 additions & 14 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Add/Remove Labels

on:
pull_request_target:
types: [ opened, closed ]
types: [ opened ]

jobs:
add_new_contributor_label:
Expand All @@ -15,24 +15,32 @@ jobs:
- uses: actions/github-script@v6
with:
script: |
const creator = context.payload.sender.login
const creator = context.payload.sender.login;
const opts = github.rest.issues.listForRepo.endpoint.merge({
...context.issue,
creator,
state: 'all'
})
const issues = await github.paginate(opts)
state: 'all',
});
const issues = await github.paginate(opts);
let isAlreadyContributor = false;
for (const issue of issues) {
if (issue.number === context.issue.number) {
continue
continue;
}
if (issue.pull_request) {
return // creator is already a contributor
if (issue.pull_request && issue.user.login === creator) {
isAlreadyContributor = true;
break;
}
}
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['new contributor']
})
if (!isAlreadyContributor) {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['new contributor'],
});
}
2 changes: 0 additions & 2 deletions netlify.toml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ date: 2020-07-01
is_featured: false
---

:::caution More up-to-date information available

Since this blog post was first published, many data platforms have added support for [materialized views](/blog/announcing-materialized-views), which are a superior way to achieve the goals outlined here. We recommend them over the below approach.


:::

Before I dive into how to create this, I have to say this. **You probably don’t need this**. I, along with my other Fishtown colleagues, have spent countless hours working with clients that ask for near-real-time streaming data. However, when we start digging into the project, it is often realized that the use case is not there. There are a variety of reasons why near real-time streaming is not a good fit. Two key ones are:

1. The source data isn’t updating frequently enough.
Expand Down
6 changes: 4 additions & 2 deletions website/docs/docs/build/hooks-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Read this tutorial to learn how to use hooks and operations when b
id: "hooks-operations"
---

import OnRunCommands from '/snippets/_onrunstart-onrunend-commands.md';

## Related documentation
* [pre-hook & post-hook](/reference/resource-configs/pre-hook-post-hook)
* [on-run-start & on-run-end](/reference/project-configs/on-run-start-on-run-end)
Expand Down Expand Up @@ -33,8 +35,8 @@ dbt provides hooks and operations so you can version control and execute these s
Hooks are snippets of SQL that are executed at different times:
* `pre-hook`: executed _before_ a model, seed or snapshot is built.
* `post-hook`: executed _after_ a model, seed or snapshot is built.
* `on-run-start`: executed at the _start_ of `dbt run`, `dbt test`, `dbt seed` or `dbt snapshot`
* `on-run-end`: executed at the _end_ of `dbt run`, `dbt test`, `dbt seed` or `dbt snapshot`
* `on-run-start`: executed at the _start_ of <OnRunCommands/>
* `on-run-end`: executed at the _end_ of <OnRunCommands/>

Hooks are a more-advanced capability that enable you to run custom SQL, and leverage database-specific actions, beyond what dbt makes available out-of-the-box with standard materializations and configurations.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/docs/build/sl-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Learn how to create your first semantic model and metric."
sidebar_label: Get started with MetricFlow
tags: [Metrics, Semantic Layer]
meta:
api_name: dbt Semantic Layer API
api_name: dbt Semantic Layer APIs
---

import InstallMetricFlow from '/snippets/_sl-install-metricflow.md';
Expand Down Expand Up @@ -34,7 +34,7 @@ However, to experience the power of the universal [dbt Semantic Layer](/docs/use

- Have an understanding of key concepts in [MetricFlow](/docs/build/about-metricflow), which powers the revamped dbt Semantic Layer.
- Have both your production and development environments running dbt version 1.6 or higher. Refer to [upgrade in dbt Cloud](/docs/dbt-versions/upgrade-core-in-cloud) for more info.
- Use Snowflake, BigQuery, Databricks, Redshift, or Postgres (CLI only. dbt Cloud support coming soon).
- Use Snowflake, BigQuery, Databricks, Redshift, or Postgres (Postgres available in the CLI only, dbt Cloud support coming soon).
- Create a successful run in the environment where you configure the Semantic Layer.
- **Note:** Semantic Layer currently supports the Deployment environment for querying. (_development querying experience coming soon_)
- Set up the [Semantic Layer API](/docs/dbt-cloud-apis/sl-api-overview) in the integrated tool to import metric definitions.
Expand Down Expand Up @@ -85,7 +85,7 @@ You can query your metrics in a JDBC-enabled tool or use existing first-class in

You must have a dbt Cloud Team or Enterprise [multi-tenant](/docs/cloud/about-cloud/regions-ip-addresses) deployment, hosted in North America. (Additional region support coming soon)

- <span>To learn how to use the JDBC API and what tools you can query it with, refer to the <a href="https://docs.getdbt.com/docs/dbt-cloud-apis/sl-api-overview" target="_self">{frontMatter.meta.api_name}</a></span>.<br />
- <span>To learn how to use the JDBC or GraphQL API and what tools you can query it with, refer to the <a href="https://docs.getdbt.com/docs/dbt-cloud-apis/sl-api-overview" target="_self">{frontMatter.meta.api_name}</a></span>.<br />

* To authenticate, you need to [generate a service token](/docs/dbt-cloud-apis/service-tokens) with Semantic Layer Only and Metadata Only permissions.
* Refer to the [SQL query syntax](/docs/dbt-cloud-apis/sl-jdbc#querying-the-api-for-metric-metadata) to query metrics using the API.
Expand Down
4 changes: 1 addition & 3 deletions website/docs/docs/cloud/manage-access/set-up-sso-okta.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dbt Cloud Enterprise supports single-sign on via Okta (using SAML). Currently su
* Just-in-time provisioning

This guide outlines the setup process for authenticating to dbt Cloud with Okta.
If you have any questions during the setup process, please contact support
([email protected]) for assistance.

## Configuration in Okta

Expand Down Expand Up @@ -63,7 +61,7 @@ Click **Next** to continue.

### Configure SAML Settings

The SAML Settings page configures how Okta and dbt Cloud communicate. You will want to use an [appropriate Access URL](/docs/cloud/about-cloud/regions-ip-addresses) for your region and plan. If you aren't sure which values you should use, please contact support ([email protected]).
The SAML Settings page configures how Okta and dbt Cloud communicate. You will want to use an [appropriate Access URL](/docs/cloud/about-cloud/regions-ip-addresses) for your region and plan.

To complete this section, you will need a _login slug_. This slug controls the
URL where users on your account can log into your application via Okta. Login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ provider to provide group membership information in user attribute called
You may use a restricted group attribute statement to limit the groups set
to dbt Cloud for each authenticated user. For example, if all of your dbt Cloud groups start
with `DBT_CLOUD_...`, you may optionally apply a filter like `Starts With: DBT_CLOUD_`.
Please contact support if you have any questions.
:::

### Collect integration secrets
Expand Down
3 changes: 2 additions & 1 deletion website/docs/docs/cloud/secure/about-privatelink.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dbt Labs has a worldwide network of regional VPCs. These VPCs are specifically u

dbt Cloud supports the following data platforms for use with the PrivateLink feature. Instructions for enabling PrivateLink for the various data platform providers are unique. The following guides will walk you through the necessary steps, including working with [dbt Support](https://docs.getdbt.com/community/resources/getting-help#dbt-cloud-support) to complete the connection in the dbt private network and setting up the endpoint in dbt Cloud.

- [Redshift](/docs/cloud/secure/redshift-privatelink)
- [Snowflake](/docs/cloud/secure/snowflake-privatelink)
- [Databricks](/docs/cloud/secure/databricks-privatelink)
- [Redshift](/docs/cloud/secure/redshift-privatelink)
- [Postgres](/docs/cloud/secure/postgres-privatelink)
2 changes: 1 addition & 1 deletion website/docs/docs/cloud/secure/ip-restrictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To add an IP to the allowlist, from the **IP Restrictions** page:
4. Select **Allow**
5. Add the ranges in the CIDR notation
- For example, 1.1.1.1/8
- You can add multiple ranges followed by commas
- You cannot add multiple ranges in the same rule. Instead, create a rule per CIDR range.
6. Click **Save**

Note that simply adding the IP Ranges will not enforce IP restrictions. For more information, see the section “Enabling Restrictions.”
Expand Down
76 changes: 76 additions & 0 deletions website/docs/docs/cloud/secure/postgres-privatelink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "Configure AWS PrivateLink for Postgres"
id: postgres-privatelink
description: "Configuring PrivateLink for Postgres"
sidebar_label: "PrivateLink for Postgres"
---

A Postgres database, hosted either in AWS or in a properly connected on-prem data center, can be accessed through a private network connection using AWS Interface-type PrivateLink. The type of Target Group connected to the Network Load Balancer (NLB) may vary based on the location and type of Postgres instance being connected, as explained in the following steps.

## Configuring Postgres interface-type PrivateLink

### 1. Provision AWS resources

Creating an Interface VPC PrivateLink connection requires creating multiple AWS resources in the account containing, or connected to, the Postgres instance:

- **Security Group (AWS hosted only)** &mdash; If you are connecting to an existing Postgres instance, this likely already exists, however, you may need to add or modify Security Group rules to accept traffic from the Network Load Balancer (NLB) created for this Endpoint Service.
- **Target Group** &mdash; The Target Group will be attached to the NLB to tell it where to route requests. There are various target types available for NLB Target Groups, so choose the one appropriate for your Postgres setup.

- Target Type:

- _[Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/)_ - **IP**

- Find the IP address of your RDS instance using a command line tool such as `nslookup <endpoint>` or `dig +short <endpoint>` with your RDS DNS endpoint

- _Note_: With RDS Multi-AZ failover capabilities the IP address of your RDS instance can change, at which point your Target Group would need to be updated. See [this AWS blog post](https://aws.amazon.com/blogs/database/access-amazon-rds-across-vpcs-using-aws-privatelink-and-network-load-balancer/) for more details and a possible solution.

- _On-prem Postgres server_ - **IP**

- Use the IP address of the on-prem Postgres server linked to AWS through AWS Direct Connect or a Site-to-Site VPN connection

- _Postgres on EC2_ - **Instance/ASG** (or **IP**)

- If your Postgres instance is hosted on EC2 the _instance_ Target Group type (or ideally [using the instance type to connect to an auto-scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)) can be used to attach the instance without needing a static IP address

- The IP type can also be used, with the understanding that the IP of the EC2 instance can change if the instance is relaunched for any reason

- Target Group protocol: **TCP**

- **Network Load Balancer (NLB)** &mdash; Requires creating a Listener that attaches to the newly created Target Group for port `5432`
- **VPC Endpoint Service** &mdash; Attach to the newly created NLB.
- Acceptance required (optional) &mdash; Requires you to [accept our connection request](https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html#accept-reject-connection-requests) after dbt creates the endpoint.

### 2. Grant dbt AWS account access to the VPC Endpoint Service

On the provisioned VPC endpoint service, click the **Allow principals** tab. Click **Allow principals** to grant access. Enter the ARN of the root user in the appropriate production AWS account and save your changes.

- Principal: `arn:aws:iam::346425330055:role/MTPL_Admin`

<Lightbox src="/img/docs/dbt-cloud/redshiftprivatelink5.png" width="70%" title="Enter ARN"/>

### 3. Obtain VPC Endpoint Service Name

Once the VPC Endpoint Service is provisioned, you can find the service name in the AWS console by navigating to **VPC****Endpoint Services** and selecting the appropriate endpoint service. You can copy the service name field value and include it in your communication to dbt Cloud support.

<Lightbox src="/img/docs/dbt-cloud/redshiftprivatelink6.png" width="70%" title="Get service name field value"/>

### 4. Add the required information to the template below, and submit your request to [dbt Support](https://docs.getdbt.com/community/resources/getting-help#dbt-cloud-support):
```
Subject: New Multi-Tenant PrivateLink Request
- Type: Postgres Interface-type
- VPC Endpoint Service Name:
- Postgres server AWS Region (e.g., us-east-1, eu-west-2):
- dbt Cloud multi-tenant environment (US, EMEA, AU):
```

dbt Labs will work on your behalf to complete the PrivateLink setup. Please allow 1-2 business days for this process to complete. Support will contact you when the endpoint is available.

## Create Connection in dbt Cloud

Once dbt Cloud support completes the configuration, you can start creating new connections using PrivateLink.

1. Navigate to **settings****Create new project** → select **PostgreSQL**
2. You will see two radio buttons: **Public** and **Private.** Select **Private**.
3. Select the private endpoint from the dropdown (this will automatically populate the hostname/account field).
4. Configure the remaining data platform details.
5. Test your connection and save it.
2 changes: 1 addition & 1 deletion website/docs/docs/cloud/secure/redshift-privatelink.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Creating an Interface VPC PrivateLink connection requires creating multiple AWS

On the provisioned VPC endpoint service, click the **Allow principals** tab. Click **Allow principals** to grant access. Enter the ARN of the root user in the appropriate production AWS account and save your changes.

- Principal: `arn:aws:iam::346425330055:root`
- Principal: `arn:aws:iam::346425330055:role/MTPL_Admin`

<Lightbox src="/img/docs/dbt-cloud/redshiftprivatelink5.png" title="Enter ARN"/>

Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/collaborate/git/managed-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ To set up a project with a managed repository:
6. Click **Create**.
<Lightbox src="/img/docs/dbt-cloud/cloud-configuring-dbt-cloud/managed-repo.png" title="Adding a managed repository"/>

dbt Cloud will host and manage this repository for you. If in the future you choose to host this repository yourself, you can contact support to have the contents of your repo transferred to you.
dbt Cloud will host and manage this repository for you. If in the future you choose to host this repository elsewhere, you can export the information from dbt Cloud at any time.

** We do not recommend using a managed repository in a production environment. You will not be able to use git features like pull requests which are part of our recommended version control best practices.
6 changes: 6 additions & 0 deletions website/docs/docs/collaborate/govern/project-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ description: "Reference public models across dbt projects"

:::caution Closed Beta - dbt Cloud Enterprise
"Project" dependencies and cross-project `ref` are features of dbt Cloud Enterprise, currently in Closed Beta. To access these features while they are in beta, please contact your account team at dbt Labs.

**Prerequisites:** In order to add project dependencies and resolve cross-project `ref`, you must:
- Have the feature enabled (speak to your account team)
- Use dbt v1.6 for **both** the upstream ("producer") project and the downstream ("consumer") project.
- Have a deployment environment in the upstream ("producer") project [that is set to be your production environment](/docs/deploy/deploy-environments#set-as-production-environment-beta)
- Have a successful run of the upstream ("producer") project
:::

For a long time, dbt has supported code reuse and extension by installing other projects as [packages](/docs/build/packages). When you install another project as a package, you are pulling in its full source code, and adding it to your own. This enables you to call macros and run models defined in that other project.
Expand Down
12 changes: 4 additions & 8 deletions website/docs/docs/dbt-cloud-apis/sl-api-overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Semantic Layer API"
title: "Semantic Layer APIs"
id: sl-api-overview
description: "Integrate and query using the Semantic Layer API."
description: "Integrate and query metrics and dimensions in downstream tools using the Semantic Layer APIs"
tags: [Semantic Layer, API]
hide_table_of_contents: true
---
Expand Down Expand Up @@ -36,24 +36,20 @@ product="dbt Semantic Layer"
plan="dbt Cloud Team and Enterprise"
instance="hosted in North America"
/>
<br /><br />

<div className="grid--2-col">
<div className="grid--3-col">

<Card
title="JDBC API"
body="Use a JDBC driver to query metrics and dimensions in downstream tools, while also providing standard metadata functionality."
link="/docs/dbt-cloud-apis/sl-jdbc"
icon="dbt-bit"/>

<!--
commenting out until it's available
<Card
title="GraphQL API"
body="Use GraphQL to query metrics in downstream tools."
body="Use GraphQL to query metrics and dimensions in downstream tools."
link="/docs/dbt-cloud-apis/sl-graphql"
icon="dbt-bit"/>
-->

<Card
title="Semantic manifest"
Expand Down
Loading

0 comments on commit f96daee

Please sign in to comment.