最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

snowflake cloud data platform - Why am I getting a Time Travel error refreshing a dynamic table which does not use time travel?

programmeradmin1浏览0评论

I have a dynamic table in Snowflake (TFM_DIM_DATE) which adds some columns to my DIM_DATE table by joining the table back to itself. At no point does the definition of the dynamic table attempt to look at the DIM_DATE table as it was at an earlier date. However, when I switch off time travel I get the following error:

Database Error in model tfm_dim_date: SQL compilation error: Failed to refresh dynamic table with refresh_trigger INITIAL at data_timestamp 1743671890105 because of the error: SQL compilation error: Target table failed to refresh: Time travel data is not available for table DIM_DATE. The requested time is either beyond the allowed time travel period or before the object creation time.

The dynamic table definition is as follows (slightly abbreviated):

create or replace dynamic table TFM_DIM_DATE(
    DATE_KEY,
    FULL_DATE,
    ...etc
) target_lag = '10 minutes' refresh_mode = AUTO initialize = ON_CREATE warehouse = DAGSTER_PRD_WH
 as (
 SELECT
    DTE.DATE_KEY,
    DTE.FULL_DATE,
    ...etc
FROM DIM_DATE AS DTE
INNER JOIN DIM_DATE  AS DTE_MTH
    ON DTE.MONTH_END_DATE = DTE_MTH.FULL_DATE
INNER JOIN DIM_DATE  AS DTE_QTR
    ON DTE.QUARTER_END_DATE = DTE_QTR.FULL_DATE
INNER JOIN
    DIM_DATE AS DTE_PRV_QTR
    ON DTE.PREVIOUS_QUARTER_END_DATE = DTE_PRV_QTR.FULL_DATE
);

Why am I getting the time travel error?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论