Skip to content

Commit

Permalink
couch loader utility update with new world cup jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
rabellino-noaa committed Oct 16, 2024
1 parent d469893 commit f4d0761
Show file tree
Hide file tree
Showing 17 changed files with 18,645 additions and 17 deletions.
19 changes: 9 additions & 10 deletions couchdb/uat/loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ COPY ./couchdb/uat/loader/CouchEventPortfolioDB.py CouchEventPortfolioDB.py
COPY ./couchdb/uat/loader/Load.py Load.py

# Albany
#COPY ./couchdb/uat/loader/EventPort_IDSSe_11111111-beec-467b-a0e6-9d215b715b97_20221223-120000.json /data/EventPort_IDSSe_11111111-beec-467b-a0e6-9d215b715b97_20221223-120000.json
COPY ./couchdb/uat/loader/EventPort_IDSSe_11111111-beec-467b-a0e6-9d215b715b97_20221223-120000.json /data/EventPort_IDSSe_11111111-beec-467b-a0e6-9d215b715b97_20221223-120000.json
# Binghamton
COPY ./couchdb/uat/loader/EventPort_IDSSe_22222222-beec-467b-a0e6-9d215b715b97_20221223-120000.json /data/EventPort_IDSSe_22222222-beec-467b-a0e6-9d215b715b97_20221223-120000.json
# Syracuse
COPY ./couchdb/uat/loader/EventPort_IDSSe_33333333-beec-467b-a0e6-9d215b715b97_20221223-120000.json /data/EventPort_IDSSe_33333333-beec-467b-a0e6-9d215b715b97_20221223-120000.json

#COPY ./couchdb/uat/loader/EventPort_IDSSe_aabbccdd-ab87-4808-bd51-a8597e58410d_20240707-120000.json /data/EventPort_IDSSe_aabbccdd-ab87-4808-bd51-a8597e58410d_20240707-120000.json

#COPY ./couchdb/uat/loader/world_cup_ep_1_day.json /data/world_cup_ep_1_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_2_day.json /data/world_cup_ep_2_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_3_day.json /data/world_cup_ep_3_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_4_day.json /data/world_cup_ep_4_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_5_day.json /data/world_cup_ep_5_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_6_day.json /data/world_cup_ep_6_day.json
#COPY ./couchdb/uat/loader/world_cup_ep_7_day.json /data/world_cup_ep_7_day.json
# World Cup Events
COPY ./couchdb/uat/loader/world_cup_ep_1_day.json /data/world_cup_ep_1_day.json
COPY ./couchdb/uat/loader/world_cup_ep_2_day.json /data/world_cup_ep_2_day.json
COPY ./couchdb/uat/loader/world_cup_ep_3_day.json /data/world_cup_ep_3_day.json
COPY ./couchdb/uat/loader/world_cup_ep_4_day.json /data/world_cup_ep_4_day.json
COPY ./couchdb/uat/loader/world_cup_ep_5_day.json /data/world_cup_ep_5_day.json
COPY ./couchdb/uat/loader/world_cup_ep_6_day.json /data/world_cup_ep_6_day.json
COPY ./couchdb/uat/loader/world_cup_ep_7_day.json /data/world_cup_ep_7_day.json

CMD [ "python3", "Load.py"]
4 changes: 4 additions & 0 deletions couchdb/uat/loader/Load.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

db = CouchEventPortfolioDB.CouchEventPortfolioDB(data)

logging.info('Purge the database before loading new event portfolios...')
db.purge_portfolios()
logging.info('Database purged successfully')

# Get each of the JSON files from the given data directory and load into the database
for fn in sorted(Path(datadir).glob("*.json"), reverse=True):
if os.path.isfile(fn):
Expand Down
1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_1_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_2_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_3_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_4_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_5_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_6_day.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions couchdb/uat/loader/old/world_cup_ep_7_day.json

Large diffs are not rendered by default.

2,798 changes: 2,797 additions & 1 deletion couchdb/uat/loader/world_cup_ep_1_day.json

Large diffs are not rendered by default.

2,179 changes: 2,178 additions & 1 deletion couchdb/uat/loader/world_cup_ep_2_day.json

Large diffs are not rendered by default.

2,622 changes: 2,621 additions & 1 deletion couchdb/uat/loader/world_cup_ep_3_day.json

Large diffs are not rendered by default.

2,247 changes: 2,246 additions & 1 deletion couchdb/uat/loader/world_cup_ep_4_day.json

Large diffs are not rendered by default.

2,396 changes: 2,395 additions & 1 deletion couchdb/uat/loader/world_cup_ep_5_day.json

Large diffs are not rendered by default.

2,878 changes: 2,877 additions & 1 deletion couchdb/uat/loader/world_cup_ep_6_day.json

Large diffs are not rendered by default.

3,512 changes: 3,511 additions & 1 deletion couchdb/uat/loader/world_cup_ep_7_day.json

Large diffs are not rendered by default.

0 comments on commit f4d0761

Please sign in to comment.