Skip to main content
InterviewHubPRO
Section Overview
Q44

Question 44 of 50

Part 3: Enterprise Scale, Performance & CI/CD Pipelines (Senior / Staff)

88%
dbt Analytics Engineering (50 Qs)•Part 3: Enterprise Scale, Performance & CI/CD Pipelines (Senior / Staff)

Custom Materializations: Writing custom Jinja materialization blocks.

senior LevelMost AskedCode ExampleFormsPerformancePipes

In Simple Words: When standard materializations (view, table, incremental) don't fit (e.g. exporting data directly to cloud object storage or updating a specialized vector index):

  • Define custom materialization logic in macros/materializations/:
    sql
    {% materialization export_to_s3, default %}
      {%- set target_relation = api.Relation.create(identifier=target.identifier) -%}
      {% call statement('main') -%}
        UNLOAD ({{ sql }})
        TO 's3://my-bucket/exports/{{ model.name }}/'
        FORMAT = PARQUET;
      {%- endcall %}
      {{ return({'relations': [target_relation]}) }}
    {% endmaterialization %}