Skip to content

Latest commit

 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bball-etl-cli

  • command line interface written in Go to insert structured data from stats.nba.com into postgres database (all ddl in /sql)
  • /etl is a fork of bball-etl-go - a package i wrote to use in other repos
  • this repo is meant to replace this package and the repos that use it with a cli component, which should eliminate the need to have several repos

run daily etl example

go run ./cli -env prod -mode dly

run build etl example

go run ./cli -env prod -mode bld

CLI flags

mode selector

  • -mode

    • dly
      • etl for games that took place the previous day
      • uesd in scripts/dly/dly.sh called nightly in cronjob
    • bld
      • etl for all nba/wnba games since 1970
      • used in scripts/bld/bld.sh to build postgres db
    • custom (not yet built)

env selector

  • -env

    • prod
      • loads env vars from .env
    • dev
      • loads env vars from .envdev
    • test
      • loads env vars from .envtst
      • only used for testing scripts in this repo

About

CLI application written in Go to fetch & insert NBA/WNBA statistics from nba.com into a Postgres database

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages