Correct way to assign date to recording in JSON dump?

Hey,

I tried using the “releases” dump to populate my own Postgres database about recordings. I opted to use the JSON dump because I only need very few columns, have limited disk space and I knew it would allow me to decompress the file on the fly.

Method: I iterate through all release objects; the first time a new recording ID is encountered in media > tracks > recording, I use the recording > first_release_date field as my recording.release_date.

Problem: It seems I’ve made a big mistake, because 800k out of my 3 million recordings of interest ended up having no date, especially those since 2022.
Does every recording have a property “first-release-date”? If not, what is the correct way to get the date of a recording?
For example, this recording has a first-release-date ‘2023-07-27’ in the API, but no date in my database. However, it also shares its date with its release, so maybe the API originally gets it from there? I just saw this answer, which, to me, might point in that direction.

It would take a long time to loop through all data again and see if my code somehow messes up some dates, so I thought I’d just ask.

Any pointers are appreciated :slight_smile:
YessirG

4 Likes

Hi YessirG,

Thank you for bringing this to our attention! You found a bug, which I’ve hopefully fixed, so recordings in the release dump should soon have their first-release-date fields set. However, the next dump isn’t until Saturday.

7 Likes

Oh, that’s a relief (if true).
Thanks for the swift response and fix!

2 Likes