Giter VIP home page Giter VIP logo

discogs-bq-importer's Introduction

Discogs BigQuery importer

Raison d'être

Scio Dataflow job to load the discogs xml dumps into BigQuery tables.

Running

Current available jobs:

  • Labels
  • Artists
  • Masters
  • Releases

To run the jobs, download the compressed XML dumps and upload them to your own gcp bucket. Follow the Scio instructions to set up your GCP project.

All the times were measured using the default run arguments for Dataflow.

Releases (~ 1 hour)

sbt "runMain discogs.ReleasesJob
  --project=your-gpc-project-id
  --runner=DataflowRunner
  --region=us-central1
  --input=gs://your-bucket/releases.xml.gz
  --output=your-project.bq-dataset.releases-bq-table"

Artists (~ 11 minutes)

sbt "runMain discogs.ArtistsJob
  --project=your-gpc-project-id
  --runner=DataflowRunner
  --region=us-central1
  --input=gs://your-bucket/artists.xml.gz
  --output=your-project.bq-dataset.artists-bq-table"

Masters (~ 6 minutes)

sbt "runMain discogs.MastersJob
  --project=your-gpc-project-id
  --runner=DataflowRunner
  --region=us-central1
  --input=gs://your-bucket/masters.xml.gz
  --output=your-project.bq-dataset.masters-bq-table"

Labels (~ 6 minutes)

Because of an Apache Beam XmlIO limitation regarding nested tags with the same outer label (<label>), the original labels file cannot be processed as is. There's a small script to convert the nested <labels> tags into <sublabels> in src/main/java/utils/LabelRenamer.java. Download the original final, decompress it and run the converter. Then compress the output file and upload it to your GCP bucket. Then use that file as the input for the job.

sbt "runMain discogs.MastersJob
  --project=your-gpc-project-id
  --runner=DataflowRunner
  --region=us-central1
  --input=gs://your-bucket/labels-renamed.xml.gz
  --output=your-project.bq-dataset.labels-bq-table"

discogs-bq-importer's People

Contributors

pacuna avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.