Skip to content

Create working example with snapshot and Trino #497

@nikita-sheremet-java-developer

Description

I have tried to create snapshot model and faced with many issues:

  1. Documentation recommends using yaml file - but with yaml I got Did not find matching node for patch with name 'my_model' in the 'snapshots' section of file. So I have to create my_model.sql and remove yaml file completelly. May be file has wrong name may be wrong location. I have tried some variants but still have no idea what is the problem.
Image
  1. Is forbidden to add location property for table. But Iceberg tables requires location!!! When table is created - what location is used? Why I have no option to control this? After removing location I got TrinoQueryError with "No factory for location: file:/tmp/dev_myschema.db/my_snapshot". So it tries to contruct location from schema and adds .db` suffix. This is violates Iceberg and hive table specifications.

I have found https://github.com/dbt-labs/dbt-labs-experimental-features/tree/main/snapshot-testing/snapshots exmaple but this 5 years old.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions