def run_workflow()

in functions/data-processing-engines/dataform-tag-executor/main.py [0:0]


def run_workflow(gcp_project: str, location: str, repo_name: str, tags: list, execute: str, branch: str,
                 query_variables: dict):
    """Orchestrates the complete Dataform workflow process: compilation and execution.

    Args:
        gcp_project (str): The GCP project ID.
        location (str): The GCP region.
        repo_name (str): The name of the Dataform repository.
        tags (str): The target tags to compile and execute.
        branch (str): The Git branch to use.
        query_variables (dict): Step specific variables like end or start date i.e. {'${start_date}': "'2024-05-21'", '${end_date}': "'2024-05-21'"}
    """
    repo_uri = f'projects/{gcp_project}/locations/{location}/repositories/{repo_name}'
    compilation_result = compile_workflow(gcp_project, repo_name, repo_uri, branch, query_variables)
    if execute:
        workflow_invocation_name = execute_workflow(repo_uri, compilation_result, tags)
        return f"aef-{workflow_invocation_name}"