Skip to content

Setting cron as an expression without a start value causes virtual layer update fail when trying to create a view pointing to a non-existent table #5612

@tchopper

Description

@tchopper

A model with:

`
MODEL (
name full_model_using_cron_expression,
kind FULL,
cron '20 8 * * *',
);

SELECT
1 as id,
'test data' as value
`

Using an execution timestamp execution_time = 2024-01-02 01:49:00+00:00.

Will fail with:

Execution failed for node SnapshotId<"full_model_using_cron_expression": 2815714217>

It skips the physical table creation - however still attempts to point a view to it.

However, setting the model with a start value of say '2024-01-01' - will correctly execute. Same goes for setting the cron expression to @daily. I've run into this one in prod twice now.

Upon further inspection - it seems related to how the missing intervals backfill works.

If a model is new - a snapshot should be created regardless and the cron should be ignored? - I'll create a PR shortly which enforces this behaviour.

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