Skip to content

Missing example DAGs/system tests for Google services #8280

@mik-laj

Description

@mik-laj

Description

Hello,

We have a rule that every GCP operators should have an example DAG and system test. This is true in many cases, but there are minor exceptions.
https://github.com/apache/airflow/blob/master/tests/always/test_project_structure.py#L155-L162

  • airflow/providers/google/ads/operators/ads_to_gcs.py
  • airflow/providers/google/cloud/operators/text_to_speech.py
  • airflow/providers/google/cloud/operators/gcs_to_bigquery.py
  • airflow/providers/google/cloud/operators/adls_to_gcs.py
  • airflow/providers/google/cloud/operators/sql_to_gcs.py
  • airflow/providers/google/cloud/operators/s3_to_gcs.py
  • airflow/providers/google/cloud/operators/translate_speech.py
  • airflow/providers/google/cloud/operators/bigquery_to_mysql.py
  • airflow/providers/google/cloud/operators/speech_to_text.py
  • airflow/providers/google/cloud/operators/cassandra_to_gcs.py
  • airflow/providers/google/cloud/operators/bigquery_to_bigquery.py
  • airflow/providers/google/cloud/operators/mysql_to_gcs.py
  • airflow/providers/google/cloud/operators/mssql_to_gcs.py
  • airflow/providers/google/cloud/operators/bigquery_to_gcs.py
  • airflow/providers/google/cloud/operators/local_to_gcs.py
  • airflow/providers/google/cloud/operators/sheets_to_gcs.py
  • airflow/providers/google/suite/operators/gcs_to_sheets.py

We also lack examples for individual operators.
https://github.com/apache/airflow/blob/master/tests/always/test_project_structure.py#L164-L235

  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueueDeleteOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueueResumeOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePauseOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePurgeOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksTaskGetOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksTasksListOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksTaskDeleteOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueueGetOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueueUpdateOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.tasks.CloudTasksQueuesListOperator (Add more operators to example DAG for Cloud Tasks #13235)
  • airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateInlineWorkflowTemplateOperator
  • airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateWorkflowTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPGetStoredInfoTypeOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPReidentifyContentOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDeidentifyTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDLPJobOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateDeidentifyTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPDeidentifyContentOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobTriggerOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListDeidentifyTemplatesOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPGetDeidentifyTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListInspectTemplatesOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListStoredInfoTypesOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateInspectTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDLPJobOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListJobTriggersOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPCancelDLPJobOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPGetInspectTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListInfoTypesOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDeidentifyTemplateOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPListDLPJobsOperator
  • airflow.providers.google.cloud.operators.dlp.CloudDLPRedactImageOperator
  • airflow.providers.google.cloud.operators.datastore.CloudDatastoreDeleteOperationOperator
  • airflow.providers.google.cloud.operators.datastore.CloudDatastoreGetOperationOperator
  • airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor
  • airflow.providers.google.cloud.sensors.gcs.GCSObjectUpdateSensor
  • airflow.providers.google.cloud.sensors.gcs.GCSObjectsWtihPrefixExistenceSensor
  • airflow.providers.google.cloud.sensors.gcs.GCSUploadSessionCompleteSensor

If you decide to finish this ticket you don't have to do all the work yourself. One PR can only deal with a single operator and it's ok.

These example DAGs are key to ensuring high-quality integration.

  • If used in system tests, they prevent regression and facilitate testing.
  • If used in the documentation, they allow us to learn about operators in a real example. Users can easily do CTRL + C, CTRL + V, which makes it easier to write new DAGs.

If you haven't used the GCP yet, after creating the account you will get $300, which will allow you to get to know these services better.

The implementation of this task will allow a better understanding of GCP services, as well as learn methods of testing that is required by the community. If anyone is interested in this task, I am willing to provide all the necessary tips and information.

Are you wondering how to start contributing to this project? Start by reading our contributor guide

Related Issues

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions