Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Always use only latest provider tags when reingesting (#4752)

sarayourfriendfc62efa7150a
diff --git a/catalog/dags/common/storage/columns.py b/catalog/dags/common/storage/columns.py
index 9ab959d6e..3ce503d4f 100644
--- a/catalog/dags/common/storage/columns.py
+++ b/catalog/dags/common/storage/columns.py
@@ -2,6 +2,7 @@ import json
import logging
from abc import ABC, abstractmethod
from enum import Enum, auto
+from textwrap import dedent
from typing import NewType
@@ -29,6 +30,7 @@ class UpsertStrategy(Enum):
merge_jsonb_objects = auto()
merge_jsonb_arrays = auto()
merge_array = auto()
+ merge_tags = auto()
no_change = ()
calculate_value = auto()
@@ -89,6 +91,41 @@ def _merge_array(column: str) -> str:
)"""
+def _merge_tags(*args) -> str:
+ """
+ Merge provider tags with additional tags.
+
+ Always keep all additional tags, but never retain previous provider tags,
+ to ensure any provider tags during reingestion exactly match those at
+ the provider, and no tags deleted or changed upstream are incorrectly retained
+ in Openverse.
+
+ See https://github.com/WordPress/openverse/issues/4732 for rationale.
+
+ This approach applies to media table tags. As such, the column name is not configurable.
+ Other jsonb array columns with similar needs must implement their own strategies to
+ sound merging of incoming and existing values.
+
+ Table name `old` comes from `upsert_records_to_db_table` implementation details.
+ `EXCLUDED` is because this is interpolated into `DO UPDATE SET`.
+ """
+ return dedent(
+ """
+ tags = COALESCE(
+ (
+ SELECT EXCLUDED.tags || jsonb_path_query_array(
+ old.tags,
+ '$ ? (@.provider != $provider)',
+ jsonb_build_object('provider', old.provider)
+ )
+ ),
+ EXCLUDED.tags,
+ old.tags
+ )
+ """
+ ).strip()
+
+
def _now(column: str):
return f"{column} = {NOW}"
@@ -112,6 +149,7 @@ class Column(ABC):
UpsertStrategy.merge_jsonb_objects: _merge_jsonb_objects,
UpsertStrategy.merge_jsonb_arrays: _merge_jsonb_arrays,
UpsertStrategy.merge_array: _merge_array,
+ UpsertStrategy.merge_tags: _merge_tags,
}
def __init__(
@@ -686,7 +724,7 @@ CREATOR_URL = URLColumn(name="creator_url", required=False, size=2000)
TITLE = StringColumn(name="title", required=False, size=5000, truncate=True)
META_DATA = JSONColumn(name="meta_data", required=False)
TAGS = JSONColumn(
- name="tags", required=False, upsert_strategy=UpsertStrategy.merge_jsonb_arrays
+ name="tags", required=False, upsert_strategy=UpsertStrategy.merge_tags
)
WATERMARKED = BooleanColumn(name="watermarked", required=False)
PROVIDER = StringColumn(name="provider", required=False, size=80, truncate=False)
diff --git a/catalog/tests/dags/common/loader/test_sql.py b/catalog/tests/dags/common/loader/test_sql.py
index 5caf96423..8652d071b 100644
--- a/catalog/tests/dags/common/loader/test_sql.py
+++ b/catalog/tests/dags/common/loader/test_sql.py
@@ -1050,22 +1050,48 @@ def test_upsert_records_merges_tags(
IMG_URL = "https://images.com/a/img.jpg"
LICENSE = "by"
- TAGS_A = json.dumps(
- [{"name": "tagone", "provider": "test"}, {"name": "tagtwo", "provider": "test"}]
+ unchanged_provider_tag = {"name": "unchanged_provider_tag", "provider": PROVIDER}
+ deleted_provider_tag = {"name": "deleted_provider_tag", "provider": PROVIDER}
+ brand_new_tag = {"name": "brand_new_tag", "provider": PROVIDER}
+ shared_machine_tag = {"name": "shared_tag", "provider": "magic_vision_ai"}
+ incoming_shared_provider_tag = shared_machine_tag | {"provider": PROVIDER}
+
+ # e.g., the provider had a tag that we also added during enrichment, but the provider deleted it
+ retained_machine_tag = deleted_provider_tag | {"provider": "magic_vision_ai"}
+
+ EXISTING_TAGS = json.dumps(
+ [
+ unchanged_provider_tag,
+ deleted_provider_tag,
+ shared_machine_tag,
+ retained_machine_tag,
+ ]
)
- TAGS_B = json.dumps(
+ INCOMING_TAGS = json.dumps(
[
- {"name": "tagone", "provider": "test"},
- {"name": "tagthree", "provider": "test"},
+ unchanged_provider_tag,
+ brand_new_tag,
+ incoming_shared_provider_tag,
]
)
+ # i.e., we retain everything not from the provider, and only use the most recent ("incoming") provider tags
+ # the "shared" tags test that any distinctness checking only deduplicates tags that share a provider
+ # and does not delete enriched tags in favour of tags from the provider with the same name
+ EXPECTED_TAGS = [
+ unchanged_provider_tag,
+ brand_new_tag,
+ shared_machine_tag,
+ incoming_shared_provider_tag,
+ retained_machine_tag,
+ ]
+
query_values_a = utils.create_query_values(
{
col.FOREIGN_ID.db_name: FID,
col.DIRECT_URL.db_name: IMG_URL,
col.LICENSE.db_name: LICENSE,
- col.TAGS.db_name: TAGS_A,
+ col.TAGS.db_name: EXISTING_TAGS,
col.PROVIDER.db_name: PROVIDER,
}
)
@@ -1076,7 +1102,7 @@ def test_upsert_records_merges_tags(
col.FOREIGN_ID.db_name: FID,
col.DIRECT_URL.db_name: IMG_URL,
col.LICENSE.db_name: LICENSE,
- col.TAGS.db_name: TAGS_B,
+ col.TAGS.db_name: INCOMING_TAGS,
col.PROVIDER.db_name: PROVIDER,
}
)
@@ -1112,15 +1138,10 @@ def test_upsert_records_merges_tags(
actual_rows = postgres_with_load_and_image_table.cursor.fetchall()
actual_row = actual_rows[0]
assert len(actual_rows) == 1
- expect_tags = [
- {"name": "tagone", "provider": "test"},
- {"name": "tagtwo", "provider": "test"},
- {"name": "tagthree", "provider": "test"},
- ]
actual_tags = actual_row[utils.tags_idx]
- assert len(actual_tags) == 3
- assert all([t in expect_tags for t in actual_tags])
- assert all([t in actual_tags for t in expect_tags])
+ assert all([t in EXPECTED_TAGS for t in actual_tags])
+ assert all([t in actual_tags for t in EXPECTED_TAGS])
+ assert len(actual_tags) == len(EXPECTED_TAGS)
def test_upsert_records_does_not_replace_tags_with_null(
@@ -1139,6 +1160,8 @@ def test_upsert_records_does_not_replace_tags_with_null(
IMG_URL = "https://images.com/a/img.jpg"
LICENSE = "by"
+ # These are all retained because `provider` on the tag != the image provider
+ # Therefore, these tags are not filtered out, even though the incoming tags are empty
TAGS = [
{"name": "tagone", "provider": "test"},
{"name": "tagtwo", "provider": "test"},
diff --git a/documentation/meta/media_properties/catalog.md b/documentation/meta/media_properties/catalog.md
index 082b3a35f..e0b229a14 100644
--- a/documentation/meta/media_properties/catalog.md
+++ b/documentation/meta/media_properties/catalog.md
@@ -13,69 +13,69 @@ noted otherwise in the Python column's name property.
| Name | DB Field | Python Column |
| ----------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [`identifier`](#identifier) | uuid, nullable | [UUIDColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L500-L517) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`created_on`](#created_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=no_change, nullable=False, required=True`) |
-| [`updated_on`](#updated_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`ingestion_type`](#ingestion_type) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`provider`](#provider) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`source`](#source) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`foreign_identifier`](#foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`foreign_landing_url`](#foreign_landing_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=True, required=True`) |
-| [`url`](#url) | text, non-nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`thumbnail`](#thumbnail) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`name="thumbnail_url", upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`width`](#width) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`height`](#height) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`filesize`](#filesize) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`license`](#license) | character varying (50), non-nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`name="license_", upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`license_version`](#license_version) | character varying (25), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`creator`](#creator) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`creator_url`](#creator_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`title`](#title) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`meta_data`](#meta_data) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
-| [`tags`](#tags) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_arrays, nullable=True, required=False`) |
-| [`watermarked`](#watermarked) | boolean, nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L340-L385) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`last_synced_with_source`](#last_synced_with_source) | timestamp with time zone, nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`removed_from_source`](#removed_from_source) | boolean, non-nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L340-L385) (`upsert_strategy=false, nullable=False, required=True`) |
-| [`filetype`](#filetype) | character varying (5), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`category`](#category) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`standardized_popularity`](#standardized_popularity) | double precision, nullable | [CalculatedColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L259-L337) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`identifier`](#identifier) | uuid, nullable | [UUIDColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L538-L555) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`created_on`](#created_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=no_change, nullable=False, required=True`) |
+| [`updated_on`](#updated_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`ingestion_type`](#ingestion_type) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`provider`](#provider) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`source`](#source) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`foreign_identifier`](#foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`foreign_landing_url`](#foreign_landing_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=True, required=True`) |
+| [`url`](#url) | text, non-nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`thumbnail`](#thumbnail) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`name="thumbnail_url", upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`width`](#width) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`height`](#height) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`filesize`](#filesize) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`license`](#license) | character varying (50), non-nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`name="license_", upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`license_version`](#license_version) | character varying (25), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`creator`](#creator) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`creator_url`](#creator_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`title`](#title) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`meta_data`](#meta_data) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
+| [`tags`](#tags) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_tags, nullable=True, required=False`) |
+| [`watermarked`](#watermarked) | boolean, nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L378-L423) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`last_synced_with_source`](#last_synced_with_source) | timestamp with time zone, nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`removed_from_source`](#removed_from_source) | boolean, non-nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L378-L423) (`upsert_strategy=false, nullable=False, required=True`) |
+| [`filetype`](#filetype) | character varying (5), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`category`](#category) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`standardized_popularity`](#standardized_popularity) | double precision, nullable | [CalculatedColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L297-L375) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
## Audio Properties
| Name | DB Field | Python Column |
| --------------------------------------------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [`identifier`](#identifier) | uuid, nullable | [UUIDColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L500-L517) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`created_on`](#created_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=no_change, nullable=False, required=True`) |
-| [`updated_on`](#updated_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`ingestion_type`](#ingestion_type) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`provider`](#provider) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`source`](#source) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`foreign_identifier`](#foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`foreign_landing_url`](#foreign_landing_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=True, required=True`) |
-| [`url`](#url) | text, non-nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`thumbnail`](#thumbnail) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`name="thumbnail_url", upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`filetype`](#filetype) | character varying (5), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`duration`](#duration) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`bit_rate`](#bit_rate) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`sample_rate`](#sample_rate) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`category`](#category) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`genres`](#genres) | array of character varying (80), nullable | [ArrayColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L599-L651) (`upsert_strategy=merge_array, base_column=StringColumn, nullable=True, required=False`) |
-| [`audio_set`](#audio_set) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
-| [`set_position`](#set_position) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`alt_files`](#alt_files) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_arrays, nullable=True, required=False`) |
-| [`filesize`](#filesize) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L216-L256) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`license`](#license) | character varying (50), non-nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`name="license_", upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`license_version`](#license_version) | character varying (25), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
-| [`creator`](#creator) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`creator_url`](#creator_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L550-L596) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`title`](#title) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`meta_data`](#meta_data) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
-| [`tags`](#tags) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L388-L454) (`upsert_strategy=merge_jsonb_arrays, nullable=True, required=False`) |
-| [`watermarked`](#watermarked) | boolean, nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L340-L385) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`last_synced_with_source`](#last_synced_with_source) | timestamp with time zone, nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L520-L547) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`removed_from_source`](#removed_from_source) | boolean, non-nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L340-L385) (`upsert_strategy=false, nullable=False, required=True`) |
-| [`standardized_popularity`](#standardized_popularity) | double precision, nullable | [CalculatedColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L259-L337) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
-| [`audio_set_foreign_identifier`](#audio_set_foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L457-L497) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`identifier`](#identifier) | uuid, nullable | [UUIDColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L538-L555) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`created_on`](#created_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=no_change, nullable=False, required=True`) |
+| [`updated_on`](#updated_on) | timestamp with time zone, non-nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`ingestion_type`](#ingestion_type) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`provider`](#provider) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`source`](#source) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`foreign_identifier`](#foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`foreign_landing_url`](#foreign_landing_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=True, required=True`) |
+| [`url`](#url) | text, non-nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`thumbnail`](#thumbnail) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`name="thumbnail_url", upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`filetype`](#filetype) | character varying (5), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`duration`](#duration) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`bit_rate`](#bit_rate) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`sample_rate`](#sample_rate) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`category`](#category) | character varying (80), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`genres`](#genres) | array of character varying (80), nullable | [ArrayColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L637-L689) (`upsert_strategy=merge_array, base_column=StringColumn, nullable=True, required=False`) |
+| [`audio_set`](#audio_set) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
+| [`set_position`](#set_position) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`alt_files`](#alt_files) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_jsonb_arrays, nullable=True, required=False`) |
+| [`filesize`](#filesize) | integer, nullable | [IntegerColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L254-L294) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`license`](#license) | character varying (50), non-nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`name="license_", upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`license_version`](#license_version) | character varying (25), nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=False, required=True`) |
+| [`creator`](#creator) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`creator_url`](#creator_url) | text, nullable | [URLColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L588-L634) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`title`](#title) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`meta_data`](#meta_data) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_jsonb_objects, nullable=True, required=False`) |
+| [`tags`](#tags) | jsonb, nullable | [JSONColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L426-L492) (`upsert_strategy=merge_tags, nullable=True, required=False`) |
+| [`watermarked`](#watermarked) | boolean, nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L378-L423) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`last_synced_with_source`](#last_synced_with_source) | timestamp with time zone, nullable | [TimestampColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L558-L585) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`removed_from_source`](#removed_from_source) | boolean, non-nullable | [BooleanColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L378-L423) (`upsert_strategy=false, nullable=False, required=True`) |
+| [`standardized_popularity`](#standardized_popularity) | double precision, nullable | [CalculatedColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L297-L375) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
+| [`audio_set_foreign_identifier`](#audio_set_foreign_identifier) | text, nullable | [StringColumn](https://github.com/WordPress/openverse/blob/main/catalog/dags/common/storage/columns.py#L495-L535) (`upsert_strategy=newest_non_null, nullable=True, required=False`) |
## Media Property Descriptions