-
Notifications
You must be signed in to change notification settings - Fork 152
/
seed.sql
24 lines (17 loc) · 860 Bytes
/
seed.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{% macro bigquery__create_csv_table(model, agate_table) %}
-- no-op
{% endmacro %}
{% macro bigquery__reset_csv_table(model, full_refresh, old_relation, agate_table) %}
{{ adapter.drop_relation(old_relation) }}
{% endmacro %}
{% macro bigquery__load_csv_rows(model, agate_table) %}
{%- set column_override = model['config'].get('column_types', {}) -%}
{{ adapter.load_dataframe(model['database'], model['schema'], model['alias'],
agate_table, column_override, model['config']['delimiter']) }}
{% call statement() %}
alter table {{ this.render() }} set {{ bigquery_table_options(config, model) }}
{% endcall %}
{% if config.persist_relation_docs() and 'description' in model %}
{{ adapter.update_table_description(model['database'], model['schema'], model['alias'], model['description']) }}
{% endif %}
{% endmacro %}