Added shell script to work around error while running nfldb-update
This commit is contained in:
parent
560ad85e45
commit
8ad0609f50
@ -8,6 +8,7 @@ q.game(season_year=2012, season_type='Regular')
|
|||||||
for pp in q.sort('passing_yds').limit(10).as_aggregate():
|
for pp in q.sort('passing_yds').limit(10).as_aggregate():
|
||||||
print pp.player, pp.passing_yds
|
print pp.player, pp.passing_yds
|
||||||
|
|
||||||
q.game(season_year=2016, season_type='Regular')
|
#q.game(season_year=2016, season_type='Regular')
|
||||||
for game in q.as_games():
|
#for game in q.as_games():
|
||||||
|
# print pp.player, pp.passing_yds
|
||||||
|
|
||||||
8
update_nfldb_with_workaround.sh
Normal file
8
update_nfldb_with_workaround.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This is a workaround for an error that occurs when running 'nfldb-update' where some of the JSON data it
|
||||||
|
# gets from the internet contains "JAX" instead of "JAC" as the key for the Jacksonville Jaguars team
|
||||||
|
psql --username=nfldb nfldb --command="INSERT INTO team VALUES ('JAX', 'Jacksonville', 'Jaguars')"
|
||||||
|
nfldb-update
|
||||||
|
psql --username=nfldb nfldb --command="UPDATE play SET pos_team = 'JAC' WHERE pos_team = 'JAX'"
|
||||||
|
psql --username=nfldb nfldb --command="DELETE FROM team WHERE team_id = 'JAX'"
|
||||||
Loading…
Reference in New Issue
Block a user