id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
8,700
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py
google.cloud.transfers.facebook_ads_to_gcs.FacebookAdsReportToGcsOperator
from airflow.providers.facebook.ads.hooks.ads import FacebookAdsReportingHook import csv from airflow.providers.google.cloud.hooks.gcs import GCSHook from collections.abc import Sequence from typing import TYPE_CHECKING, Any from airflow.providers.google.version_compat import BaseOperator from airflow.exceptions import...
class FacebookAdsReportToGcsOperator(BaseOperator): ''' Fetch from Facebook Ads API. This converts and saves the data as a temporary JSON file, and uploads the JSON to Google Cloud Storage. .. seealso:: For more information on the Facebook Ads API, take a look at the API docs: https...
8
1
19
0
18
0
2
0.27
1
13
4
0
7
10
7
7
188
14
137
56
110
37
71
36
63
5
1
3
17
8,701
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py
google.cloud.transfers.facebook_ads_to_gcs.FlushAction
from enum import Enum class FlushAction(Enum): """Facebook Ads Export Options.""" EXPORT_ONCE = 'ExportAtOnce' EXPORT_EVERY_ACCOUNT = 'ExportEveryAccount'
class FlushAction(Enum): '''Facebook Ads Export Options.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
49
5
1
3
3
2
1
3
3
2
0
4
0
0
8,702
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py
google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator
from airflow.providers.google.cloud.links.bigquery import BigQueryTableLink from airflow.configuration import conf from typing import TYPE_CHECKING, Any from airflow.providers.google.cloud.triggers.bigquery import BigQueryInsertJobTrigger from airflow.providers.google.version_compat import BaseOperator from airflow.uti...
class GCSToBigQueryOperator(BaseOperator): ''' Loads files from Google Cloud Storage into BigQuery. The schema to be used for the BigQuery table may be specified in one of two ways. You may either directly pass the schema fields in, or you may point the operator to a Google Cloud Storage object nam...
14
4
52
5
45
3
6
0.27
1
17
6
0
11
46
12
12
766
72
549
178
466
148
259
107
243
19
1
7
74
8,703
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py
google.cloud.transfers.gcs_to_gcs.GCSToGCSOperator
from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from collections.abc import Sequence from airflow.providers.google.version_compat import BaseOperator import warnings from airflow.providers.google.cloud.hooks.gcs import GCSHook class GCSToGCSOperator(BaseOperator): """ Copies ...
class GCSToGCSOperator(BaseOperator): ''' Copies objects from a bucket to another, with renaming if requested. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:GCSToGCSOperator` :param source_bucket: The source Google Cloud St...
11
4
38
4
25
9
5
0.81
1
10
4
0
10
16
10
10
538
65
262
78
228
212
148
58
134
10
1
2
51
8,704
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_local.py
google.cloud.transfers.gcs_to_local.GCSToLocalFilesystemOperator
from airflow.providers.google.version_compat import BaseOperator from airflow.exceptions import AirflowException from airflow.providers.google.cloud.hooks.gcs import GCSHook from collections.abc import Sequence class GCSToLocalFilesystemOperator(BaseOperator): """ Downloads a file from Google Cloud Storage. ...
class GCSToLocalFilesystemOperator(BaseOperator): ''' Downloads a file from Google Cloud Storage. If a filename is supplied, it writes the file to the specified location, alternatively one can set the ``store_to_xcom_key`` parameter to True push the file content into xcom. When the file size exceed...
4
1
15
1
15
0
2
0.59
1
7
3
0
3
7
3
3
94
9
54
29
37
32
28
18
22
3
1
2
7
8,705
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_sftp.py
google.cloud.transfers.gcs_to_sftp.GCSToSFTPOperator
import os from airflow.providers.google.version_compat import BaseOperator from airflow.providers.sftp.hooks.sftp import SFTPHook from functools import cached_property from tempfile import NamedTemporaryFile from airflow.exceptions import AirflowException from airflow.providers.google.cloud.hooks.gcs import GCSHook fro...
class GCSToSFTPOperator(BaseOperator): ''' Transfer files from a Google Cloud Storage bucket to SFTP server. .. code-block:: python with models.DAG( "example_gcs_to_sftp", start_date=datetime(2020, 6, 19), schedule=None, ) as dag: # downloads ...
8
2
20
2
18
1
3
0.53
1
8
4
0
6
9
6
6
196
23
114
51
85
60
59
31
49
5
1
2
16
8,706
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gdrive_to_gcs.py
google.cloud.transfers.gdrive_to_gcs.GoogleDriveToGCSOperator
from collections.abc import Sequence from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.providers.google.suite.hooks.drive import GoogleDriveHook from airflow.providers.google.version_compat import BaseOperator class GoogleDriveToGCSOperator(BaseOperator): """ Writes a Google Drive file ...
class GoogleDriveToGCSOperator(BaseOperator): ''' Writes a Google Drive file into Google Cloud Storage. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:GoogleDriveToGCSOperator` :param bucket_name: The destination Google clou...
4
2
18
0
18
0
1
0.49
1
5
2
0
2
7
2
2
72
5
45
26
31
22
17
14
14
1
1
1
2
8,707
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/gdrive_to_local.py
google.cloud.transfers.gdrive_to_local.GoogleDriveToLocalOperator
from airflow.providers.google.version_compat import BaseOperator from airflow.providers.google.suite.hooks.drive import GoogleDriveHook from collections.abc import Sequence class GoogleDriveToLocalOperator(BaseOperator): """ Writes a Google Drive file into local Storage. .. seealso:: For more info...
class GoogleDriveToLocalOperator(BaseOperator): ''' Writes a Google Drive file into local Storage. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:GoogleDriveToLocalOperator` :param output_file: Path to downloaded file :p...
3
1
15
1
15
0
1
0.51
1
4
1
0
2
6
2
2
62
6
37
23
24
19
16
12
13
1
1
1
2
8,708
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/local_to_gcs.py
google.cloud.transfers.local_to_gcs.LocalFilesystemToGCSOperator
import os from collections.abc import Sequence from glob import glob from airflow.providers.google.version_compat import BaseOperator from airflow.providers.google.cloud.hooks.gcs import GCSHook class LocalFilesystemToGCSOperator(BaseOperator): """ Uploads a file or list of files to Google Cloud Storage; optio...
class LocalFilesystemToGCSOperator(BaseOperator): ''' Uploads a file or list of files to Google Cloud Storage; optionally can compress the file for upload; optionally can upload the data in multiple chunks. .. seealso:: For more information on how to use this operator, take a look at the guide: ...
4
2
29
2
26
2
4
0.35
1
11
2
0
3
8
3
3
124
13
85
42
62
30
41
26
34
6
1
2
12
8,709
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py
google.cloud.transfers.mssql_to_gcs.MSSQLToGCSOperator
from collections.abc import Sequence from functools import cached_property import datetime from airflow.providers.microsoft.mssql.hooks.mssql import MsSqlHook from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator import decimal class MSSQLToGCSOperator(BaseSQLToGCSOperator): """ ...
class MSSQLToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from Microsoft SQL Server to Google Cloud Storage in JSON, CSV or Parquet format. :param bit_fields: Sequence of fields names of MSSQL "BIT" data type, to be interpreted in the schema as "BOOLEAN". "BIT" fields that won't be incl...
9
3
10
1
8
1
2
0.69
1
10
2
1
5
3
6
23
102
17
51
27
33
35
34
18
24
3
2
1
10
8,710
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/mysql_to_gcs.py
google.cloud.transfers.mysql_to_gcs.MySQLToGCSOperator
from airflow.providers.mysql.hooks.mysql import MySqlHook from functools import cached_property import base64 from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator from decimal import Decimal from datetime import date, datetime, time, timedelta class MySQLToGCSOperator(BaseSQLToGCSOperat...
class MySQLToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from MySQL to Google Cloud Storage in JSON, CSV or Parquet format. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:MySQLToGCSOperator` :param mysql_conn_id: Refere...
8
3
14
1
10
3
3
0.39
1
13
2
1
6
3
6
23
122
13
79
23
68
31
47
21
37
9
2
2
17
8,711
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/oracle_to_gcs.py
google.cloud.transfers.oracle_to_gcs.OracleToGCSOperator
import calendar import oracledb from airflow.providers.oracle.hooks.oracle import OracleHook import base64 from datetime import date, datetime, timedelta from functools import cached_property from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator from decimal import Decimal class OracleTo...
class OracleToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from Oracle to Google Cloud Storage in JSON, CSV or Parquet format. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:OracleToGCSOperator` :param oracle_conn_id: Re...
8
3
15
1
11
4
4
0.64
1
11
1
0
4
2
4
21
93
11
56
15
51
36
36
15
31
9
2
2
14
8,712
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/postgres_to_gcs.py
google.cloud.transfers.postgres_to_gcs.PostgresToGCSOperator
from airflow.providers.postgres.hooks.postgres import USE_PSYCOPG3, PostgresHook from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator import time import json from decimal import Decimal import uuid import pendulum import datetime from functools import cached_property from slugify import ...
class PostgresToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from Postgres to Google Cloud Storage in JSON, CSV or Parquet format. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:PostgresToGCSOperator` :param postgres_con...
9
4
13
1
11
2
2
0.27
1
12
3
1
7
6
7
24
133
15
94
37
75
25
54
26
43
7
2
2
17
8,713
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/postgres_to_gcs.py
google.cloud.transfers.postgres_to_gcs._PostgresServerSideCursorDecorator
from airflow.providers.postgres.hooks.postgres import USE_PSYCOPG3, PostgresHook class _PostgresServerSideCursorDecorator: """ Inspired by `_PrestoToGCSPrestoCursorAdapter` to keep this consistent. Decorator for allowing description to be available for postgres cursor in case server side cursor is use...
class _PostgresServerSideCursorDecorator: ''' Inspired by `_PrestoToGCSPrestoCursorAdapter` to keep this consistent. Decorator for allowing description to be available for postgres cursor in case server side cursor is used. It doesn't provide other methods except those needed in BaseSQLToGCSOperator, ...
6
4
5
0
5
0
2
0.33
0
0
0
0
4
3
4
4
33
5
21
10
15
7
19
9
14
3
0
2
7
8,714
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py
google.cloud.transfers.presto_to_gcs.PrestoToGCSOperator
from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator from airflow.providers.presto.hooks.presto import PrestoHook class PrestoToGCSOperator(BaseSQLToGCSOperator): """ Copy data from PrestoDB to Google Cloud Storage in JSON, CSV or Parquet format. :param presto_conn_id: Refe...
class PrestoToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from PrestoDB to Google Cloud Storage in JSON, CSV or Parquet format. :param presto_conn_id: Reference to a specific Presto hook. ''' def __init__(self, *, presto_conn_id: str='presto_default', **kwargs): pass def query(se...
5
4
7
1
4
2
1
0.4
1
5
2
0
4
1
4
21
64
9
40
14
35
16
20
14
15
1
2
0
4
8,715
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py
google.cloud.transfers.presto_to_gcs._PrestoToGCSPrestoCursorAdapter
from typing import TYPE_CHECKING, Any class _PrestoToGCSPrestoCursorAdapter: """ An adapter that adds additional feature to the Presto cursor. The implementation of cursor in the prestodb library is not sufficient. The following changes have been made: * The poke mechanism for row. You can look a...
class _PrestoToGCSPrestoCursorAdapter: ''' An adapter that adds additional feature to the Presto cursor. The implementation of cursor in the prestodb library is not sufficient. The following changes have been made: * The poke mechanism for row. You can look at the next row without consuming it. ...
14
11
8
1
4
3
2
0.88
0
7
0
0
11
3
11
11
114
22
49
22
35
43
47
20
35
4
0
2
17
8,716
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/s3_to_gcs.py
google.cloud.transfers.s3_to_gcs.S3ToGCSOperator
from airflow.configuration import conf from airflow.providers.google.cloud.triggers.cloud_storage_transfer_service import CloudStorageTransferServiceCreateJobsTrigger from collections.abc import Sequence from tempfile import NamedTemporaryFile from typing import TYPE_CHECKING, Any from airflow.providers.google.cloud.ho...
class S3ToGCSOperator(S3ListOperator): ''' Synchronizes an S3 key, possibly a prefix, with a Google Cloud Storage destination path. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:S3ToGCSOperator` :param bucket: The S3 bucket...
14
6
18
2
14
2
2
0.48
1
19
7
0
12
10
12
14
300
44
174
75
140
83
103
57
86
4
2
3
27
8,717
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/salesforce_to_gcs.py
google.cloud.transfers.salesforce_to_gcs.SalesforceToGcsOperator
from airflow.providers.salesforce.hooks.salesforce import SalesforceHook from airflow.providers.google.cloud.hooks.gcs import GCSHook import os from airflow.providers.google.version_compat import BaseOperator import tempfile from collections.abc import Sequence class SalesforceToGcsOperator(BaseOperator): """ ...
class SalesforceToGcsOperator(BaseOperator): ''' Submits Salesforce query and uploads results to Google Cloud Storage. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:SalesforceToGcsOperator` :param query: The query to make t...
3
1
28
2
26
0
1
0.35
1
7
2
0
2
11
2
2
89
8
60
38
42
21
28
22
25
1
1
1
2
8,718
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/sftp_to_gcs.py
google.cloud.transfers.sftp_to_gcs.SFTPToGCSOperator
from functools import cached_property from airflow.providers.sftp.hooks.sftp import SFTPHook from airflow.providers.google.version_compat import BaseOperator from tempfile import NamedTemporaryFile import os from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.exceptions import AirflowException fro...
class SFTPToGCSOperator(BaseOperator): ''' Transfer files to Google Cloud Storage from SFTP server. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:SFTPToGCSOperator` :param source_path: The sftp remote path. This is the spec...
11
2
18
2
16
1
3
0.33
1
8
4
0
5
10
7
7
180
22
119
57
85
39
60
33
49
6
1
3
18
8,719
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/sheets_to_gcs.py
google.cloud.transfers.sheets_to_gcs.GoogleSheetsToGCSOperator
from airflow.providers.google.suite.hooks.sheets import GSheetsHook from collections.abc import Sequence import csv from tempfile import NamedTemporaryFile from typing import TYPE_CHECKING, Any from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.providers.google.version_compat import BaseOperator ...
class GoogleSheetsToGCSOperator(BaseOperator): ''' Writes Google Sheet data into Google Cloud Storage. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:GoogleSheetsToGCSOperator` :param spreadsheet_id: The Google Sheet ID to i...
4
1
22
1
20
1
2
0.39
1
7
2
0
3
6
3
3
103
10
67
39
47
26
31
22
27
2
1
1
5
8,720
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py
google.cloud.transfers.sql_to_gcs.BaseSQLToGCSOperator
from airflow.providers.google.version_compat import BaseOperator from tempfile import NamedTemporaryFile import csv from airflow.providers.google.cloud.hooks.gcs import GCSHook import json from typing import TYPE_CHECKING, Any from collections.abc import Sequence import os import pyarrow as pa import abc import pyarrow...
class BaseSQLToGCSOperator(BaseOperator): ''' Copy data from SQL to Google Cloud Storage in JSON, CSV, or Parquet format. :param sql: The SQL to execute. :param bucket: The bucket to upload to. :param filename: The filename to use as the object name when uploading to Google Cloud Storage. A...
22
12
23
2
18
2
3
0.28
1
14
1
7
16
20
17
17
478
59
329
121
282
93
216
94
196
24
1
5
58
8,721
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py
google.cloud.transfers.trino_to_gcs.TrinoToGCSOperator
from airflow.providers.trino.hooks.trino import TrinoHook from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator from functools import cached_property class TrinoToGCSOperator(BaseSQLToGCSOperator): """ Copy data from TrinoDB to Google Cloud Storage in JSON, CSV or Parquet format....
class TrinoToGCSOperator(BaseSQLToGCSOperator): ''' Copy data from TrinoDB to Google Cloud Storage in JSON, CSV or Parquet format. :param trino_conn_id: Reference to a specific Trino hook. ''' def __init__(self, *, trino_conn_id: str='trino_default', **kwargs): pass @cached_property ...
8
4
7
1
6
1
1
0.28
1
6
3
1
6
2
6
23
84
12
57
22
46
16
31
20
21
2
2
1
7
8,722
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py
google.cloud.transfers.trino_to_gcs._TrinoToGCSTrinoCursorAdapter
from typing import TYPE_CHECKING, Any class _TrinoToGCSTrinoCursorAdapter: """ An adapter that adds additional feature to the Trino cursor. The implementation of cursor in the trino library is not sufficient. The following changes have been made: * The poke mechanism for row. You can look at the ...
class _TrinoToGCSTrinoCursorAdapter: ''' An adapter that adds additional feature to the Trino cursor. The implementation of cursor in the trino library is not sufficient. The following changes have been made: * The poke mechanism for row. You can look at the next row without consuming it. * The...
14
11
8
1
4
3
2
0.88
0
7
0
0
11
3
11
11
114
22
49
22
35
43
47
20
35
4
0
2
17
8,723
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryCheckTrigger
from typing import TYPE_CHECKING, Any, SupportsAbs from airflow.triggers.base import BaseTrigger, TriggerEvent from collections.abc import AsyncIterator, Sequence import asyncio class BigQueryCheckTrigger(BigQueryInsertJobTrigger): """BigQueryCheckTrigger run on the trigger worker.""" def serialize(self) -> t...
class BigQueryCheckTrigger(BigQueryInsertJobTrigger): '''BigQueryCheckTrigger run on the trigger worker.''' def serialize(self) -> tuple[str, dict[str, Any]]: '''Serialize BigQueryCheckTrigger arguments and classpath.''' pass async def run(self) -> AsyncIterator[TriggerEvent]: '''...
3
3
30
1
27
3
4
0.13
1
7
1
0
2
1
2
41
64
3
55
9
52
7
23
8
20
6
6
4
7
8,724
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryGetDataTrigger
import asyncio from collections.abc import AsyncIterator, Sequence from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import TYPE_CHECKING, Any, SupportsAbs class BigQueryGetDataTrigger(BigQueryInsertJobTrigger): """ BigQueryGetDataTrigger run on the trigger worker, inherits from BigQueryI...
class BigQueryGetDataTrigger(BigQueryInsertJobTrigger): ''' BigQueryGetDataTrigger run on the trigger worker, inherits from BigQueryInsertJobTrigger class. :param as_dict: if True returns the result as a list of dictionaries, otherwise as list of lists (default: False). ''' def __i...
4
3
19
0
18
1
2
0.16
1
9
1
0
3
3
3
42
67
4
55
11
51
9
25
10
21
5
6
3
7
8,725
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryInsertJobTrigger
import asyncio from asgiref.sync import sync_to_async from collections.abc import AsyncIterator, Sequence from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS from airflow.providers.google.cloud.hooks.bigquery import BigQueryAsyncHook, BigQueryTableAsyncHook from airflow.utils.state import TaskInstanc...
class BigQueryInsertJobTrigger(BaseTrigger): ''' BigQueryInsertJobTrigger run on the trigger worker to perform insert operation. :param conn_id: Reference to google cloud connection id :param job_id: The ID of the job. It will be suffixed with hash of job configuration :param project_id: Google Cl...
9
4
20
0
19
2
2
0.25
1
15
5
4
6
10
6
39
148
8
114
35
95
29
48
22
41
7
5
3
13
8,726
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryIntervalCheckTrigger
from typing import TYPE_CHECKING, Any, SupportsAbs from airflow.triggers.base import BaseTrigger, TriggerEvent from collections.abc import AsyncIterator, Sequence import asyncio class BigQueryIntervalCheckTrigger(BigQueryInsertJobTrigger): """ BigQueryIntervalCheckTrigger run on the trigger worker, inherits fr...
class BigQueryIntervalCheckTrigger(BigQueryInsertJobTrigger): ''' BigQueryIntervalCheckTrigger run on the trigger worker, inherits from BigQueryInsertJobTrigger class. :param conn_id: Reference to google cloud connection id :param first_job_id: The ID of the job 1 performed :param second_job_id: ...
4
3
44
3
39
2
3
0.27
1
13
1
0
3
10
3
42
162
13
118
41
97
32
43
23
39
7
6
4
9
8,727
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryTableExistenceTrigger
from aiohttp.client_exceptions import ClientResponseError from collections.abc import AsyncIterator, Sequence import asyncio from aiohttp import ClientSession from airflow.providers.google.cloud.hooks.bigquery import BigQueryAsyncHook, BigQueryTableAsyncHook from typing import TYPE_CHECKING, Any, SupportsAbs from airfl...
class BigQueryTableExistenceTrigger(BaseTrigger): ''' Initialize the BigQuery Table Existence Trigger with needed parameters. :param project_id: Google Cloud Project where the job is running :param dataset_id: The dataset ID of the requested table. :param table_id: The table ID of the requested tab...
6
4
15
0
12
2
2
0.46
1
13
2
1
5
7
5
38
98
7
63
31
46
29
35
17
29
4
5
3
10
8,728
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryTablePartitionExistenceTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.cloud.hooks.bigquery import BigQueryAsyncHook, BigQueryTableAsyncHook from typing import TYPE_CHECKING, Any, SupportsAbs from collections.abc import AsyncIterator, Sequence import asyncio class BigQueryTablePartitionExistenceTrig...
class BigQueryTablePartitionExistenceTrigger(BigQueryTableExistenceTrigger): ''' Initialize the BigQuery Table Partition Existence Trigger with needed parameters. :param partition_id: The name of the partition to check the existence of. :param project_id: Google Cloud Project where the job is running ...
5
3
14
0
13
1
3
0.39
1
8
2
0
4
4
4
42
80
6
54
13
49
21
31
12
26
6
6
4
10
8,729
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py
google.cloud.triggers.bigquery.BigQueryValueCheckTrigger
import asyncio from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import TYPE_CHECKING, Any, SupportsAbs from collections.abc import AsyncIterator, Sequence class BigQueryValueCheckTrigger(BigQueryInsertJobTrigger): """ BigQueryValueCheckTrigger run on the trigger worker, inherits from Big...
null
4
3
24
0
23
1
3
0.36
1
11
1
0
3
4
3
42
97
4
69
25
52
25
28
11
24
6
6
3
8
8,730
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/bigquery_dts.py
google.cloud.triggers.bigquery_dts.BigQueryDataTransferRunTrigger
from collections.abc import AsyncIterator, Sequence from google.cloud.bigquery_datatransfer_v1 import TransferRun, TransferState from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import Any import asyncio from airflow.providers.google.cloud.hooks.bigquery_dts import AsyncBiqQueryDataTransferServic...
class BigQueryDataTransferRunTrigger(BaseTrigger): ''' Triggers class to watch the Transfer Run state to define when the job is done. :param project_id: The BigQuery project id where the transfer configuration should be :param config_id: ID of the config of the Transfer Run which should be watched. ...
5
3
24
0
23
1
2
0.21
1
11
2
0
4
7
4
37
117
6
92
25
78
19
37
15
32
6
5
3
9
8,731
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_batch.py
google.cloud.triggers.cloud_batch.CloudBatchJobFinishedTrigger
from google.cloud.batch_v1 import Job, JobStatus from airflow.triggers.base import BaseTrigger, TriggerEvent import asyncio from collections.abc import AsyncIterator, Sequence from airflow.providers.google.cloud.hooks.cloud_batch import CloudBatchAsyncHook from typing import Any class CloudBatchJobFinishedTrigger(Base...
class CloudBatchJobFinishedTrigger(BaseTrigger): ''' Cloud Batch trigger to check if templated job has been finished. :param job_name: Required. Name of the job. :param project_id: Required. the Google Cloud project ID in which the job was started. :param location: Optional. the location where job ...
5
3
26
2
22
2
3
0.29
1
11
2
0
4
7
4
37
128
12
90
26
76
26
40
16
35
8
5
4
11
8,732
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_build.py
google.cloud.triggers.cloud_build.CloudBuildCreateBuildTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.cloud.hooks.cloud_build import CloudBuildAsyncHook import asyncio from collections.abc import AsyncIterator, Sequence from typing import Any from google.cloud.devtools.cloudbuild_v1.types import Build class CloudBuildCreateBuildT...
class CloudBuildCreateBuildTrigger(BaseTrigger): ''' CloudBuildCreateBuildTrigger run on the trigger worker to perform create Build operation. :param id_: The ID of the build. :param project_id: Google Cloud Project where the job is running :param gcp_conn_id: Optional, the connection ID used to co...
5
3
20
0
19
1
2
0.27
1
11
2
0
4
6
4
37
100
6
75
22
62
20
31
13
26
6
5
3
9
8,733
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_composer.py
google.cloud.triggers.cloud_composer.CloudComposerAirflowCLICommandTrigger
from airflow.providers.google.cloud.hooks.cloud_composer import CloudComposerAsyncHook from collections.abc import Sequence from typing import Any from airflow.exceptions import AirflowException from airflow.triggers.base import BaseTrigger, TriggerEvent class CloudComposerAirflowCLICommandTrigger(BaseTrigger): ""...
class CloudComposerAirflowCLICommandTrigger(BaseTrigger): '''The trigger wait for the Airflow CLI command result.''' def __init__(self, project_id: str, region: str, environment_id: str, execution_cmd_info: dict, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, po...
5
1
20
1
20
0
1
0.02
1
10
3
0
3
8
3
36
66
5
60
23
47
1
21
13
17
2
5
1
4
8,734
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_composer.py
google.cloud.triggers.cloud_composer.CloudComposerDAGRunTrigger
from typing import Any from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.exceptions import AirflowException import json import asyncio from collections.abc import Sequence from google.cloud.orchestration.airflow.service_v1.types import ExecuteAirflowCommandResponse from dateutil import parser fro...
class CloudComposerDAGRunTrigger(BaseTrigger): '''The trigger wait for the DAG run completion.''' def __init__(self, project_id: str, region: str, environment_id: str, composer_dag_id: str, start_date: datetime, end_date: datetime, allowed_states: list[str], composer_dag_run_id: str | None=None, gcp_conn_id: ...
8
2
22
0
22
0
3
0.02
1
13
3
0
5
12
5
38
118
7
109
43
85
2
42
24
36
5
5
4
13
8,735
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_composer.py
google.cloud.triggers.cloud_composer.CloudComposerExecutionTrigger
from collections.abc import Sequence import asyncio from typing import Any from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.exceptions import AirflowException from airflow.providers.google.cloud.hooks.cloud_composer import CloudComposerAsyncHook class CloudComposerExecutionTrigger(BaseTrigger):...
class CloudComposerExecutionTrigger(BaseTrigger): '''The trigger handles the async communication with the Google Cloud Composer.''' def __init__(self, project_id: str, region: str, operation_name: str, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, pooling_perio...
5
1
16
0
15
0
2
0.02
1
10
3
0
3
7
3
36
52
4
47
20
35
1
20
12
16
4
5
2
6
8,736
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_run.py
google.cloud.triggers.cloud_run.CloudRunJobFinishedTrigger
from collections.abc import AsyncIterator, Sequence from typing import TYPE_CHECKING, Any from airflow.exceptions import AirflowException import asyncio from airflow.providers.google.cloud.hooks.cloud_run import CloudRunAsyncHook from airflow.triggers.base import BaseTrigger, TriggerEvent class CloudRunJobFinishedTrig...
class CloudRunJobFinishedTrigger(BaseTrigger): ''' Cloud Run trigger to check if templated job has been finished. :param operation_name: Required. Name of the operation. :param job_name: Required. Name of the job. :param project_id: Required. the Google Cloud project ID in which the job was started...
5
2
20
1
19
1
3
0.29
1
12
4
0
4
8
4
37
105
8
75
26
60
22
31
16
26
7
5
3
10
8,737
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_run.py
google.cloud.triggers.cloud_run.RunJobStatus
from enum import Enum class RunJobStatus(Enum): """Enum to represent the status of a job run.""" SUCCESS = 'Success' FAIL = 'Fail' TIMEOUT = 'Timeout'
class RunJobStatus(Enum): '''Enum to represent the status of a job run.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
49
6
1
4
4
3
1
4
4
3
0
4
0
0
8,738
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_sql.py
google.cloud.triggers.cloud_sql.CloudSQLExportTrigger
from airflow.providers.google.cloud.hooks.cloud_sql import CloudSQLAsyncHook, CloudSqlOperationStatus from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID from collections.abc import Sequence import asyncio class CloudSQLExportTrig...
class CloudSQLExportTrigger(BaseTrigger): ''' Trigger that periodically polls information from Cloud SQL API to verify job status. Implementation leverages asynchronous transport. ''' def __init__(self, operation_name: str, project_id: str=PROVIDE_PROJECT_ID, gcp_conn_id: str='google_cloud_default...
4
1
23
0
22
0
2
0.06
1
8
3
0
3
6
3
36
77
5
68
19
57
4
26
11
22
5
5
4
7
8,739
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py
google.cloud.triggers.cloud_storage_transfer_service.CloudStorageTransferServiceCheckJobStatusTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID from typing import Any from collections.abc import AsyncIterator, Iterable, Sequence import asyncio from airflow.providers.google.cloud.hooks.cloud_storage_transfer_service import...
class CloudStorageTransferServiceCheckJobStatusTrigger(BaseTrigger): ''' CloudStorageTransferServiceCheckJobStatusTrigger run on the trigger worker to check Cloud Storage Transfer job. :param job_name: The name of the transfer job :param expected_statuses: The expected state of the operation. S...
5
3
18
1
17
1
2
0.29
1
13
3
0
4
6
4
37
96
7
69
24
56
20
28
15
23
5
5
3
8
8,740
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py
google.cloud.triggers.cloud_storage_transfer_service.CloudStorageTransferServiceCreateJobsTrigger
from collections.abc import AsyncIterator, Iterable, Sequence from airflow.providers.google.cloud.hooks.cloud_storage_transfer_service import CloudDataTransferServiceAsyncHook, GcpTransferOperationStatus import asyncio from google.cloud.storage_transfer_v1.types import TransferOperation from google.api_core.exceptions ...
class CloudStorageTransferServiceCreateJobsTrigger(BaseTrigger): ''' StorageTransferJobTrigger run on the trigger worker to perform Cloud Storage Transfer job. :param job_names: List of transfer jobs names. :param project_id: GCP project id. :param poll_interval: Interval in seconds between polls. ...
5
3
22
1
20
1
3
0.12
1
13
3
0
4
4
4
37
100
10
81
27
70
10
43
20
38
10
5
4
13
8,741
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.DataflowJobAutoScalingEventTrigger
import asyncio from typing import TYPE_CHECKING, Any from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.cloud.hooks.dataflow import AsyncDataflowHook, DataflowJobStatus from functools import cached_property from google.cloud.dataflow_v1beta3.types import AutoscalingEvent, Job, Job...
class DataflowJobAutoScalingEventTrigger(BaseTrigger): ''' Trigger that checks for autoscaling events associated with a Dataflow job. :param job_id: Required. ID of the job. :param project_id: Required. The Google Cloud project ID in which the job was started. :param location: Optional. The locatio...
8
5
16
1
13
2
2
0.39
1
13
3
0
6
7
6
39
125
11
82
30
63
32
35
17
28
5
5
3
10
8,742
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.DataflowJobMessagesTrigger
from functools import cached_property from typing import TYPE_CHECKING, Any from collections.abc import Sequence import asyncio from google.cloud.dataflow_v1beta3.types import AutoscalingEvent, Job, JobMessage, JobMetrics, JobType, MetricUpdate from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.pr...
class DataflowJobMessagesTrigger(BaseTrigger): ''' Trigger that checks for job messages associated with a Dataflow job. :param job_id: Required. ID of the job. :param project_id: Required. The Google Cloud project ID in which the job was started. :param location: Optional. The location where the jo...
8
5
16
1
13
2
2
0.39
1
13
3
0
6
7
6
39
125
11
82
30
63
32
35
17
28
5
5
3
10
8,743
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.DataflowJobMetricsTrigger
from google.cloud.dataflow_v1beta3.types import AutoscalingEvent, Job, JobMessage, JobMetrics, JobType, MetricUpdate import asyncio from functools import cached_property from collections.abc import Sequence from airflow.providers.google.cloud.hooks.dataflow import AsyncDataflowHook, DataflowJobStatus from airflow.trigg...
class DataflowJobMetricsTrigger(BaseTrigger): ''' Trigger that checks for metrics associated with a Dataflow job. :param job_id: Required. ID of the job. :param project_id: Required. The Google Cloud project ID in which the job was started. :param location: Optional. The location where the job is e...
8
5
16
1
13
2
2
0.4
1
13
3
0
6
7
6
39
123
11
80
28
63
32
35
17
28
5
5
3
10
8,744
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.DataflowJobStatusTrigger
from airflow.providers.google.cloud.hooks.dataflow import AsyncDataflowHook, DataflowJobStatus from typing import TYPE_CHECKING, Any from functools import cached_property from collections.abc import Sequence import asyncio from airflow.triggers.base import BaseTrigger, TriggerEvent class DataflowJobStatusTrigger(BaseT...
class DataflowJobStatusTrigger(BaseTrigger): ''' Trigger that monitors if a Dataflow job has reached any of the expected statuses. :param job_id: Required. ID of the job. :param expected_statuses: The expected state(s) of the operation. See: https://cloud.google.com/dataflow/docs/reference/rest...
6
3
21
1
18
2
2
0.38
1
12
3
0
4
7
4
37
109
8
73
24
58
28
28
13
23
5
5
3
8
8,745
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.DataflowStartYamlJobTrigger
from google.cloud.dataflow_v1beta3.types import AutoscalingEvent, Job, JobMessage, JobMetrics, JobType, MetricUpdate from typing import TYPE_CHECKING, Any import asyncio from collections.abc import Sequence from airflow.providers.google.cloud.hooks.dataflow import AsyncDataflowHook, DataflowJobStatus from google.cloud....
class DataflowStartYamlJobTrigger(BaseTrigger): ''' Dataflow trigger that checks the state of a Dataflow YAML job. :param job_id: Required. ID of the job. :param project_id: Required. The Google Cloud project ID in which the job was started. :param location: The location where job is executed. If s...
5
3
28
0
26
2
3
0.28
1
10
2
0
4
8
4
37
140
6
105
28
90
29
39
17
34
8
5
3
11
8,746
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py
google.cloud.triggers.dataflow.TemplateJobStartTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import TYPE_CHECKING, Any from airflow.providers.google.cloud.hooks.dataflow import AsyncDataflowHook, DataflowJobStatus import asyncio from collections.abc import Sequence from google.cloud.dataflow_v1beta3 import JobState class TemplateJobStartT...
class TemplateJobStartTrigger(BaseTrigger): ''' Dataflow trigger to check if templated job has been finished. :param project_id: Required. the Google Cloud project ID in which the job was started. :param job_id: Required. ID of the job. :param location: Optional. the location where job is executed....
5
3
23
1
20
2
2
0.32
1
10
2
0
4
7
4
37
114
7
81
24
67
26
33
14
28
6
5
3
9
8,747
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/datafusion.py
google.cloud.triggers.datafusion.DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType from typing import Any import asyncio from airflow.providers.google.cloud.hooks.datafusion import DataFusionAsyncHook from airflow.triggers.base import BaseTrigger, TriggerEvent from collections.abc import AsyncIterator, Sequence class ...
class DataFusionStartPipelineTrigger(BaseTrigger): ''' Trigger to perform checking the pipeline status until it reaches terminate state. :param pipeline_name: Your pipeline name. :param instance_url: Endpoint on which the REST APIs is accessible for the instance. :param pipeline_id: Unique pipeline...
5
3
20
0
19
1
2
0.32
1
13
3
0
4
9
4
37
104
5
76
28
60
24
32
16
27
5
5
3
8
8,748
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataplex.py
google.cloud.triggers.dataplex.DataplexDataProfileJobTrigger
from collections.abc import AsyncIterator, Sequence from airflow.providers.google.cloud.hooks.dataplex import DataplexAsyncHook import asyncio from google.cloud.dataplex_v1.types import DataScanJob from airflow.triggers.base import BaseTrigger, TriggerEvent class DataplexDataProfileJobTrigger(BaseTrigger): """ ...
class DataplexDataProfileJobTrigger(BaseTrigger): ''' DataplexDataProfileJobTrigger runs on the trigger worker and waits for the job to be `SUCCEEDED` state. :param job_id: Optional. The ID of a Dataplex job. :param data_scan_id: Required. DataScan identifier. :param project_id: Google Cloud Projec...
5
2
14
0
14
0
2
0.32
1
8
2
0
4
7
4
37
80
5
57
25
42
18
24
15
19
3
5
2
6
8,749
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataplex.py
google.cloud.triggers.dataplex.DataplexDataQualityJobTrigger
from google.cloud.dataplex_v1.types import DataScanJob import asyncio from airflow.providers.google.cloud.hooks.dataplex import DataplexAsyncHook from collections.abc import AsyncIterator, Sequence from airflow.triggers.base import BaseTrigger, TriggerEvent class DataplexDataQualityJobTrigger(BaseTrigger): """ ...
class DataplexDataQualityJobTrigger(BaseTrigger): ''' DataplexDataQualityJobTrigger runs on the trigger worker and waits for the job to be `SUCCEEDED` state. :param job_id: Optional. The ID of a Dataplex job. :param data_scan_id: Required. DataScan identifier. :param project_id: Google Cloud Projec...
5
2
14
0
14
0
2
0.32
1
8
2
0
4
7
4
37
80
5
57
25
42
18
24
15
19
3
5
2
6
8,750
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocBaseTrigger
from collections.abc import AsyncIterator, Sequence from airflow.providers.google.cloud.hooks.dataproc import DataprocAsyncHook, DataprocHook from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID class DataprocBaseTrigger(BaseTrigge...
class DataprocBaseTrigger(BaseTrigger): '''Base class for Dataproc triggers.''' def __init__(self, region: str, project_id: str=PROVIDE_PROJECT_ID, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, polling_interval_seconds: int=30, cancel_on_kill: bool=True, delete...
4
1
11
0
9
1
1
0.17
1
7
2
5
3
7
3
36
37
3
29
20
16
5
14
11
10
1
5
0
3
8,751
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocBatchTrigger
import asyncio from typing import TYPE_CHECKING, Any from airflow.triggers.base import BaseTrigger, TriggerEvent from google.cloud.dataproc_v1 import Batch, Cluster, ClusterStatus, Job, JobStatus class DataprocBatchTrigger(DataprocBaseTrigger): """ DataprocCreateBatchTrigger run on the trigger worker to perfor...
class DataprocBatchTrigger(DataprocBaseTrigger): ''' DataprocCreateBatchTrigger run on the trigger worker to perform create Build operation. :param batch_id: The ID of the build. :param project_id: Google Cloud Project where the job is running :param region: The Cloud Dataproc region in which to ha...
4
2
11
1
10
0
2
0.57
1
6
1
0
3
3
3
39
53
6
30
8
26
17
16
7
12
3
6
2
5
8,752
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocClusterTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from collections.abc import AsyncIterator, Sequence from google.cloud.dataproc_v1 import Batch, Cluster, ClusterStatus, Job, JobStatus from airflow.exceptions import AirflowException import asyncio from asgiref.sync import sync_to_async from airflow.providers....
class DataprocClusterTrigger(DataprocBaseTrigger): ''' DataprocClusterTrigger run on the trigger worker to perform create Build operation. :param cluster_name: The name of the cluster. :param project_id: Google Cloud Project where the job is running :param region: The Cloud Dataproc region in which...
10
4
15
0
13
2
2
0.34
1
12
4
0
7
3
7
43
134
10
93
18
84
32
47
14
39
7
6
3
15
8,753
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocDeleteClusterTrigger
import asyncio from google.api_core.exceptions import NotFound import time from airflow.triggers.base import BaseTrigger, TriggerEvent from collections.abc import AsyncIterator, Sequence from typing import TYPE_CHECKING, Any class DataprocDeleteClusterTrigger(DataprocBaseTrigger): """ DataprocDeleteClusterTrig...
class DataprocDeleteClusterTrigger(DataprocBaseTrigger): ''' DataprocDeleteClusterTrigger run on the trigger worker to perform delete cluster operation. :param cluster_name: The name of the cluster :param end_time: Time in second left to check the cluster status :param project_id: The ID of the Goo...
4
3
16
0
15
1
2
0.47
1
10
1
0
3
5
3
39
71
4
47
17
37
22
20
8
16
4
6
2
6
8,754
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocOperationTrigger
import re from airflow.triggers.base import BaseTrigger, TriggerEvent import asyncio from typing import TYPE_CHECKING, Any from airflow.providers.google.cloud.utils.dataproc import DataprocOperationType from collections.abc import AsyncIterator, Sequence class DataprocOperationTrigger(DataprocBaseTrigger): """ ...
class DataprocOperationTrigger(DataprocBaseTrigger): ''' Trigger that periodically polls information on a long running operation from Dataproc API to verify status. Implementation leverages asynchronous transport. ''' def __init__(self, name: str, operation_type: str | None=None, **kwargs: Any): ...
4
1
22
0
22
0
3
0.06
1
7
2
0
3
3
3
39
74
4
66
15
62
4
33
14
29
7
6
5
9
8,755
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py
google.cloud.triggers.dataproc.DataprocSubmitTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from asgiref.sync import sync_to_async from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS from airflow.utils.state import TaskInstanceState from google.cloud.dataproc_v1 import Batch, Cluster, ClusterStatus, Job, JobStatus from airflow.exce...
class DataprocSubmitTrigger(DataprocBaseTrigger): ''' DataprocSubmitTrigger run on the trigger worker to perform create Build operation. :param job_id: The ID of a Dataproc job. :param project_id: Google Cloud Project where the job is running :param region: The Cloud Dataproc region in which to han...
8
3
16
0
13
3
2
0.46
1
8
4
0
5
3
5
41
105
8
67
15
60
31
37
12
31
6
6
3
11
8,756
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/gcs.py
google.cloud.triggers.gcs.GCSBlobTrigger
from collections.abc import AsyncIterator from airflow.triggers.base import BaseTrigger, TriggerEvent from aiohttp import ClientSession import asyncio from typing import Any from airflow.providers.google.cloud.hooks.gcs import GCSAsyncHook class GCSBlobTrigger(BaseTrigger): """ A trigger that fires and it find...
class GCSBlobTrigger(BaseTrigger): ''' A trigger that fires and it finds the requested file or folder present in the given bucket. :param bucket: the bucket in the google cloud storage where the objects are residing. :param object_name: the file or folder present in the bucket :param use_glob: if t...
6
4
13
0
11
2
2
0.32
1
12
2
1
5
6
5
38
82
7
57
28
43
18
36
18
30
4
5
3
11
8,757
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/gcs.py
google.cloud.triggers.gcs.GCSCheckBlobUpdateTimeTrigger
from airflow.utils import timezone from collections.abc import AsyncIterator import asyncio from datetime import datetime from aiohttp import ClientSession from typing import Any from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.cloud.hooks.gcs import GCSAsyncHook class GCSCheck...
class GCSCheckBlobUpdateTimeTrigger(BaseTrigger): ''' A trigger that makes an async call to GCS to check whether the object is updated in a bucket. :param bucket: google cloud storage bucket name cloud storage where the objects are residing. :param object_name: the file or folder present in the bucket ...
6
4
17
1
14
3
2
0.31
1
13
2
0
5
6
5
38
100
9
71
32
55
22
41
20
35
5
5
3
12
8,758
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/gcs.py
google.cloud.triggers.gcs.GCSPrefixBlobTrigger
from airflow.providers.google.cloud.hooks.gcs import GCSAsyncHook import asyncio from aiohttp import ClientSession from collections.abc import AsyncIterator from typing import Any from airflow.triggers.base import BaseTrigger, TriggerEvent class GCSPrefixBlobTrigger(GCSBlobTrigger): """ Looks for objects in bu...
class GCSPrefixBlobTrigger(GCSBlobTrigger): ''' Looks for objects in bucket matching a prefix. If none found, sleep for interval and check again. Otherwise, return matches. :param bucket: the bucket in the google cloud storage where the objects are residing. :param prefix: The prefix of the blob_na...
5
4
16
0
13
2
2
0.36
1
12
2
1
4
2
4
42
79
7
53
21
41
19
24
11
19
4
6
3
7
8,759
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/gcs.py
google.cloud.triggers.gcs.GCSUploadSessionTrigger
from datetime import datetime import os from collections.abc import AsyncIterator from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import Any import asyncio class GCSUploadSessionTrigger(GCSPrefixBlobTrigger): """ Return Trigger Event if the inactivity period has passed with no increase ...
class GCSUploadSessionTrigger(GCSPrefixBlobTrigger): ''' Return Trigger Event if the inactivity period has passed with no increase in the number of objects. :param bucket: The Google Cloud Storage bucket where the objects are expected. :param prefix: The name of the prefix to check in the Google cloud ...
6
5
25
1
21
3
3
0.31
1
13
1
0
5
7
5
47
148
12
104
32
87
32
55
19
49
7
7
3
14
8,760
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py
google.cloud.triggers.kubernetes_engine.GKEJobTrigger
import warnings from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import TYPE_CHECKING, Any from airflow.providers.cncf.kubernetes.utils.pod_manager import OnFinishAction, PodManager from functools import cached_property from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults ...
class GKEJobTrigger(BaseTrigger): '''GKEJobTrigger run on the trigger worker to check the state of Job.''' def __init__(self, cluster_url: str, ssl_ca_cert: str, job_name: str, job_namespace: str, pod_names: list[str], pod_namespace: str, base_container_name: str, pod_name: str | None=None, gcp_conn_id: str='...
10
3
22
0
22
1
3
0.04
1
16
7
0
5
12
5
38
121
5
113
47
91
4
44
31
38
9
5
2
13
8,761
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py
google.cloud.triggers.kubernetes_engine.GKEOperationTrigger
from google.cloud.container_v1.types import Operation from collections.abc import AsyncIterator, Sequence from typing import TYPE_CHECKING, Any import asyncio from airflow.providers.google.cloud.hooks.kubernetes_engine import GKEAsyncHook, GKEKubernetesAsyncHook, GKEKubernetesHook from airflow.triggers.base import Base...
class GKEOperationTrigger(BaseTrigger): '''Trigger which checks status of the operation.''' def __init__(self, operation_name: str, project_id: str | None, location: str, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, poll_interval: int=10): pass de...
5
3
20
1
19
1
2
0.05
1
11
2
0
4
7
4
37
86
7
76
24
63
4
33
15
28
5
5
3
9
8,762
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py
google.cloud.triggers.kubernetes_engine.GKEStartPodTrigger
from airflow.providers.google.cloud.hooks.kubernetes_engine import GKEAsyncHook, GKEKubernetesAsyncHook, GKEKubernetesHook from airflow.providers.cncf.kubernetes.triggers.pod import KubernetesPodTrigger from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from airflow.providers.cncf.kubern...
class GKEStartPodTrigger(KubernetesPodTrigger): ''' Trigger for checking pod status until it finishes its job. :param pod_name: The name of the pod. :param pod_namespace: The namespace of the pod. :param cluster_url: The URL pointed to the cluster. :param ssl_ca_cert: SSL certificate that is us...
5
1
29
1
28
0
2
0.29
1
13
3
0
3
15
3
46
117
6
87
39
63
25
26
19
22
3
6
1
5
8,763
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/mlengine.py
google.cloud.triggers.mlengine.MLEngineStartTrainingJobTrigger
from airflow.triggers.base import BaseTrigger, TriggerEvent from airflow.providers.google.cloud.hooks.mlengine import MLEngineAsyncHook from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID from collections.abc import AsyncIterator, Sequence import asyncio from typing import Any class MLEngi...
class MLEngineStartTrainingJobTrigger(BaseTrigger): ''' MLEngineStartTrainingJobTrigger run on the trigger worker to perform starting training job operation. :param conn_id: Reference to google cloud connection id :param job_id: The ID of the job. It will be suffixed with hash of job configuration ...
5
3
21
0
20
1
2
0.13
1
12
2
0
4
15
4
37
98
6
82
39
61
11
39
22
34
5
5
3
8
8,764
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/pubsub.py
google.cloud.triggers.pubsub.PubsubPullTrigger
from airflow.providers.google.cloud.hooks.pubsub import PubSubAsyncHook from airflow.triggers.base import BaseTrigger, TriggerEvent from google.cloud.pubsub_v1.types import ReceivedMessage from collections.abc import AsyncIterator, Sequence import asyncio from functools import cached_property from typing import Any cl...
class PubsubPullTrigger(BaseTrigger): ''' Initialize the Pubsub Pull Trigger with needed parameters. :param project_id: the Google Cloud project ID for the subscription (templated) :param subscription: the Pub/Sub subscription name. Do not include the full subscription path. :param max_messages: Th...
7
2
13
0
13
0
2
0.32
1
13
2
0
5
7
5
38
93
8
65
26
49
21
31
14
25
5
5
4
9
8,765
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.BaseVertexAIJobTrigger
from airflow.exceptions import AirflowException from airflow.triggers.base import BaseTrigger, TriggerEvent from typing import TYPE_CHECKING, Any from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types from collections.abc import AsyncIterator, Sequence class ...
class BaseVertexAIJobTrigger(BaseTrigger): ''' Base class for Vertex AI job triggers. This trigger polls the Vertex AI job and checks its status. In order to use it properly, you must: - implement the following methods `_wait_job()`. - override required `job_type_verbose_name` attribute to prov...
6
2
11
0
11
0
1
0.18
1
11
2
6
5
7
5
38
83
10
62
28
48
11
28
19
22
3
5
1
7
8,766
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.CreateBatchPredictionJobTrigger
from functools import cached_property from airflow.providers.google.cloud.hooks.vertex_ai.batch_prediction_job import BatchPredictionJobAsyncHook from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types class CreateBatchPredictionJobTrigger(BaseVertexAIJobTrigg...
class CreateBatchPredictionJobTrigger(BaseVertexAIJobTrigger): '''CreateBatchPredictionJobTrigger run on the trigger worker to perform create operation.''' @cached_property def async_hook(self) -> BatchPredictionJobAsyncHook: pass async def _wait_job(self) -> types.BatchPredictionJob: ...
4
1
6
0
6
0
1
0.06
1
1
1
0
2
4
2
40
20
3
16
11
12
1
8
6
5
1
6
0
2
8,767
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.CreateHyperparameterTuningJobTrigger
from airflow.providers.google.cloud.hooks.vertex_ai.hyperparameter_tuning_job import HyperparameterTuningJobAsyncHook from functools import cached_property from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types class CreateHyperparameterTuningJobTrigger(BaseV...
class CreateHyperparameterTuningJobTrigger(BaseVertexAIJobTrigger): '''CreateHyperparameterTuningJobTrigger run on the trigger worker to perform create operation.''' @cached_property def async_hook(self) -> HyperparameterTuningJobAsyncHook: pass async def _wait_job(self) -> types.Hyperparamete...
4
1
6
0
6
0
1
0.06
1
1
1
0
2
4
2
40
20
3
16
11
12
1
8
6
5
1
6
0
2
8,768
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.CustomContainerTrainingJobTrigger
from functools import cached_property from airflow.providers.google.cloud.hooks.vertex_ai.custom_job import CustomJobAsyncHook from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types class CustomContainerTrainingJobTrigger(BaseVertexAIJobTrigger): """ ...
class CustomContainerTrainingJobTrigger(BaseVertexAIJobTrigger): ''' Make async calls to Vertex AI to check the state of a running custom container training job. Return the job when it enters a completed state. ''' @cached_property def async_hook(self) -> CustomJobAsyncHook: pass a...
4
1
7
0
7
0
1
0.19
1
1
1
0
2
4
2
40
29
4
21
12
17
4
9
7
6
1
6
0
2
8,769
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.CustomPythonPackageTrainingJobTrigger
from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types from airflow.providers.google.cloud.hooks.vertex_ai.custom_job import CustomJobAsyncHook from functools import cached_property class CustomPythonPackageTrainingJobTrigger(BaseVertexAIJobTrigger): """ ...
class CustomPythonPackageTrainingJobTrigger(BaseVertexAIJobTrigger): ''' Make async calls to Vertex AI to check the state of a running custom python package training job. Return the job when it enters a completed state. ''' @cached_property def async_hook(self) -> CustomJobAsyncHook: pa...
4
1
7
0
7
0
1
0.19
1
1
1
0
2
4
2
40
29
4
21
12
17
4
9
7
6
1
6
0
2
8,770
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.CustomTrainingJobTrigger
from functools import cached_property from airflow.providers.google.cloud.hooks.vertex_ai.custom_job import CustomJobAsyncHook from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types class CustomTrainingJobTrigger(BaseVertexAIJobTrigger): """ Make asyn...
class CustomTrainingJobTrigger(BaseVertexAIJobTrigger): ''' Make async calls to Vertex AI to check the state of a running custom training job. Return the job when it enters a completed state. ''' @cached_property def async_hook(self) -> CustomJobAsyncHook: pass async def _wait_job(...
4
1
7
0
7
0
1
0.19
1
1
1
0
2
4
2
40
29
4
21
12
17
4
9
7
6
1
6
0
2
8,771
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/triggers/vertex_ai.py
google.cloud.triggers.vertex_ai.RunPipelineJobTrigger
from airflow.providers.google.cloud.hooks.vertex_ai.pipeline_job import PipelineJobAsyncHook from google.cloud.aiplatform_v1 import BatchPredictionJob, HyperparameterTuningJob, JobState, PipelineState, types from functools import cached_property class RunPipelineJobTrigger(BaseVertexAIJobTrigger): """Make async ca...
class RunPipelineJobTrigger(BaseVertexAIJobTrigger): '''Make async calls to Vertex AI to check the state of a Pipeline Job.''' @cached_property def async_hook(self) -> PipelineJobAsyncHook: pass async def _wait_job(self) -> types.PipelineJob: pass
4
1
5
0
5
0
1
0.06
1
1
1
0
2
4
2
40
22
3
18
12
14
1
9
7
6
1
6
0
2
8,772
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/credentials_provider.py
google.cloud.utils.credentials_provider._CredentialProvider
from google.auth.credentials import AnonymousCredentials, Credentials import google.auth from collections.abc import Collection, Generator, Sequence from airflow.providers.google.cloud._internal_client.secret_manager_client import _SecretManagerClient from airflow.utils.log.logging_mixin import LoggingMixin from airflo...
class _CredentialProvider(LoggingMixin): ''' Prepare the Credentials object for Google API and the associated project_id. Only either `key_path` or `keyfile_dict` should be provided, or an exception will occur. If neither of them are provided, return default credentials for the current environment ...
11
2
20
2
18
1
4
0.2
1
11
3
0
10
15
10
16
243
29
179
62
151
35
109
44
98
10
1
3
35
8,773
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/dataform.py
google.cloud.utils.dataform.DataformLocations
from enum import Enum class DataformLocations(str, Enum): """Enum for storing available locations for resources in Dataform.""" US = 'US' EUROPE = 'EU'
class DataformLocations(str, Enum): '''Enum for storing available locations for resources in Dataform.''' pass
1
1
0
0
0
0
0
0.33
2
0
0
0
0
0
0
115
5
1
3
3
2
1
3
3
2
0
4
0
0
8,774
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/datafusion.py
google.cloud.utils.datafusion.DataFusionPipelineType
from enum import Enum class DataFusionPipelineType(Enum): """Enum for Data Fusion pipeline types.""" BATCH = 'batch' STREAM = 'stream' @staticmethod def from_str(value: str) -> DataFusionPipelineType: value_to_item = {item.value: item for item in DataFusionPipelineType} if value in...
class DataFusionPipelineType(Enum): '''Enum for Data Fusion pipeline types.''' @staticmethod def from_str(value: str) -> DataFusionPipelineType: pass
3
1
5
0
5
0
2
0.11
1
2
0
0
0
0
1
50
12
2
9
6
6
1
8
5
6
2
4
1
2
8,775
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/dataproc.py
google.cloud.utils.dataproc.DataprocOperationType
from enum import Enum class DataprocOperationType(Enum): """Contains types of long running operations.""" DIAGNOSE = 'DIAGNOSE'
class DataprocOperationType(Enum): '''Contains types of long running operations.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
49
4
1
2
2
1
1
2
2
1
0
4
0
0
8,776
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/external_token_supplier.py
google.cloud.utils.external_token_supplier.CacheTokenSupplier
from airflow.utils.log.logging_mixin import LoggingMixin from google.auth.identity_pool import SubjectTokenSupplier import abc class CacheTokenSupplier(LoggingMixin, SubjectTokenSupplier): """ A superclass for all Subject Token Supplier classes that wish to implement a caching mechanism. Child classes mus...
class CacheTokenSupplier(LoggingMixin, SubjectTokenSupplier): ''' A superclass for all Subject Token Supplier classes that wish to implement a caching mechanism. Child classes must implement the ``get_subject_key`` method to generate a string that serves as the cache key, ensuring that tokens are share...
4
1
2
0
2
0
1
1.17
2
3
0
1
2
0
2
8
17
4
6
4
2
7
5
3
2
1
1
0
2
8,777
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/external_token_supplier.py
google.cloud.utils.external_token_supplier.ClientCredentialsGrantFlowTokenSupplier
from typing import TYPE_CHECKING, Any from google.auth.exceptions import RefreshError import requests class ClientCredentialsGrantFlowTokenSupplier(CacheTokenSupplier): """ Class that retrieves an OIDC token from an external IdP using OAuth2.0 Client Credentials Grant flow. This class implements the ``Sub...
class ClientCredentialsGrantFlowTokenSupplier(CacheTokenSupplier): ''' Class that retrieves an OIDC token from an external IdP using OAuth2.0 Client Credentials Grant flow. This class implements the ``SubjectTokenSupplier`` interface class used by ``google.auth.identity_pool.Credentials`` :params oidc_...
5
3
18
1
15
2
2
0.37
1
9
0
0
3
4
3
11
73
10
46
19
35
17
26
11
22
5
2
1
7
8,778
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/field_sanitizer.py
google.cloud.utils.field_sanitizer.GcpBodyFieldSanitizer
from airflow.utils.log.logging_mixin import LoggingMixin class GcpBodyFieldSanitizer(LoggingMixin): """ Sanitizes the body according to specification. :param sanitize_specs: array of strings that specifies which fields to remove """ def __init__(self, sanitize_specs: list[str]) -> None: ...
class GcpBodyFieldSanitizer(LoggingMixin): ''' Sanitizes the body according to specification. :param sanitize_specs: array of strings that specifies which fields to remove ''' def __init__(self, sanitize_specs: list[str]) -> None: pass def _sanitize(self, dictionary, remaining_field_s...
4
2
15
0
15
0
4
0.11
1
5
0
0
3
1
3
9
55
5
45
11
41
5
26
11
22
8
1
4
11
8,779
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/field_sanitizer.py
google.cloud.utils.field_sanitizer.GcpFieldSanitizerException
from airflow.exceptions import AirflowException class GcpFieldSanitizerException(AirflowException): """Thrown when sanitizer finds unexpected field type in the path (other than dict or array)."""
class GcpFieldSanitizerException(AirflowException): '''Thrown when sanitizer finds unexpected field type in the path (other than dict or array).''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
8,780
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/field_validator.py
google.cloud.utils.field_validator.GcpFieldValidationException
from airflow.exceptions import AirflowException class GcpFieldValidationException(AirflowException): """Thrown when validation finds dictionary field not valid according to specification."""
class GcpFieldValidationException(AirflowException): '''Thrown when validation finds dictionary field not valid according to specification.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
8,781
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/field_validator.py
google.cloud.utils.field_validator.GcpValidationSpecificationException
from airflow.exceptions import AirflowException class GcpValidationSpecificationException(AirflowException): """ Thrown when validation specification is wrong. This should only happen during development as ideally specification itself should not be invalid ;) . """
class GcpValidationSpecificationException(AirflowException): ''' Thrown when validation specification is wrong. This should only happen during development as ideally specification itself should not be invalid ;) . ''' pass
1
1
0
0
0
0
0
5
1
0
0
0
0
0
0
11
7
1
1
1
0
5
1
1
0
0
4
0
0
8,782
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/utils/mlengine_prediction_summary.py
google.cloud.utils.mlengine_prediction_summary.JsonCoder
import json from apache_beam.coders.coders import Coder class JsonCoder(Coder): """JSON encoder/decoder.""" @staticmethod def encode(x): """JSON encoder.""" return json.dumps(x).encode() @staticmethod def decode(x): """JSON decoder.""" return json.loads(x)
class JsonCoder(Coder): '''JSON encoder/decoder.''' @staticmethod def encode(x): '''JSON encoder.''' pass @staticmethod def decode(x): '''JSON decoder.''' pass
5
3
3
0
2
1
1
0.43
1
0
0
0
0
0
2
2
12
2
7
5
2
3
5
3
2
1
1
0
2
8,783
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/deprecated.py
google.common.deprecated.AirflowDeprecationAdapter
from deprecated.classic import ClassicAdapter from typing import Any import inspect from collections.abc import Callable import re from datetime import date, datetime class AirflowDeprecationAdapter(ClassicAdapter): """ Build a detailed deprecation message based on the wrapped object type and other provided de...
class AirflowDeprecationAdapter(ClassicAdapter): ''' Build a detailed deprecation message based on the wrapped object type and other provided details. :param planned_removal_date: The date after which the deprecated object should be removed. The recommended date is six months ahead from today. The ...
14
2
9
0
8
1
2
0.27
1
9
0
0
5
6
9
9
110
12
77
42
54
21
59
28
49
3
1
2
21
8,784
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google.GoogleBaseAsyncHook
from airflow.providers.google.version_compat import BaseHook from asgiref.sync import sync_to_async from typing import TYPE_CHECKING, Any, TypeVar, cast class GoogleBaseAsyncHook(BaseHook): """GoogleBaseAsyncHook inherits from BaseHook class, run on the trigger worker.""" sync_hook_class: Any = None def _...
class GoogleBaseAsyncHook(BaseHook): '''GoogleBaseAsyncHook inherits from BaseHook class, run on the trigger worker.''' def __init__(self, **kwargs: Any) -> None: pass async def get_sync_hook(self) -> Any: '''Sync version of the Google Cloud Hook makes blocking calls in ``__init__``; don'...
5
4
6
1
4
2
2
0.47
1
3
1
17
4
2
4
16
32
7
17
10
12
8
17
10
12
2
2
1
6
8,785
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google.GoogleBaseHook
import requests import google.auth import functools from googleapiclient import discovery from contextlib import ExitStack, contextmanager from google.auth.exceptions import RefreshError from airflow.exceptions import AirflowException from typing import TYPE_CHECKING, Any, TypeVar, cast import google.oauth2.service_acc...
class GoogleBaseHook(BaseHook): ''' A base hook for Google cloud-related hooks. Google cloud has a shared REST API client that is built in the same way no matter which service you use. This class helps construct and authorize the credentials needed to then call googleapiclient.discovery.build() to...
43
21
18
2
13
3
2
0.35
1
17
4
73
14
5
22
34
526
77
332
112
273
117
195
85
163
10
2
3
57
8,786
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google._CredentialsToken
from gcloud.aio.auth.token import Token, TokenResponse from typing import TYPE_CHECKING, Any, TypeVar, cast from asgiref.sync import sync_to_async import datetime import asyncio from collections.abc import Callable, Generator, Sequence import google.oauth2.service_account import google.auth class _CredentialsToken(Tok...
class _CredentialsToken(Token): ''' A token implementation which makes Google credentials objects accessible to [gcloud-aio](https://talkiq.github.io/gcloud-aio/) clients. This class allows us to create token instances from credentials objects and thus supports a variety of use cases for Google credent...
10
1
8
0
7
1
2
0.21
1
10
1
0
5
6
7
7
74
11
53
31
31
11
32
17
24
4
1
2
11
8,787
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google.retry_if_operation_in_progress
import tenacity class retry_if_operation_in_progress(tenacity.retry_if_exception): """Retries if there was an exception in case of operation in progress.""" def __init__(self): super().__init__(is_operation_in_progress_exception)
class retry_if_operation_in_progress(tenacity.retry_if_exception): '''Retries if there was an exception in case of operation in progress.''' def __init__(self): pass
2
1
2
0
2
0
1
0.33
1
1
0
0
1
0
1
1
5
1
3
2
1
1
3
2
1
1
1
0
1
8,788
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google.retry_if_temporary_quota
import tenacity class retry_if_temporary_quota(tenacity.retry_if_exception): """Retries if there was an exception for exceeding the temporary quote limit.""" def __init__(self): super().__init__(is_soft_quota_exception)
class retry_if_temporary_quota(tenacity.retry_if_exception): '''Retries if there was an exception for exceeding the temporary quote limit.''' def __init__(self): pass
2
1
2
0
2
0
1
0.33
1
1
0
0
1
0
1
1
5
1
3
2
1
1
3
2
1
1
1
0
1
8,789
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/base_google.py
google.common.hooks.base_google.retry_if_temporary_refresh_credentials
import tenacity class retry_if_temporary_refresh_credentials(tenacity.retry_if_exception): """Retries if there was an exception for refreshing credentials.""" def __init__(self): super().__init__(is_refresh_credentials_exception)
class retry_if_temporary_refresh_credentials(tenacity.retry_if_exception): '''Retries if there was an exception for refreshing credentials.''' def __init__(self): pass
2
1
2
0
2
0
1
0.33
1
1
0
0
1
0
1
1
5
1
3
2
1
1
3
2
1
1
1
0
1
8,790
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/hooks/discovery_api.py
google.common.hooks.discovery_api.GoogleDiscoveryApiHook
from googleapiclient.discovery import Resource, build from collections.abc import Sequence from airflow.providers.google.common.hooks.base_google import GoogleBaseHook class GoogleDiscoveryApiHook(GoogleBaseHook): """ A hook to use the Google API Discovery Service. :param api_service_name: The name of the...
class GoogleDiscoveryApiHook(GoogleBaseHook): ''' A hook to use the Google API Discovery Service. :param api_service_name: The name of the api service that is needed to get the data for example 'youtube'. :param api_version: The version of the api that will be requested for example 'v3'. :p...
8
3
14
2
10
2
2
0.43
1
6
0
0
7
2
7
41
122
22
70
30
52
30
44
20
36
3
3
2
14
8,791
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/links/storage.py
google.common.links.storage.FileDetailsLink
from airflow.providers.google.cloud.links.base import BaseGoogleLink class FileDetailsLink(BaseGoogleLink): """Helper class for constructing GCS file details link.""" name = 'GCS File Details' key = 'file_details' format_str = GCS_FILE_DETAILS_LINK
class FileDetailsLink(BaseGoogleLink): '''Helper class for constructing GCS file details link.''' pass
1
1
6
0
6
0
1
0.09
1
1
0
0
0
0
1
2
14
2
11
6
8
1
6
5
4
1
2
0
1
8,792
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/links/storage.py
google.common.links.storage.StorageLink
from airflow.providers.google.cloud.links.base import BaseGoogleLink class StorageLink(BaseGoogleLink): """Helper class for constructing GCS Storage link.""" name = 'GCS Storage' key = 'storage_conf' format_str = GCS_STORAGE_LINK
class StorageLink(BaseGoogleLink): '''Helper class for constructing GCS Storage link.''' pass
1
1
6
0
6
0
1
0.09
1
1
0
0
0
0
1
2
14
2
11
6
8
1
6
5
4
1
2
0
1
8,793
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/common/utils/id_token_credentials.py
google.common.utils.id_token_credentials.IDTokenCredentialsAdapter
from google.oauth2 import credentials as oauth2_credentials, service_account from google.auth import credentials as google_auth_credentials, environment_vars, exceptions class IDTokenCredentialsAdapter(google_auth_credentials.Credentials): """Convert Credentials with ``openid`` scope to IDTokenCredentials.""" ...
class IDTokenCredentialsAdapter(google_auth_credentials.Credentials): '''Convert Credentials with ``openid`` scope to IDTokenCredentials.''' def __init__(self, credentials: oauth2_credentials.Credentials): pass @property def expired(self): pass def refresh(self, request): ...
5
1
3
0
3
0
1
0.09
1
1
0
0
3
2
3
3
15
3
11
7
6
1
10
6
6
1
1
0
3
8,794
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/firebase/hooks/firestore.py
google.firebase.hooks.firestore.CloudFirestoreHook
from collections.abc import Sequence from googleapiclient.discovery import build, build_from_document from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook import time from airflow.exceptions import AirflowException class CloudFirestoreHook(GoogleBaseHook): """ Hook f...
class CloudFirestoreHook(GoogleBaseHook): ''' Hook for the Google Firestore APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. :param api_version: API version used (for example v1 or v1beta1). :param gcp_conn_id: The connecti...
6
4
20
2
12
7
2
0.86
1
5
1
0
4
1
4
38
104
13
49
24
36
42
27
16
22
4
3
3
8
8,795
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/firebase/operators/firestore.py
google.firebase.operators.firestore.CloudFirestoreExportDatabaseOperator
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID from airflow.providers.google.version_compat import BaseOperator from airflow.exceptions import AirflowException from airflow.providers.google.firebase.hooks.firestore import CloudFirestoreHook from collections.abc import Sequence class C...
class CloudFirestoreExportDatabaseOperator(BaseOperator): ''' Export documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:CloudFirestoreExp...
4
1
10
0
10
0
1
0.61
1
6
2
0
3
6
3
3
64
6
36
22
22
22
17
12
13
2
1
1
4
8,796
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/leveldb/hooks/leveldb.py
google.leveldb.hooks.leveldb.LevelDBHook
from typing import Any from airflow.providers.google.version_compat import BaseHook from airflow.exceptions import AirflowException, AirflowOptionalProviderFeatureException class LevelDBHook(BaseHook): """ Plyvel Wrapper to Interact With LevelDB Database. `LevelDB Connection Documentation <https://plyvel....
class LevelDBHook(BaseHook): ''' Plyvel Wrapper to Interact With LevelDB Database. `LevelDB Connection Documentation <https://plyvel.readthedocs.io/en/latest/>`__ ''' @classmethod def get_connection_form_widgets(cls) -> dict[str, Any]: '''Return connection widgets to add to LevelDB conn...
13
10
13
1
7
5
3
0.66
1
9
2
0
8
3
8
20
119
16
62
26
46
41
51
18
42
8
2
2
22
8,797
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/leveldb/hooks/leveldb.py
google.leveldb.hooks.leveldb.LevelDBHookException
from airflow.exceptions import AirflowException, AirflowOptionalProviderFeatureException class LevelDBHookException(AirflowException): """Exception specific for LevelDB."""
class LevelDBHookException(AirflowException): '''Exception specific for LevelDB.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
8,798
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/leveldb/operators/leveldb.py
google.leveldb.operators.leveldb.LevelDBOperator
from typing import TYPE_CHECKING, Any from airflow.providers.google.version_compat import BaseOperator from airflow.providers.google.leveldb.hooks.leveldb import LevelDBHook class LevelDBOperator(BaseOperator): """ Execute command in LevelDB. .. seealso:: For more information on how to use this op...
class LevelDBOperator(BaseOperator): ''' Execute command in LevelDB. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:LevelDBOperator` :param command: command of plyvel(python wrap for leveldb) for DB object e.g. ...
3
2
23
1
20
3
2
0.51
1
8
1
0
2
9
2
2
67
5
41
28
25
21
20
15
17
2
1
0
3
8,799
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/marketing_platform/hooks/analytics_admin.py
google.marketing_platform.hooks.analytics_admin.GoogleAnalyticsAdminHook
from collections.abc import Sequence from airflow.providers.google.common.consts import CLIENT_INFO from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.analytics.admin_v1beta import AnalyticsAdminServiceClient, DataStream, Property from airflow.providers.google.common.hooks.base_google impor...
class GoogleAnalyticsAdminHook(GoogleBaseHook): '''Hook for Google Analytics 4 (GA4) Admin API.''' def __init__(self, *args, **kwargs) -> None: pass def get_conn(self) -> AnalyticsAdminServiceClient: pass def list_accounts(self, page_size: int | None=None, page_token: str | None=None...
9
7
23
2
11
10
1
0.9
1
8
0
0
8
1
8
42
192
25
88
61
37
79
29
19
20
2
3
1
9