Skip to content

Commit

Permalink
Merge pull request #18 from starburstdata/przemek/fix-large-csv
Browse files Browse the repository at this point in the history
Change default batch size to 1000
  • Loading branch information
hovaesco authored Nov 22, 2021
2 parents 8088447 + 63c9e5e commit ca21fbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
5 changes: 5 additions & 0 deletions dbt/include/trino/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca21fbe

Please sign in to comment.