Skip to content

Commit

Permalink
update broken links (#4818)
Browse files Browse the repository at this point in the history
quickly reviewing some broken links and updating them per this thread
[here](https://dbt-labs.slack.com/archives/C03SK9W08BC/p1704473024350309).

materialization and other source codes have moved. this pr updates and
replaces github links that started with:
- `https://github.com/dbt-labs/dbt-core/tree/main/core/dbt/adapters/..`
- `https://github.com/dbt-labs/dbt-core/blob/main/core/dbt..`

and replaced it with the permalinks per convo.i did a quick scan to see
if there were any other files to update and i didn't see any more.
  • Loading branch information
mirnawong1 authored Jan 30, 2024
2 parents b4b3590 + 772acba commit 454385d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion website/docs/guides/create-new-materializations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ recently_updated: true

## Introduction

The model <Term id="materialization">materializations</Term> you're familiar with, `table`, `view`, and `incremental` are implemented as macros in a package that's distributed along with dbt. You can check out the [source code for these materializations](https://github.com/dbt-labs/dbt-core/tree/main/core/dbt/adapters/include/global_project/macros/materializations). If you need to create your own materializations, reading these files is a good place to start. Continue reading below for a deep-dive into dbt materializations.
The model <Term id="materialization">materializations</Term> you're familiar with, `table`, `view`, and `incremental` are implemented as macros in a package that's distributed along with dbt. You can check out the [source code for these materializations](https://github.com/dbt-labs/dbt-adapters/tree/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/materializations). If you need to create your own materializations, reading these files is a good place to start. Continue reading below for a deep-dive into dbt materializations.

:::caution

Expand Down
6 changes: 3 additions & 3 deletions website/docs/guides/debug-schema-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ recently_updated: true

## Introduction

If a model uses the [`schema` config](/reference/resource-properties/schema) but builds under an unexpected schema, here are some steps for debugging the issue. The full explanation on custom schemas can be found [here](/docs/build/custom-schemas).
If a model uses the [`schema` config](/reference/resource-properties/schema) but builds under an unexpected schema, here are some steps for debugging the issue. The full explanation of custom schemas can be found [here](/docs/build/custom-schemas).


You can also follow along via this video:
Expand All @@ -25,7 +25,7 @@ You can also follow along via this video:
Do a file search to check if you have a macro named `generate_schema_name` in the `macros` directory of your project.

### You do not have a macro named `generate_schema_name` in your project
This means that you are using dbt's default implementation of the macro, as defined [here](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql#L47C1-L60)
This means that you are using dbt's default implementation of the macro, as defined [here](https://github.com/dbt-labs/dbt-adapters/blob/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql)

```sql
{% macro generate_schema_name(custom_schema_name, node) -%}
Expand Down Expand Up @@ -53,7 +53,7 @@ If your `generate_schema_name` macro looks like so:
{{ generate_schema_name_for_env(custom_schema_name, node) }}
{%- endmacro %}
```
Your project is switching out the `generate_schema_name` macro for another macro, `generate_schema_name_for_env`. Similar to the above example, this is a macro which is defined in dbt's global project, [here](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql#L47-L60).
Your project is switching out the `generate_schema_name` macro for another macro, `generate_schema_name_for_env`. Similar to the above example, this is a macro which is defined in dbt's global project, [here](https://github.com/dbt-labs/dbt-adapters/blob/main/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql).
```sql
{% macro generate_schema_name_for_env(custom_schema_name, node) -%}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/events-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _For more details about how the eventing system has been implemented in dbt-core

<VersionBlock firstVersion="1.4">

Starting in v1.4, the structure of each event in `dbt-core` is backed by a schema defined using [protocol buffers](https://developers.google.com/protocol-buffers). All schemas are defined in the [`types.proto`](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/events/types.proto) file within the `dbt-core` codebase.
Starting in v1.4, the structure of each event in `dbt-core` is backed by a schema defined using [protocol buffers](https://developers.google.com/protocol-buffers). All schemas are defined in the [`types.proto`](https://github.com/dbt-labs/dbt-core/blob/3bf148c443e6b1da394b62e88a08f1d7f1d8ccaa/core/dbt/events/core_types.proto) file within the `dbt-core` codebase.

Every event has the same two top-level keys:
- `info`: Information common to all events. See the table below for the breakdown.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/resource-configs/full_refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Optionally set a resource to always or never full-refresh.

</VersionBlock>

This logic is encoded in the [`should_full_refresh()`](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/adapters/include/global_project/macros/materializations/configs.sql#L6) macro.
This logic is encoded in the [`should_full_refresh()`](https://github.com/dbt-labs/dbt-adapters/blob/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/materializations/configs.sql) macro.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/resource-configs/store_failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Optionally set a test to always or never store its failures in the database.
- If the `store_failures` config is `none` or omitted, the resource will use the value of the `--store-failures` flag.
- When true, `store_failures` save all the record(s) that failed the test only if [limit](/reference/resource-configs/limit) is not set or if there are fewer records than the limit. `store_failures` are saved in a new table with the name of the test. By default, `store_failures` use a schema named `dbt_test__audit`, but, you can [configure](/reference/resource-configs/schema#tests) the schema to a different value.

This logic is encoded in the [`should_store_failures()`](https://github.com/dbt-labs/dbt-core/blob/77632122974b28967221758b4a470d7dfb608ac2/core/dbt/adapters/include/global_project/macros/materializations/configs.sql#L15) macro.
This logic is encoded in the [`should_store_failures()`](https://github.com/dbt-labs/dbt-adapters/blob/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/materializations/configs.sql#L15) macro.



Expand Down
4 changes: 2 additions & 2 deletions website/docs/reference/resource-configs/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ This is a **required configuration**. There is no default value.

### Advanced: define and use custom snapshot strategy
Behind the scenes, snapshot strategies are implemented as macros, named `snapshot_<strategy>_strategy`
* [Source code](https://github.com/dbt-labs/dbt-core/blob/HEAD/core/dbt/adapters/include/global_project/macros/materializations/snapshots/strategies.sql#L52) for the timestamp strategy
* [Source code](https://github.com/dbt-labs/dbt-core/blob/HEAD/core/dbt/adapters/include/global_project/macros/materializations/snapshots/strategies.sql#L136) for the check strategy
* [Source code](https://github.com/dbt-labs/dbt-adapters/blob/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/materializations/snapshots/strategies.sql#L52) for the timestamp strategy
* [Source code](https://github.com/dbt-labs/dbt-adapters/blob/60005a0a2bd33b61cb65a591bc1604b1b3fd25d5/dbt/include/global_project/macros/materializations/snapshots/strategies.sql#L136) for the check strategy

It's possible to implement your own snapshot strategy by adding a macro with the same naming pattern to your project. For example, you might choose to create a strategy which records hard deletes, named `timestamp_with_deletes`.

Expand Down

0 comments on commit 454385d

Please sign in to comment.