-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
…tore Signed-off-by: Olga Bulat <[email protected]>
This reverts commit f3785d0 Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
# Conflicts: # src/cc_catalog_airflow/dags/common/storage/image.py # src/cc_catalog_airflow/dags/common/storage/test_image.py
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small bug i think
👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 |
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand it fully but from what I do, it seems like an extension of the existing code to accept a media_type
and set the columns accordingly. If my understanding is correct, it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎶 🎶 🎶
Related to WordPress/openverse#19
This is a cleaned-up version of #64 part related to saving the Audio data to the database. And #69 :)
This PR:
creates a new Audio database. The
sql
scripts for creation of the Postgres tables were added to bothlocal_postgres
folder that is used for local testing, and theopenledger_sql
folder which is [probably] used in production.Reorders the AudioStore columns so that audio-specific columns are all at the end. This makes it easier to write and read the data, and to test. It would be nice to do the same for ImageStore, however we have many TSV files that use the columns in the current order, so we would need to detect the TSV file structure and process it accordingly.
adds media type parameter to the loader functions so that they can select correct list of columns to write to the database.
adds audio-specific SQL queries to
loader/sql.py
for creating audio tables, upserting and overwriting audio in the database.Added on June 30:
watermarked
column from image-specific columns to a list of columns common for all media types, as per API models, as suggested by @krysal .ingestion_type
column value for all media based onsource
value.There are three different places where data is added or overwritten in the database, and in each place the columns are listed separately because different columns are affected. I would like to have this process abstracted in the future, so that we don't have to update column lists in all three places.
Signed-off-by: Olga Bulat [email protected]