From 63c9e5e01e72daf4bf09d98b3d084cb8ff9b2df8 Mon Sep 17 00:00:00 2001 From: Przemek Denkiewicz Date: Thu, 18 Nov 2021 12:11:48 +0100 Subject: [PATCH] Change default batch size to 1000 --- README.md | 13 +++++++++++++ dbt/include/trino/macros/adapters.sql | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 6615c7d7..2d2b81af 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,19 @@ Check the Trino connector documentation for more information. }} ``` +#### Seeds + +Seeds are CSV files in your dbt project (typically in your data directory), that dbt can load into your data warehouse using the dbt seed command. + +For dbt-trino batch_size is defined in macro `trino__get_batch_size()` and default value is `1000`. +In order to override default value define within your project a macro like the following: + +``` +{% macro default__get_batch_size() %} + {{ return(10000) }} +{% endmacro %} +``` + #### Generating lineage flow in docs In order to generate lineage flow in docs use `ref` function in the place of table names in the query. It builts dependencies between models and allows to create DAG with data flow. Refer to examples [here](https://docs.getdbt.com/docs/building-a-dbt-project/building-models#building-dependencies-between-models). diff --git a/dbt/include/trino/macros/adapters.sql b/dbt/include/trino/macros/adapters.sql index 8303a87c..5fa59ddb 100644 --- a/dbt/include/trino/macros/adapters.sql +++ b/dbt/include/trino/macros/adapters.sql @@ -151,6 +151,11 @@ {% endmacro %} +{% macro trino__get_batch_size() %} + {{ return(1000) }} +{% endmacro %} + + {% macro trino__list_schemas(database) -%} {% call statement('list_schemas', fetch_result=True, auto_begin=False) %} select distinct schema_name