Skip to content

Commit 6e21c13

Browse files
authored
[AIRFLOW-XXXX] Fix reference to GCP classes in guides (#7762)
1 parent ce022a3 commit 6e21c13

17 files changed

+123
-124
lines changed

β€Žairflow/providers/google/cloud/example_dags/example_gcs_to_bq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818
"""
19-
Example DAG using GoogleCloudStorageToBigQueryOperator.
19+
Example DAG using GCSToBigQueryOperator.
2020
"""
2121
from airflow import models
2222
from airflow.operators.bash import BashOperator

β€Žairflow/providers/google/cloud/operators/cloud_sql.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class CloudSQLCreateInstanceOperator(CloudSQLBaseOperator):
213213
214214
.. seealso::
215215
For more information on how to use this operator, take a look at the guide:
216-
:ref:`howto/operator:CloudSqlInstanceCreateOperator`
216+
:ref:`howto/operator:CloudSQLCreateInstanceOperator`
217217
218218
:param body: Body required by the Cloud SQL insert API, as described in
219219
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/insert
@@ -297,7 +297,7 @@ class CloudSQLInstancePatchOperator(CloudSQLBaseOperator):
297297
298298
.. seealso::
299299
For more information on how to use this operator, take a look at the guide:
300-
:ref:`howto/operator:CloudSqlInstancePatchOperator`
300+
:ref:`howto/operator:CloudSQLInstancePatchOperator`
301301
302302
:param body: Body required by the Cloud SQL patch API, as described in
303303
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/patch#request-body
@@ -356,7 +356,7 @@ class CloudSQLDeleteInstanceOperator(CloudSQLBaseOperator):
356356
357357
.. seealso::
358358
For more information on how to use this operator, take a look at the guide:
359-
:ref:`howto/operator:CloudSqlInstanceDeleteOperator`
359+
:ref:`howto/operator:CloudSQLDeleteInstanceOperator`
360360
361361
:param instance: Cloud SQL instance ID. This does not include the project ID.
362362
:type instance: str
@@ -404,7 +404,7 @@ class CloudSQLCreateInstanceDatabaseOperator(CloudSQLBaseOperator):
404404
405405
.. seealso::
406406
For more information on how to use this operator, take a look at the guide:
407-
:ref:`howto/operator:CloudSqlInstanceDatabaseCreateOperator`
407+
:ref:`howto/operator:CloudSQLCreateInstanceDatabaseOperator`
408408
409409
:param instance: Database instance ID. This does not include the project ID.
410410
:type instance: str
@@ -481,7 +481,7 @@ class CloudSQLPatchInstanceDatabaseOperator(CloudSQLBaseOperator):
481481
482482
.. seealso::
483483
For more information on how to use this operator, take a look at the guide:
484-
:ref:`howto/operator:CloudSqlInstanceDatabasePatchOperator`
484+
:ref:`howto/operator:CloudSQLPatchInstanceDatabaseOperator`
485485
486486
:param instance: Database instance ID. This does not include the project ID.
487487
:type instance: str
@@ -558,7 +558,7 @@ class CloudSQLDeleteInstanceDatabaseOperator(CloudSQLBaseOperator):
558558
559559
.. seealso::
560560
For more information on how to use this operator, take a look at the guide:
561-
:ref:`howto/operator:CloudSqlInstanceDatabaseDeleteOperator`
561+
:ref:`howto/operator:CloudSQLDeleteInstanceDatabaseOperator`
562562
563563
:param instance: Database instance ID. This does not include the project ID.
564564
:type instance: str
@@ -622,7 +622,7 @@ class CloudSQLExportInstanceOperator(CloudSQLBaseOperator):
622622
623623
.. seealso::
624624
For more information on how to use this operator, take a look at the guide:
625-
:ref:`howto/operator:CloudSqlInstanceImportOperator`
625+
:ref:`howto/operator:CloudSQLExportInstanceOperator`
626626
627627
:param instance: Cloud SQL instance ID. This does not include the project ID.
628628
:type instance: str
@@ -702,7 +702,7 @@ class CloudSQLImportInstanceOperator(CloudSQLBaseOperator):
702702
703703
.. seealso::
704704
For more information on how to use this operator, take a look at the guide:
705-
:ref:`howto/operator:CloudSqlInstanceImportOperator`
705+
:ref:`howto/operator:CloudSQLImportInstanceOperator`
706706
707707
:param instance: Cloud SQL instance ID. This does not include the project ID.
708708
:type instance: str
@@ -767,7 +767,7 @@ class CloudSQLExecuteQueryOperator(BaseOperator):
767767
768768
.. seealso::
769769
For more information on how to use this operator, take a look at the guide:
770-
:ref:`howto/operator:CloudSqlQueryOperator`
770+
:ref:`howto/operator:CloudSQLExecuteQueryOperator`
771771
772772
:param sql: SQL query or list of queries to run (should be DML or DDL query -
773773
this operator does not return any data from the database,

β€Žairflow/providers/google/cloud/operators/gcs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ class GCSBucketCreateAclEntryOperator(BaseOperator):
401401
402402
.. seealso::
403403
For more information on how to use this operator, take a look at the guide:
404-
:ref:`howto/operator:GoogleCloudStorageBucketCreateAclEntryOperator`
404+
:ref:`howto/operator:GCSBucketCreateAclEntryOperator`
405405
406406
:param bucket: Name of a bucket.
407407
:type bucket: str
@@ -465,7 +465,7 @@ class GCSObjectCreateAclEntryOperator(BaseOperator):
465465
466466
.. seealso::
467467
For more information on how to use this operator, take a look at the guide:
468-
:ref:`howto/operator:GoogleCloudStorageObjectCreateAclEntryOperator`
468+
:ref:`howto/operator:GCSObjectCreateAclEntryOperator`
469469
470470
:param bucket: Name of a bucket.
471471
:type bucket: str

β€Žairflow/providers/google/cloud/operators/gcs_to_bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class GCSToBigQueryOperator(BaseOperator):
4040
4141
.. seealso::
4242
For more information on how to use this operator, take a look at the guide:
43-
:ref:`howto/operator:GoogleCloudStorageToBigQueryOperator`
43+
:ref:`howto/operator:GCSToBigQueryOperator`
4444
4545
:param bucket: The bucket to load from. (templated)
4646
:type bucket: str

β€Žairflow/providers/google/cloud/operators/text_to_speech.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CloudTextToSpeechSynthesizeOperator(BaseOperator):
3838
3939
.. seealso::
4040
For more information on how to use this operator, take a look at the guide:
41-
:ref:`howto/operator:GcpTextToSpeechSynthesizeOperator`
41+
:ref:`howto/operator:CloudTextToSpeechSynthesizeOperator`
4242
4343
:param input_data: text input to be synthesized. See more:
4444
https://googleapis.github.io/google-cloud-python/latest/texttospeech/gapic/v1/types.html#google.cloud.texttospeech_v1.types.SynthesisInput

β€Žairflow/providers/google/cloud/operators/vision.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CloudVisionCreateProductSetOperator(BaseOperator):
4141
4242
.. seealso::
4343
For more information on how to use this operator, take a look at the guide:
44-
:ref:`howto/operator:CloudVisionProductSetCreateOperator`
44+
:ref:`howto/operator:CloudVisionCreateProductSetOperator`
4545
4646
:param product_set: (Required) The ProductSet to create. If a dict is provided, it must be of the same
4747
form as the protobuf message `ProductSet`.
@@ -123,7 +123,7 @@ class CloudVisionGetProductSetOperator(BaseOperator):
123123
124124
.. seealso::
125125
For more information on how to use this operator, take a look at the guide:
126-
:ref:`howto/operator:CloudVisionProductSetGetOperator`
126+
:ref:`howto/operator:CloudVisionGetProductSetOperator`
127127
128128
:param location: (Required) The region where the ProductSet is located. Valid regions (as of 2019-02-05)
129129
are: us-east1, us-west1, europe-west1, asia-east1
@@ -200,7 +200,7 @@ class CloudVisionUpdateProductSetOperator(BaseOperator):
200200
201201
.. seealso::
202202
For more information on how to use this operator, take a look at the guide:
203-
:ref:`howto/operator:CloudVisionProductSetUpdateOperator`
203+
:ref:`howto/operator:CloudVisionUpdateProductSetOperator`
204204
205205
:param product_set: (Required) The ProductSet resource which replaces the one on the
206206
server. If a dict is provided, it must be of the same form as the protobuf
@@ -282,7 +282,7 @@ class CloudVisionDeleteProductSetOperator(BaseOperator):
282282
283283
.. seealso::
284284
For more information on how to use this operator, take a look at the guide:
285-
:ref:`howto/operator:CloudVisionProductSetDeleteOperator`
285+
:ref:`howto/operator:CloudVisionDeleteProductSetOperator`
286286
287287
:param location: (Required) The region where the ProductSet is located. Valid regions (as of 2019-02-05)
288288
are: us-east1, us-west1, europe-west1, asia-east1
@@ -354,7 +354,7 @@ class CloudVisionCreateProductOperator(BaseOperator):
354354
355355
.. seealso::
356356
For more information on how to use this operator, take a look at the guide:
357-
:ref:`howto/operator:CloudVisionProductCreateOperator`
357+
:ref:`howto/operator:CloudVisionCreateProductOperator`
358358
359359
:param location: (Required) The region where the Product should be created. Valid regions
360360
(as of 2019-02-05) are: us-east1, us-west1, europe-west1, asia-east1
@@ -439,7 +439,7 @@ class CloudVisionGetProductOperator(BaseOperator):
439439
440440
.. seealso::
441441
For more information on how to use this operator, take a look at the guide:
442-
:ref:`howto/operator:CloudVisionProductGetOperator`
442+
:ref:`howto/operator:CloudVisionGetProductOperator`
443443
444444
:param location: (Required) The region where the Product is located. Valid regions (as of 2019-02-05) are:
445445
us-east1, us-west1, europe-west1, asia-east1
@@ -527,7 +527,7 @@ class CloudVisionUpdateProductOperator(BaseOperator):
527527
528528
.. seealso::
529529
For more information on how to use this operator, take a look at the guide:
530-
:ref:`howto/operator:CloudVisionProductUpdateOperator`
530+
:ref:`howto/operator:CloudVisionUpdateProductOperator`
531531
532532
:param product: (Required) The Product resource which replaces the one on the server. product.name is
533533
immutable. If a dict is provided, it must be of the same form as the protobuf message `Product`.
@@ -614,7 +614,7 @@ class CloudVisionDeleteProductOperator(BaseOperator):
614614
615615
.. seealso::
616616
For more information on how to use this operator, take a look at the guide:
617-
:ref:`howto/operator:CloudVisionProductDeleteOperator`
617+
:ref:`howto/operator:CloudVisionDeleteProductOperator`
618618
619619
:param location: (Required) The region where the Product is located. Valid regions (as of 2019-02-05) are:
620620
us-east1, us-west1, europe-west1, asia-east1
@@ -680,7 +680,7 @@ class CloudVisionImageAnnotateOperator(BaseOperator):
680680
681681
.. seealso::
682682
For more information on how to use this operator, take a look at the guide:
683-
:ref:`howto/operator:CloudVisionAnnotateImageOperator`
683+
:ref:`howto/operator:CloudVisionImageAnnotateOperator`
684684
685685
:param request: (Required) Annotation request for image or a batch.
686686
If a dict is provided, it must be of the same form as the protobuf
@@ -738,7 +738,7 @@ class CloudVisionCreateReferenceImageOperator(BaseOperator):
738738
739739
.. seealso::
740740
For more information on how to use this operator, take a look at the guide:
741-
:ref:`howto/operator:CloudVisionReferenceImageCreateOperator`
741+
:ref:`howto/operator:CloudVisionCreateReferenceImageOperator`
742742
743743
:param location: (Required) The region where the Product is located. Valid regions (as of 2019-02-05) are:
744744
us-east1, us-west1, europe-west1, asia-east1
@@ -1051,7 +1051,7 @@ class CloudVisionTextDetectOperator(BaseOperator):
10511051
10521052
.. seealso::
10531053
For more information on how to use this operator, take a look at the guide:
1054-
:ref:`howto/operator:CloudVisionDetectDocumentTextOperator`
1054+
:ref:`howto/operator:CloudVisionTextDetectOperator`
10551055
10561056
:param image: (Required) The image to analyze. See more:
10571057
https://googleapis.github.io/google-cloud-python/latest/vision/gapic/v1/types.html#google.cloud.vision_v1.types.Image

β€Ždocs/howto/define_extra_link.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ tasks using :class:`~airflow.providers.amazon.aws.operators.gcs_to_s3.GCSToS3Ope
8181
name = 'S3'
8282
8383
# Add list of all the operators to which you want to add this OperatorLinks
84-
# Example: operators = [GCSToS3Operator, GoogleCloudStorageToBigQueryOperator]
84+
# Example: operators = [GCSToS3Operator, GCSToBigQueryOperator]
8585
operators = [GCSToS3Operator]
8686
8787
def get_link(self, operator, dttm):

β€Ždocs/howto/operator/gcp/bigquery_dts.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ Creating transfer configuration
4444
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4545

4646
To create DTS transfer configuration you can use
47-
:class:`airflow.providers.google.cloud.operators.bigquery_dts.BigQueryCreateDataTransferOperator`.
47+
:class:`~airflow.providers.google.cloud.operators.bigquery_dts.BigQueryCreateDataTransferOperator`.
4848

4949
In the case of Airflow, the customer needs to create a transfer config with the automatic scheduling disabled
5050
and then trigger a transfer run using a specialized Airflow operator that will call StartManualTransferRuns API
51-
for example :class:`airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDataTransferServiceStartTransferRunsOperator`.
52-
:class:`airflow.providers.google.cloud.operators.bigquery_dts.BigQueryCreateDataTransferOperator` checks if automatic
51+
for example :class:`~airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDataTransferServiceStartTransferRunsOperator`.
52+
:class:`~airflow.providers.google.cloud.operators.bigquery_dts.BigQueryCreateDataTransferOperator` checks if automatic
5353
scheduling option is present in passed configuration. If present then nothing is done, otherwise it's value is
5454
set to ``True``.
5555

@@ -80,7 +80,7 @@ Deleting transfer configuration
8080
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8181

8282
To delete DTS transfer configuration you can use
83-
:class:`airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDeleteDataTransferConfigOperator`.
83+
:class:`~airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDeleteDataTransferConfigOperator`.
8484

8585
Basic usage of the operator:
8686

@@ -101,7 +101,7 @@ Manually starting transfer runs
101101
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102

103103
Start manual transfer runs to be executed now with schedule_time equal to current time.
104-
:class:`airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDataTransferServiceStartTransferRunsOperator`.
104+
:class:`~airflow.providers.google.cloud.operators.bigquery_dts.BigQueryDataTransferServiceStartTransferRunsOperator`.
105105

106106
Basic usage of the operator:
107107

@@ -116,7 +116,7 @@ You can use :ref:`Jinja templating <jinja-templating>` with
116116
parameters which allows you to dynamically determine values.
117117

118118
To check if operation succeeded you can use
119-
:class:`airflow.providers.google.cloud.sensors.bigquery_dts.BigQueryDataTransferServiceTransferRunSensor`.
119+
:class:`~airflow.providers.google.cloud.sensors.bigquery_dts.BigQueryDataTransferServiceTransferRunSensor`.
120120

121121
.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_bigquery_dts.py
122122
:language: python

β€Ždocs/howto/operator/gcp/cloud_memorystore.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Configuration of bucket permissions for import / export
5757

5858
It is necessary to configure permissions for the bucket to import and export data. Too find the service
5959
account for your instance, run the :class:`~airflow.providers.google.cloud.operators.cloud_memorystore.CloudMemorystoreCreateInstanceOperator` or
60-
:class:`~airflow.providers.google.cloud.operators.cloud_memorystore.CloudMemorystoreGetInstancesOperator` and
60+
:class:`~airflow.providers.google.cloud.operators.cloud_memorystore.CloudMemorystoreGetInstanceOperator` and
6161
make a use of the service account listed under ``persistenceIamIdentity``.
6262

63-
You can use :class:`airflow.contrib.operators.gcs.GoogleCloudStorageBucketCreateAclEntryOperator`
63+
You can use :class:`~airflow.providers.google.cloud.operators.gcs.GCSBucketCreateAclEntryOperator`
6464
operator to set permissions.
6565

6666
.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_cloud_memorystore.py

0 commit comments

Comments
 (0)