Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

PythonOperator / Airflow Contrib Operators #692

@Debasish-Das-CK

Description

@Debasish-Das-CK

I would like to re-use PipelineGenerator and add PythonOperator to it so that we can use it for dataflow and cloud-ml python API along with bigquery. There are corresponding airflow.contrib operators as well which can be potentially used and I am not sure why datalab defined Load/Execute/Extract operators...I was wondering whether it is possible to standardize on PythonOperator. Here is an example:
bigquery.contrib.operator.ExecuteOperator(BaseOperator):
def execute(self, context):
job = query.execute(output_options=output_options, query_params=query_params)
return {
'table': job.result().full_name
}

Is it possible to use something as follows and use the pattern for Dataflow/CloudML runners as well or the idea is to come up with DataflowOperator/CloudMLOperator in datalab ?

def create_operator(self, query: bigquery.Query):
return PythonOperator(query.execute, output_options)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions