Skip to content

Commit

Permalink
api - repair trigger template strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cherusk committed Nov 15, 2023
1 parent 54d3159 commit 0b429ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/archive_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create_trigger(trigger_name=None, table_name=None, procedure_name=None):
AFTER INSERT ON {table_name}
FOR EACH ROW
EXECUTE
procedure{procedure_name}
procedure {procedure_name}
"""

return query
Expand Down
6 changes: 3 additions & 3 deletions api/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ def create_breeder(api_client, content):
__query = archive.queries.create_breeder_table(table_name=dag_id)
archive.archive_db.execute(db_info=db_config, query=__query)

__query = archive.queries.create_procedure(procedure_name=f"{dag_id}_procedure",
__query = archive.queries.create_procedure(procedure_name=f'{dag_id}_procedure',
probability=consolidation_probability,
source_table_name=dag_id,
target_table_name=dag_name)
archive.archive_db.execute(db_info=db_config, query=__query)

__query = archive.queries.create_trigger(trigger_name="{dag_id}_trigger",
__query = archive.queries.create_trigger(trigger_name=f'f{dag_id}_trigger',
table_name=dag_id,
procedure_name="{dag_id}_procedure")
procedure_name=f'{dag_id}_procedure')
archive.archive_db.execute(db_info=db_config, query=__query)

## create and fill breeder meta data db
Expand Down

0 comments on commit 0b429ac

Please sign in to comment.