Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination for Snowflake objects #6445

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions website/docs/reference/resource-configs/snowflake-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,3 +678,27 @@ Per the [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/in
>- DDL operations.
>- DML operations (for tables only).
>- Background maintenance operations on metadata performed by Snowflake.

<VersionBlock firstVersion="1.9">

## Pagination for object results

By default, when dbt encounters a schema with up to 100k objects, it will paginate the results from `show objects` at 10k per page for up to 10 pages.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

Environments that have more than 100k objects in a schema can customize the number of results per page and the page limit with the following flags in the `dbt_project.yml`:
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

- `list_relations_per_page` &mdash; The number of relations on each page (Max 10k as this is the most Snowflake allows).
amychen1776 marked this conversation as resolved.
Show resolved Hide resolved
- `list_relations_page_limit` &mdash; The maximum number of pages to include in the results.

For example, if you wanted to include 10k objects per page and include up to 100 pages (1M objects), configure the flags as follows:
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved


```yml

flags:
list_relations_per_page: 10000
list_relations_page_limit: 100

```

</VersionBlock>
Loading