Skip to content

Commit

Permalink
#1088 vds_bot -> events_bot
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielwol committed Dec 12, 2024
1 parent 32e6436 commit 3eb07f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dags/rodars_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ def rodars_dag():
def pull_rodars_issues(ds = None):
"Get RODARS data from ITSC and insert into bigdata `congestion_events.itsc_issues`"
itsc_bot = PostgresHook('itsc_postgres')
vds_bot = PostgresHook('vds_bot')
fetch_and_insert_issue_data(select_conn=itsc_bot, insert_conn=vds_bot, start_date=ds)
events_bot = PostgresHook('events_bot')
fetch_and_insert_issue_data(select_conn=itsc_bot, insert_conn=events_bot, start_date=ds)

@task
def pull_rodar_locations(ds = None):
"Get RODARS data from ITSC and insert into bigdata `congestion_events.itsc_issue_locations`"
itsc_bot = PostgresHook('itsc_postgres')
vds_bot = PostgresHook('vds_bot')
fetch_and_insert_location_data(select_conn=itsc_bot, insert_conn=vds_bot, start_date=ds)
events_bot = PostgresHook('events_bot')
fetch_and_insert_location_data(select_conn=itsc_bot, insert_conn=events_bot, start_date=ds)
#add a delete task to remove outdated revisions?

pull_rodars_issues()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ GRANT EXECUTE ON FUNCTION itsc_factors.get_lanesaffected_sums(text) TO PUBLIC;

GRANT EXECUTE ON FUNCTION itsc_factors.get_lanesaffected_sums(text) TO congestion_admins;

GRANT EXECUTE ON FUNCTION itsc_factors.get_lanesaffected_sums(text) TO vds_bot;
GRANT EXECUTE ON FUNCTION itsc_factors.get_lanesaffected_sums(text) TO events_bot;
2 changes: 1 addition & 1 deletion events/construction/sql/create_table-itsc_issues.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ GRANT ALL ON TABLE congestion_events.itsc_issues TO dbadmin;

GRANT ALL ON TABLE congestion_events.itsc_issues TO rds_superuser WITH GRANT OPTION;

GRANT ALL ON TABLE congestion_events.itsc_issues TO vds_bot;
GRANT ALL ON TABLE congestion_events.itsc_issues TO events_bot;
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ GRANT ALL ON TABLE congestion_events.itsc_issue_locations TO dbadmin;

GRANT ALL ON TABLE congestion_events.itsc_issue_locations TO rds_superuser WITH GRANT OPTION;

GRANT ALL ON TABLE congestion_events.itsc_issue_locations TO vds_bot;
GRANT ALL ON TABLE congestion_events.itsc_issue_locations TO events_bot;

0 comments on commit 3eb07f9

Please sign in to comment.