-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate 1.1 and changelog from docs (#4140)
## What are you changing in this pull request and why? Deprecating 1.1 from docs: - Removes 1.1 from versions dropdown - Marked 1.1 as deprecated in version table - Removes version blocks and content where lastVersion="1.1" - Removes version blocks but leaves content where firstVersion="1.1" - Removed page versioning restrictions Deprecating ChangeLogs - Most changelogs were for versions < 1.0 - removes <changelog> formatting from all pages - If content contained in changelog was not already present in the body of the doc, it has been added. Everything else was removed. - A few changelogs existed for more recent versions (1.2, 1.5) and were converted to versionblocks. ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) and [About versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) so my content adheres to these guidelines. - [x] Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."
- Loading branch information
Showing
85 changed files
with
64 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,127 +68,6 @@ You can use hooks to provide database-specific functionality not available out-o | |
</File> | ||
|
||
|
||
</VersionBlock> | ||
|
||
<VersionBlock lastVersion="1.1"> | ||
|
||
### Examples using hooks | ||
|
||
Here's a minimal example of using hooks to grant privileges. For more information, see [`on-run-start` & `on-run-end` hooks](/reference/project-configs/on-run-start-on-run-end) and [`pre-hook` & `post-hook`](/reference/resource-configs/pre-hook-post-hook) reference sections. | ||
|
||
<File name='dbt_project.yml'> | ||
|
||
```yml | ||
on-run-end: | ||
- "grant usage on {{ target.schema }} to role reporter" | ||
|
||
models: | ||
+post-hook: | ||
- "grant select on {{ this }} to role reporter" | ||
|
||
``` | ||
|
||
</File> | ||
|
||
You can also apply the `post-hook` to individual models using a `config` block: | ||
|
||
<File name='models/<model_name>.sql'> | ||
|
||
```sql | ||
{{ config( | ||
post_hook=[ | ||
"grant select on {{ this }} to role reporter" | ||
] | ||
) }} | ||
|
||
select ... | ||
|
||
``` | ||
|
||
</File> | ||
|
||
You should use database-specific syntax when appropriate: | ||
|
||
<WHCode> | ||
|
||
<div warehouse="BigQuery"> | ||
|
||
<File name='models/<model_name>.sql'> | ||
|
||
```sql | ||
{{ config( | ||
post_hook=[ | ||
'grant `roles/bigquery.dataViewer` on {{ this.type }} {{ this }} to "user:[email protected]"' | ||
] | ||
) }} | ||
|
||
select ... | ||
|
||
``` | ||
|
||
</File> | ||
|
||
</div> | ||
|
||
<div warehouse="Databricks"> | ||
|
||
<File name='models/<model_name>.sql'> | ||
|
||
```sql | ||
{{ config( | ||
post_hook=[ | ||
"grant select on {{ this }} to `[email protected]`" | ||
] | ||
) }} | ||
|
||
select ... | ||
|
||
``` | ||
|
||
</File> | ||
|
||
</div> | ||
|
||
<div warehouse="Redshift"> | ||
|
||
<File name='models/<model_name>.sql'> | ||
|
||
```sql | ||
{{ config( | ||
post_hook=[ | ||
"grant select on {{ this }} to reporter" | ||
] | ||
) }} | ||
|
||
select ... | ||
|
||
``` | ||
|
||
</File> | ||
|
||
</div> | ||
|
||
<div warehouse="Snowflake"> | ||
|
||
<File name='models/<model_name>.sql'> | ||
|
||
```sql | ||
{{ config( | ||
post_hook=[ | ||
"grant select on {{ this }} to role reporter" | ||
] | ||
) }} | ||
|
||
select ... | ||
|
||
``` | ||
|
||
</File> | ||
|
||
</div> | ||
|
||
</WHCode> | ||
|
||
</VersionBlock> | ||
|
||
### Calling a macro in a hook | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.