Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate obsolete staging tables/views #3100

Open
4 tasks
lauriemerrell opened this issue Nov 13, 2023 · 1 comment
Open
4 tasks

Deprecate obsolete staging tables/views #3100

lauriemerrell opened this issue Nov 13, 2023 · 1 comment

Comments

@lauriemerrell
Copy link
Contributor

lauriemerrell commented Nov 13, 2023

As an analytics engineer, I want to deprecate outdated & unused tables and views in our data warehouse to reduce the risk of users accidentally using incorrect or obsolete data and to reduce noise and clutter in audit activities (for example, auditing for models lacking documentation.)

AC:

  • Investigate all models in the staging dataset that aren't being updated regularly (see query below)
    • Check whether they appear in the dbt project (some of these are incremental models)
    • Check whether there is documentation of their intended purpose
  • Deprecate unused staging models
-- query to identify outdated models
SELECT
  table_name, table_type, creation_time
FROM
  `cal-itp-data-infra`.`staging`.INFORMATION_SCHEMA.TABLES
WHERE
  creation_time < "<yesterday's date>"
ORDER BY creation_time
@lauriemerrell
Copy link
Contributor Author

Size is "large" because deprecation process spans multiple weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant