Skip to content

Commit

Permalink
Merge branch 'current' into mwong-add-visual-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Nov 11, 2024
2 parents 9bc218e + 32fd510 commit 658025a
Show file tree
Hide file tree
Showing 212 changed files with 68,805 additions and 1,434 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ To learn more about the writing conventions used in the dbt Labs docs, see the [
- [ ] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines.
- [ ] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines.
- [ ] I have added checklist item(s) to this list for anything anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."
- [ ] The content in this PR requires a dbt release note, so I added one to the [release notes page](https://docs.getdbt.com/docs/dbt-versions/dbt-cloud-release-notes).
<!--
PRE-RELEASE VERSION OF dbt (if so, uncomment):
- [ ] Add a note to the prerelease version [Migration Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,3 @@ You can click a link available in a Vercel bot PR comment to see and review your

Advisory:
- If you run into an `fatal error: 'vips/vips8' file not found` error when you run `npm install`, you may need to run `brew install vips`. Warning: this one will take a while -- go ahead and grab some coffee!

## Running the Cypress tests locally

Method 1: Utilizing the Cypress GUI
1. `cd` into the repo: `cd docs.getdbt.com`
2. `cd` into the `website` subdirectory: `cd website`
3. Install the required node packages: `npm install`
4. Run `npx cypress open` to open the Cypress GUI, and choose `E2E Testing` as the Testing Type, before finally selecting your browser and clicking `Start E2E testing in {broswer}`
5. Click on a test and watch it run!

Method 2: Running the Cypress E2E tests headlessly
1. `cd` into the repo: `cd docs.getdbt.com`
2. `cd` into the `website` subdirectory: `cd website`
3. Install the required node packages: `npm install`
4. Run `npx cypress run`
67 changes: 0 additions & 67 deletions contributing/developer-blog.md

This file was deleted.

2 changes: 1 addition & 1 deletion contributing/single-sourcing-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This component can be added directly to a markdown file in a similar way as othe
Both properties can be used together to set a range where the content should show. In the example below, this content will only show if the selected version is between **0.21** and **1.0**:

```markdown
<VersionBlock lastVersion="1.6">
<VersionBlock lastVersion="1.9">

Versioned content here

Expand Down
26 changes: 14 additions & 12 deletions styles/custom/UIElements.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# styles/custom/BoldUIElements.yml
extends: existence
message: "UI elements like '%s' should be bold."
level: warning
tokens:
# Match UI elements that are not bolded (i.e., not within **), but exclude those starting a sentence or following a list number
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSave\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSave as\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bCancel\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSubmit\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bEdit\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bAccount settings\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bProject details\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bProfile settings\b'
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bPersonal profile\b'
# Match UI elements that are not bolded (i.e., not within **)
- '(?<!\*\*)\bSave\b(?!\*\*)'
- '(?<!\*\*)\bSave as\b(?!\*\*)'
- '(?<!\*\*)\bCancel\b(?!\*\*)'
- '(?<!\*\*)\bSubmit\b(?!\*\*)'
- '(?<!\*\*)\bEdit\b(?!\*\*)'
- '(?<!\*\*)\bAccount settings\b(?!\*\*)'
- '(?<!\*\*)\bProject details\b(?!\*\*)'
- '(?<!\*\*)\bProfile settings\b(?!\*\*)'
- '(?<!\*\*)\bPersonal profile\b(?!\*\*)'
- '(?<!\*\*)\bIntegrations\b(?!\*\*)'
- '(?<!\*\*)\bNotification settings\b(?!\*\*)'

scope: raw # Ensure the rule is applied before formatting
scope:
- raw
2 changes: 1 addition & 1 deletion website/blog/2022-07-13-star-sql-love-letter.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ So what does this mean for the example from above? Instead of writing out all 55

```sql
select
{{ dbt_utils.star(from=ref('table_a'), except=['column_56'] }}
{{ dbt_utils.star(from=ref('table_a'), except=['column_56']) }}
from {{ ref('table_a') }}
```

Expand Down
145 changes: 3 additions & 142 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
exports.versions = [
{
version: "1.9.1",
version: "1.10",
customDisplay: "Cloud (Versionless)",
},
{
Expand All @@ -28,11 +28,7 @@ exports.versions = [
},
{
version: "1.7",
EOLDate: "2024-10-30",
},
{
version: "1.6",
EOLDate: "2024-07-31",
EOLDate: "2024-11-01",
},
];

Expand Down Expand Up @@ -66,134 +62,6 @@ exports.versionedPages = [
page: "reference/global-configs/indirect-selection",
firstVersion: "1.8",
},
{
page: "reference/resource-configs/store_failures_as",
firstVersion: "1.7",
},
{
page: "docs/build/build-metrics-intro",
firstVersion: "1.6",
},
{
page: "docs/build/sl-getting-started",
firstVersion: "1.6",
},
{
page: "docs/build/about-metricflow",
firstVersion: "1.6",
},
{
page: "docs/build/join-logic",
firstVersion: "1.6",
},
{
page: "docs/build/validation",
firstVersion: "1.6",
},
{
page: "docs/build/semantic-models",
firstVersion: "1.6",
},
{
page: "docs/build/group-by",
firstVersion: "1.6",
},
{
page: "docs/build/entities",
firstVersion: "1.6",
},
{
page: "docs/build/metrics-overview",
firstVersion: "1.6",
},
{
page: "docs/build/cumulative",
firstVersion: "1.6",
},
{
page: "docs/build/derived",
firstVersion: "1.6",
},
{
page: "docs/build/measure-proxy",
firstVersion: "1.6",
},
{
page: "docs/build/ratio",
firstVersion: "1.6",
},
{
page: "reference/commands/clone",
firstVersion: "1.6",
},
{
page: "docs/collaborate/govern/project-dependencies",
firstVersion: "1.6",
},
{
page: "reference/dbt-jinja-functions/thread_id",
firstVersion: "1.6",
},
{
page: "reference/resource-properties/deprecation_date",
firstVersion: "1.6",
},
{
page: "reference/commands/retry",
firstVersion: "1.6",
},
{
page: "docs/build/groups",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-contracts",
firstVersion: "1.5",
},
{
page: "reference/commands/show",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-access",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-versions",
firstVersion: "1.5",
},
{
page: "reference/programmatic-invocations",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/contract",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/group",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/access",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/constraints",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/latest_version",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/versions",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/on_configuration_change",
firstVersion: "1.6",
},
];

/**
Expand All @@ -206,12 +74,5 @@ exports.versionedPages = [
* @property {string} firstVersion The first version the category is visible in the sidebar
*/
exports.versionedCategories = [
{
category: "Model governance",
firstVersion: "1.5",
},
{
category: "Build your metrics",
firstVersion: "1.6",
},

];
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ measures:

## Reviewing our work

Our completed code will look like this, our first semantic model!
Our completed code will look like this, our first semantic model! Here are two examples showing different organizational approaches:

<Expandable alt_header="Co-located approach">

<File name="models/marts/orders.yml" />

Expand Down Expand Up @@ -288,6 +290,68 @@ semantic_models:
description: The total tax paid on each order.
agg: sum
```
</Expandable>

<Expandable alt_header="Parallel sub-folder approach">

<File name="models/semantic_models/sem_orders.yml" />

```yml
semantic_models:
- name: orders
defaults:
agg_time_dimension: ordered_at
description: |
Order fact table. This table is at the order grain with one row per order.
model: ref('stg_orders')
entities:
- name: order_id
type: primary
- name: location
type: foreign
expr: location_id
- name: customer
type: foreign
expr: customer_id
dimensions:
- name: ordered_at
expr: date_trunc('day', ordered_at)
# use date_trunc(ordered_at, DAY) if using BigQuery
type: time
type_params:
time_granularity: day
- name: is_large_order
type: categorical
expr: case when order_total > 50 then true else false end
measures:
- name: order_total
description: The total revenue for each order.
agg: sum
- name: order_count
description: The count of individual orders.
expr: 1
agg: sum
- name: tax_paid
description: The total tax paid on each order.
agg: sum
```
</Expandable>

As you can see, the content of the semantic model is identical in both approaches. The key differences are:

1. **File location**
- Co-located approach: `models/marts/orders.yml`
- Parallel sub-folder approach: `models/semantic_models/sem_orders.yml`

2. **File naming**
- Co-located approach: Uses the same name as the corresponding mart (`orders.yml`)
- Parallel sub-folder approach: Prefixes the file with `sem_` (`sem_orders.yml`)

Choose the approach that best fits your project structure and team preferences. The co-located approach is often simpler for new projects, while the parallel sub-folder approach can be clearer for migrating large existing projects to the Semantic Layer.

## Next steps

Expand Down
Loading

0 comments on commit 658025a

Please sign in to comment.