def exec_recreate_udf(task, runner: QueryRunner, **kwargs):
    airflow_context = kwargs["airflow_context"]
    relation = create_relation_from_task(task=task)
    sql = airflow_context["templates_dict"]["sql"]

    arguments = task.options.get("arguments", [])
    runner.recreate_udf(arguments=arguments, query=sql, relation=relation)
예제 #2
0
def exec_recreate_udf(task, runner: QueryRunner, **kwargs):
    airflow_context = kwargs['airflow_context']
    relation = create_relation_from_task(task=task)
    sql = airflow_context['templates_dict']['sql']

    arguments = task.options.get('arguments', [])
    runner.recreate_udf(
        arguments=arguments,
        query=sql,
        relation=relation
    )