"""Query templates for snowflake_copy_results task.""" from jinja2 import Template def copy_accounting_run_results_distro_template(): """Copy results from staging table to distribution accounting run results table.""" return Template(""" INSERT INTO ROYALTY_ACCOUNTING.{{environment}}.ACCOUNTING_RUN_RESULTS_DISTRO SELECT * FROM ROYALTY_ACCOUNTING.{{environment}}.ACCOUNTING_RUN_RESULTS_DISTRO_STAGING source WHERE source.ACCOUNTING_RUN_ID = {{accounting_run_id}} """) def copy_accounting_run_results_nr_template(): """Copy results from staging table to NR accounting run results table.""" return Template(""" INSERT INTO ROYALTY_ACCOUNTING.{{environment}}.ACCOUNTING_RUN_RESULTS_NR SELECT * FROM ROYALTY_ACCOUNTING.{{environment}}.ACCOUNTING_RUN_RESULTS_NR_STAGING source WHERE source.ACCOUNTING_RUN_ID = {{accounting_run_id}} """)