er, i guess that's what you mean by "doing it locally"
2021-12-04 33835, 2021
kepstin
no, the musicbrainz folks will not run arbitrary sql queries on your behalf :)
2021-12-04 33849, 2021
kepstin
(anything you can do via the apis you're welcome to do, of course)
2021-12-04 33814, 2021
em7272
yeah lol sorry just was wondering if it was hosted online anywhere, thank you for the help!!
2021-12-04 33823, 2021
crism
em7272, what exactly are you trying to achieve? If you’re trying to import a subset of MBz data into a local database, there are a few different things you could do… but if there’s a particular problem you’re trying to solve or question to answer, there might be a variety of solutions.
not super well-versed with this so bear with me but i'd like to get just the artists and area columns from the basic database without the rest
2021-12-04 33824, 2021
em7272
that api search link looks promising thank you kepstin!
2021-12-04 33835, 2021
kepstin
I'm not sure what you mean by "artist columns"
2021-12-04 33858, 2021
kepstin
artists aren't a single column pretty much anywhere in musicbrainz - and artists of what? tracks, recordings, releases, release groups, etc.?
2021-12-04 33800, 2021
crism
Be warned that “the basic database” isn’t… it’s a brilliantly complicated mess of join tables, aggressively normalized.
2021-12-04 33805, 2021
em7272
sorry literally just artist names
2021-12-04 33815, 2021
kepstin
but artists have multiple names
2021-12-04 33832, 2021
kepstin
and recordings, releases, etc can have multiple artists
2021-12-04 33843, 2021
kepstin
you have to be more specific about what you want :)
2021-12-04 33845, 2021
MRiddickW joined the channel
2021-12-04 33859, 2021
em7272
a list of artist names with their associated area .. is that possible
2021-12-04 33853, 2021
kepstin
i don't see any way to do that without building a custom query against the full db.
2021-12-04 33807, 2021
kepstin
(note that our artist-area information isn't particularly complete)
2021-12-04 33833, 2021
rdswift
Also bear in mind that there are just over 1.9 million artist records in the database.
2021-12-04 33808, 2021
kepstin
technically that information is all in the search index together
2021-12-04 33849, 2021
kepstin
but paging through all the results of the search api for all 1.9 million artists.. would take a while :)
2021-12-04 33833, 2021
rdswift
Yup. Sounds like running a local copy of the database is the way to go.
2021-12-04 33853, 2021
crism
I would just download the full thing, do some subsetting queries, export the results, and run with that. If you’re hurting for space, spin up a free-tier AWS instance to do the work.
2021-12-04 33826, 2021
rdswift
👍
2021-12-04 33840, 2021
em7272
thank you so much for your help crism kepstin rdswift this is all very good to know
2021-12-04 33804, 2021
kepstin
(if you go at max permitted rate and don't get blocked it would take about 5½ hours to pull this all from the api, heh)
2021-12-04 33833, 2021
rdswift
Actually, that might be less time than it takes to set up the database locally. ;-)
2021-12-04 33858, 2021
kepstin
yeah, but if you decide you want some extra information later you can amortize the database setup time
for your use case since you'd just want to do queries in the database, consider using the 'mbdata' tool (linked from the docs) rather than doing a full server setup.
2021-12-04 33831, 2021
kepstin
alternatively, there's a docker setup nowadays that's simpler than the old days of manual setup :)
2021-12-04 33849, 2021
rdswift
"but if you decide you want some extra information later you can amortize the database setup time"... Exactly the reason I would download the whole thing and query it locally.