GithubHelp home page GithubHelp logo

brianbroderick / batch_insert_workshop Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 91 KB

This is used in a workshop to teach about batch inserting

JavaScript 7.15% CSS 0.08% Elixir 89.30% HTML 3.47%

batch_insert_workshop's Introduction

Batch Insert Workshop

To start your project:

Instructions

  1. Retrieve Unique Languages from JSON Payload.
  2. Insert all Unique Languages in one query, returning values (hint: Repo.insert_all with on_conflict & returning clause)
  3. Insert all Repos, and return all values from the Insert.
  4. Loop back through the payload, mapping the IDs returned from Languages and Repos (Steps 2 & 3)
  5. Insert these into the repo_languages table.
  6. Write tests

Where to begin:

  1. If you have a Github API Token set up (from Start your project section): You can run GithubApi.repos to fetch the first 10 repos. The file is located at lib/batch_insert_workshop/services/github_api.ex`

OR

  1. If you don't have a token set up, you can get a sample payload from: GithubPayload.sample

Tables to use for Part 1

  • Languages
  • Repos
  • Repo Languages

Located at: batch_insert_workshop/model/

batch_insert_workshop's People

Contributors

brianbroderick avatar

Stargazers

 avatar James Stephens avatar

Watchers

James Cloos avatar  avatar  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.