Hello,
The following error occurs when creating a Materialized View on a table using DataStream and executing a SELECT on the Matelialized View.
```
Materialized views <project id>:<dataset>.<table name> has a base table <project id>:<dataset>.<table name> with unapplied Change Data Capture(CDC) upsert data within a configured period.
```
The source data comes from an AWS RDS PosgreSQL.
The region is asianortheast-1.
It was normal until around the middle of March, but from April this error occurs.
I have tried below.
・ Recreating the data stream → The above error still appears
・ Recreate the table of the data stream source → The above error still appears
・ Recreate the replication settings (publication and replication slot) → the above error still appears
Is there any solution?
Hi @makoto1,
Welcome to Google Cloud Community.
According to the error message, the Materialized View has a base table containing Change Data Capture (CDC) upsert data that hasn't been applied within the specified time frame. This indicates that due to some configuration or setting, there have been changes in the underlying table that have not been recorded by the Materialized View.
You must make sure that the CDC data from the base table is accurately collected and applied to the Materialized View in order to fix this problem. You can follow the instructions listed below:
Here are some documentation you may use as reference:
https://cloud.google.com/datastream/docs/best-practices-stream-data?_ga=2.180893287.-1392753435.1676...
https://cloud.google.com/datastream-for-bigquery?_ga=2.180893287.-1392753435.1676655686
https://cloud.google.com/datastream/docs/diagnose-issues?_ga=2.214302039.-1392753435.1676655686