Skip to main content

Recipe

Replicating the Deprecated coursetags Table

Replicate the deprecated coursetags table by joining courses, coursegrouptags, and tags.

beginnerVerified 2026-05-19
All recipes
beginnerVerified 2026-05-19

Tables

courses, coursegrouptags, tags

Tags

deprecation
redshift
tags

TL;DR

The coursetags table was deprecated on **2025-03-19**. Replicate its rows by joining coursescoursegrouptagstags on coursegroupid and tagid.

Problem

The coursetags table was deprecated and removed from the BI Connector on **2025-03-19**. Any reports, ETL jobs, or BI dashboards that still reference coursetags will fail.

The underlying data still exists — it's now stored on the **course group** rather than the course, and joined through a tags lookup table. Three joins reproduce the original coursetags row shape.

Solution

SELECT
  c.id            AS course_id,
  c.coursegroupid AS course_group_id,
  c.companyid     AS company_id,
  t.label         AS tag_label,
  t.id            AS tag_id,
  cgt.updatedat   AS updated_at
FROM courses AS c
JOIN coursegrouptags AS cgt
  ON c.coursegroupid = cgt.coursegroupid
JOIN tags AS t
  ON cgt.tagid = t.id
WHERE c.statusgroup = 'a';

How it works

  • coursescoursegrouptags joins each course to the tags attached to its parent course group (tags live on the course group, not the course).
  • coursegrouptagstags resolves the tag id to its human-readable label.
  • statusgroup = 'a' on courses excludes archived/deleted courses so the output matches what your learners actually see.

Variations

  • **Materialize as a view:** if your BI tool can't easily express the 3-way join, wrap this in a Redshift view named coursetags to make migration a one-line change for downstream consumers.
  • **Filter by tag:** add WHERE t.label = 'Compliance' to scope to a single tag.
  • **Per-Panorama:** add WHERE c.companyid = '<tenant-id>'.

Migrate downstream consumers

If you maintained dbt models, Looker explores, or Power BI datasets that reference coursetags, swap them to a CTE or view based on this query. The column names above intentionally match the original coursetags schema.

Related recipes