bkossakowska commented on code in PR #32256:
URL: https://github.com/apache/airflow/pull/32256#discussion_r1281515799
##########
docs/apache-airflow-providers-google/operators/cloud/dataplex.rst:
##########
@@ -142,3 +141,152 @@ To delete a lake you can use:
:dedent: 4
:start-after: [START howto_dataplex_delete_lake_operator]
:end-before: [END howto_dataplex_delete_lake_operator]
+
+Create a data quality
+---------------------
+
+Before you create a dataplex data quality you need to define its body.
+For more information about the available fields to pass when creating a data
quality, visit `Dataplex create data quality API.
<https://cloud.google.com/dataplex/docs/reference/rest/v1/projects.locations.dataScans#DataScan>`__
+
+A simple data quality configuration can look as followed:
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 0
+ :start-after: [START howto_dataplex_data_quality_configuration]
+ :end-before: [END howto_dataplex_data_quality_configuration]
+
+With this configuration we can create the data quality:
+
+:class:`~airflow.providers.google.cloud.operators.dataplex.DataplexCreateDataQualityScanOperator`
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 4
+ :start-after: [START howto_dataplex_create_data_quality_operator]
+ :end-before: [END howto_dataplex_create_data_quality_operator]
+
+Delete a data quality
+---------------------
+
+To delete a data quality you can use:
+
+:class:`~airflow.providers.google.cloud.operators.dataplex.DataplexDeleteDataQualityScanOperator`
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 4
+ :start-after: [START howto_dataplex_delete_data_quality_operator]
+ :end-before: [END howto_dataplex_delete_data_quality_operator]
+
+Run a data quality
+------------------
+
+We have possibility to run Dataplex data quality in the sync mode and async:
+
+:class:`~airflow.providers.google.cloud.operators.dataplex.DataplexRunDataQualityScanOperator`
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 4
+ :start-after: [START howto_dataplex_run_data_quality_operator]
+ :end-before: [END howto_dataplex_run_data_quality_operator]
+
+To check that running Dataplex data quality succeeded you can use:
+
+:class:`~airflow.providers.google.cloud.sensors.dataplex.DataplexDataQualityJobStatusSensor`.
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 4
+ :start-after: [START howto_dataplex_data_scan_job_state_sensor]
+ :end-before: [END howto_dataplex_data_scan_job_state_sensor]
+
+Get a data quality job
+----------------------
+
+To get a data quality job you can use:
+
+:class:`~airflow.providers.google.cloud.operators.dataplex.DataplexGetDataQualityScanResultOperator`
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 4
+ :start-after: [START howto_dataplex_get_data_quality_job_operator]
+ :end-before: [END howto_dataplex_get_data_quality_job_operator]
+
+Create a zone
+-------------
+
+Before you create a dataplex zone you need to define its body.
+
+For more information about the available fields to pass when creating a zone,
visit `Dataplex create zone API.
<https://cloud.google.com/dataplex/docs/reference/rest/v1/projects.locations.lakes.zones#Zone>`__
+
+A simple zone configuration can look as followed:
+
+.. exampleinclude::
/../../tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+ :language: python
+ :dedent: 0
+ :start-after: [START howto_dataplex_zone_configuration]
+ :end-before: [END howto_dataplex_zone_configuration]
+
+With this configuration we can create the zone:
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]