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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,100 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/operators/slack.py | slack.operators.slack.SlackAPIPostOperator | import json
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, Literal
class SlackAPIPostOperator(SlackAPIOperator):
"""
Post messages to a Slack channel.
.. code-block:: python
slack = SlackAPIPostOperator(
task_id="post_hello",
dag=dag,
... |
class SlackAPIPostOperator(SlackAPIOperator):
'''
Post messages to a Slack channel.
.. code-block:: python
slack = SlackAPIPostOperator(
task_id="post_hello",
dag=dag,
text="hello there!",
channel="#random",
)
:param channel: channel in wh... | 3 | 1 | 16 | 0 | 16 | 1 | 1 | 0.6 | 1 | 4 | 0 | 0 | 2 | 7 | 2 | 6 | 60 | 6 | 35 | 27 | 17 | 21 | 13 | 12 | 10 | 1 | 2 | 0 | 2 |
9,101 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/operators/slack_webhook.py | slack.operators.slack_webhook.SlackWebhookOperator | from airflow.providers.slack.hooks.slack_webhook import SlackWebhookHook
from airflow.providers.slack.version_compat import BaseOperator
from collections.abc import Sequence
from functools import cached_property
class SlackWebhookOperator(BaseOperator):
"""
This operator allows you to post messages to Slack us... |
class SlackWebhookOperator(BaseOperator):
'''
This operator allows you to post messages to Slack using Incoming Webhooks.
.. note::
You cannot override the default channel (chosen by the user who installed your app),
username, or icon when you're using Incoming Webhooks to post messages.
... | 5 | 3 | 16 | 0 | 15 | 1 | 1 | 0.55 | 1 | 6 | 2 | 0 | 3 | 11 | 3 | 3 | 91 | 6 | 55 | 32 | 35 | 30 | 19 | 16 | 15 | 1 | 1 | 0 | 3 |
9,102 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/transfers/base_sql_to_slack.py | slack.transfers.base_sql_to_slack.BaseSqlToSlackOperator | from airflow.providers.slack.version_compat import BaseHook, BaseOperator
from airflow.exceptions import AirflowException
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any
class BaseSqlToSlackOperator(BaseOperator):
"""
Operator implements base sql methods for SQL to Slack Transfer oper... |
class BaseSqlToSlackOperator(BaseOperator):
'''
Operator implements base sql methods for SQL to Slack Transfer operators.
:param sql: The SQL query to be executed
:param sql_conn_id: reference to a specific DB-API Connection.
:param sql_hook_params: Extra config params to be passed to the underlyin... | 4 | 1 | 12 | 0 | 11 | 0 | 1 | 0.34 | 1 | 11 | 3 | 2 | 3 | 7 | 3 | 3 | 52 | 5 | 35 | 26 | 20 | 12 | 22 | 15 | 18 | 2 | 1 | 1 | 4 |
9,103 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/transfers/sql_to_slack.py | slack.transfers.sql_to_slack.SqlToSlackApiFileOperator | from collections.abc import Mapping, Sequence
from airflow.providers.slack.utils import parse_filename
from airflow.providers.slack.hooks.slack import SlackHook
from tempfile import NamedTemporaryFile
from airflow.providers.slack.transfers.base_sql_to_slack import BaseSqlToSlackOperator
from airflow.exceptions import A... |
class SqlToSlackApiFileOperator(BaseSqlToSlackOperator):
'''
Executes an SQL statement in a given SQL connection and sends the results to Slack API as file.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SqlToSlackApiFileOperato... | 5 | 2 | 22 | 1 | 19 | 2 | 3 | 0.38 | 1 | 13 | 4 | 0 | 4 | 11 | 4 | 7 | 135 | 12 | 89 | 43 | 65 | 34 | 42 | 21 | 37 | 8 | 2 | 3 | 13 |
9,104 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/transfers/sql_to_slack_webhook.py | slack.transfers.sql_to_slack_webhook.SqlToSlackWebhookOperator | from airflow.providers.slack.transfers.base_sql_to_slack import BaseSqlToSlackOperator
from airflow.exceptions import AirflowException
from typing import TYPE_CHECKING, Any
from tabulate import tabulate
from collections.abc import Iterable, Mapping, Sequence
from airflow.providers.slack.hooks.slack_webhook import Slack... |
class SqlToSlackWebhookOperator(BaseSqlToSlackOperator):
'''
Executes an SQL statement in a given SQL connection and sends the results to Slack Incoming Webhook.
The results of the query are rendered into the 'slack_message' parameter as a Pandas
dataframe using a JINJA variable called '{{ results_df }... | 6 | 1 | 13 | 1 | 11 | 1 | 2 | 0.62 | 1 | 13 | 3 | 0 | 5 | 7 | 5 | 8 | 117 | 18 | 61 | 32 | 43 | 38 | 41 | 18 | 35 | 4 | 2 | 1 | 11 |
9,105 | apache/airflow | apache_airflow/providers/slack/src/airflow/providers/slack/utils/__init__.py | slack.utils.ConnectionExtraConfig | from typing import Any
from airflow.utils.types import NOTSET
import warnings
class ConnectionExtraConfig:
"""
Helper class for rom Connection Extra.
:param conn_type: Hook connection type.
:param conn_id: Connection ID uses for appropriate error messages.
:param extra: Connection extra dictionary... |
class ConnectionExtraConfig:
'''
Helper class for rom Connection Extra.
:param conn_type: Hook connection type.
:param conn_id: Connection ID uses for appropriate error messages.
:param extra: Connection extra dictionary.
'''
def __init__(self, conn_type: str, conn_id: str | None=None, ext... | 4 | 3 | 16 | 1 | 10 | 5 | 3 | 0.69 | 0 | 7 | 0 | 0 | 3 | 3 | 3 | 3 | 60 | 6 | 32 | 9 | 28 | 22 | 21 | 9 | 17 | 5 | 0 | 2 | 8 |
9,106 | apache/airflow | apache_airflow/providers/smtp/src/airflow/providers/smtp/hooks/smtp.py | smtp.hooks.smtp.SmtpHook | from airflow.providers.smtp.version_compat import BaseHook
import aiosmtplib
import re
from collections.abc import Iterable
from pathlib import Path
from functools import cached_property
from email.utils import formatdate
import os
import ssl
from email.mime.text import MIMEText
from typing import TYPE_CHECKING, Any, c... | null | 57 | 18 | 12 | 1 | 9 | 3 | 2 | 0.3 | 1 | 24 | 3 | 0 | 23 | 3 | 26 | 38 | 379 | 50 | 254 | 100 | 180 | 75 | 161 | 54 | 130 | 11 | 2 | 4 | 61 |
9,107 | apache/airflow | apache_airflow/providers/smtp/src/airflow/providers/smtp/notifications/smtp.py | smtp.notifications.smtp.SmtpNotifier | from functools import cached_property
from airflow.providers.smtp.hooks.smtp import SmtpHook
from pathlib import Path
from airflow.providers.common.compat.notifier import BaseNotifier
from collections.abc import Iterable
from tests_common.test_utils.version_compat import AIRFLOW_V_3_1_PLUS
from typing import TYPE_CHECK... |
class SmtpNotifier(BaseNotifier):
'''
SMTP Notifier.
Accepts keyword arguments. The only required arguments are `from_email` and `to`. Examples:
.. code-block:: python
EmptyOperator(task_id="task", on_failure_callback=SmtpNotifier(from_email=None, to="my@mail.com"))
EmptyOperator(
... | 9 | 4 | 20 | 0 | 20 | 1 | 3 | 0.2 | 1 | 10 | 1 | 0 | 3 | 11 | 4 | 24 | 124 | 11 | 94 | 37 | 72 | 19 | 47 | 19 | 42 | 8 | 2 | 2 | 12 |
9,108 | apache/airflow | apache_airflow/providers/smtp/src/airflow/providers/smtp/operators/smtp.py | smtp.operators.smtp.EmailOperator | from collections.abc import Sequence
from airflow.providers.smtp.version_compat import BaseOperator
from pathlib import Path
from airflow.exceptions import AirflowException
from airflow.providers.smtp.hooks.smtp import SmtpHook
from typing import TYPE_CHECKING, Any
class EmailOperator(BaseOperator):
"""
Sends ... |
class EmailOperator(BaseOperator):
'''
Sends an email.
:param to: list of emails to send the email to. (templated)
:param from_email: email to send from. (templated)
:param subject: subject line for the email. (templated)
:param html_content: content of the email, html markup
is allowed... | 5 | 1 | 23 | 0 | 23 | 0 | 3 | 0.21 | 1 | 10 | 3 | 0 | 2 | 11 | 3 | 3 | 95 | 5 | 75 | 37 | 55 | 16 | 41 | 20 | 37 | 8 | 1 | 3 | 10 |
9,109 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/decorators/snowpark.py | snowflake.decorators.snowpark._SnowparkDecoratedOperator | from airflow.providers.snowflake.operators.snowpark import SnowparkOperator
from airflow.providers.snowflake.utils.snowpark import inject_session_into_op_kwargs
from collections.abc import Callable, Sequence
class _SnowparkDecoratedOperator(DecoratedOperator, SnowparkOperator):
"""
Wraps a Python callable that... |
class _SnowparkDecoratedOperator(DecoratedOperator, SnowparkOperator):
'''
Wraps a Python callable that contains Snowpark code and captures args/kwargs when called for execution.
:param snowflake_conn_id: Reference to
:ref:`Snowflake connection id<howto/connection:snowflake>`
:param python_call... | 2 | 1 | 39 | 0 | 36 | 3 | 2 | 0.84 | 2 | 4 | 0 | 0 | 1 | 0 | 1 | 12 | 73 | 3 | 38 | 18 | 22 | 32 | 5 | 4 | 3 | 2 | 3 | 0 | 2 |
9,110 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py | snowflake.hooks.snowflake.SnowflakeHook | import os
from sqlalchemy import create_engine
from functools import cached_property
from snowflake.sqlalchemy import URL
from collections.abc import Callable, Iterable, Mapping
from contextlib import closing, contextmanager
from airflow.providers.snowflake.utils.openlineage import fix_snowflake_sqlalchemy_uri
import b... |
class SnowflakeHook(DbApiHook):
'''
A client to interact with Snowflake.
This hook requires the snowflake_conn_id connection. The snowflake account, login,
and, password field must be setup in the connection. Other inputs can be defined
in the connection or hook instantiation.
:param snowflake_... | 31 | 12 | 21 | 2 | 17 | 3 | 3 | 0.23 | 1 | 17 | 4 | 3 | 19 | 12 | 21 | 82 | 510 | 62 | 369 | 139 | 301 | 84 | 210 | 100 | 176 | 16 | 3 | 5 | 56 |
9,111 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake_sql_api.py | snowflake.hooks.snowflake_sql_api.SnowflakeSqlApiHook | import uuid
from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
from requests.exceptions import ConnectionError, HTTPError, Timeout
import time
import requests
from pathlib import Path
import base64
from typing import Any
from cryptography.hazmat.backends import default_backend
from cryptography.hazma... |
class SnowflakeSqlApiHook(SnowflakeHook):
'''
A client to interact with Snowflake using SQL API and submit multiple SQL statements in a single request.
In combination with aiohttp, make post request to submit SQL statements for execution,
poll to check the status of the execution of a statement. Fetch ... | 17 | 14 | 23 | 2 | 18 | 4 | 3 | 0.39 | 1 | 13 | 2 | 0 | 11 | 5 | 11 | 93 | 302 | 33 | 198 | 78 | 176 | 78 | 118 | 61 | 106 | 6 | 4 | 2 | 32 |
9,112 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py | snowflake.operators.snowflake.SnowflakeCheckOperator | from collections.abc import Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, SupportsAbs, cast
from airflow.providers.common.sql.operators.sql import SQLCheckOperator, SQLExecuteQueryOperator, SQLIntervalCheckOperator, SQLValueCheckOperator
class SnowflakeCheckOperator(SQLCheckOperator):
"""
... |
class SnowflakeCheckOperator(SQLCheckOperator):
'''
Perform a check against Snowflake.
The ``SnowflakeCheckOperator`` expects a sql query that will return a single row. Each
value on that first row is evaluated using python ``bool`` casting. If any of the values
return ``False`` the check is failed... | 2 | 1 | 30 | 0 | 30 | 0 | 2 | 1.4 | 1 | 8 | 0 | 0 | 1 | 2 | 1 | 8 | 91 | 8 | 35 | 24 | 18 | 49 | 12 | 9 | 10 | 2 | 3 | 1 | 2 |
9,113 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py | snowflake.operators.snowflake.SnowflakeIntervalCheckOperator | from airflow.providers.common.sql.operators.sql import SQLCheckOperator, SQLExecuteQueryOperator, SQLIntervalCheckOperator, SQLValueCheckOperator
from typing import TYPE_CHECKING, Any, SupportsAbs, cast
from collections.abc import Iterable, Mapping, Sequence
class SnowflakeIntervalCheckOperator(SQLIntervalCheckOperato... |
class SnowflakeIntervalCheckOperator(SQLIntervalCheckOperator):
'''
Checks that the metrics given as SQL expressions are within tolerance of the ones from days_back before.
This method constructs a query like so ::
SELECT {metrics_threshold_dict_key} FROM {table}
WHERE {date_filter_column}=... | 2 | 1 | 40 | 0 | 40 | 0 | 2 | 0.76 | 1 | 10 | 0 | 0 | 1 | 2 | 1 | 8 | 84 | 5 | 45 | 25 | 25 | 34 | 10 | 7 | 8 | 2 | 3 | 1 | 2 |
9,114 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py | snowflake.operators.snowflake.SnowflakeSqlApiOperator | from functools import cached_property
from airflow.exceptions import AirflowException
from collections.abc import Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, SupportsAbs, cast
import time
from airflow.providers.snowflake.triggers.snowflake_trigger import SnowflakeSqlApiTrigger
from airflow.config... |
class SnowflakeSqlApiOperator(SQLExecuteQueryOperator):
'''
Implemented Snowflake SQL API Operator to support multiple SQL statements sequentially.
This is the behavior of the SQLExecuteQueryOperator, the Snowflake SQL API allows submitting
multiple SQL statements in a single request. It make post requ... | 7 | 4 | 33 | 2 | 29 | 3 | 5 | 0.56 | 1 | 15 | 4 | 0 | 4 | 12 | 4 | 16 | 206 | 19 | 124 | 51 | 102 | 69 | 72 | 31 | 67 | 8 | 3 | 2 | 20 |
9,115 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py | snowflake.operators.snowflake.SnowflakeValueCheckOperator | from typing import TYPE_CHECKING, Any, SupportsAbs, cast
from airflow.providers.common.sql.operators.sql import SQLCheckOperator, SQLExecuteQueryOperator, SQLIntervalCheckOperator, SQLValueCheckOperator
from collections.abc import Iterable, Mapping, Sequence
class SnowflakeValueCheckOperator(SQLValueCheckOperator):
... |
class SnowflakeValueCheckOperator(SQLValueCheckOperator):
'''
Performs a simple check using sql code against a specified value, within a certain level of tolerance.
:param sql: the sql to be executed
:param pass_value: the value to check against
:param tolerance: (optional) the tolerance allowed to... | 2 | 1 | 34 | 0 | 34 | 0 | 2 | 0.78 | 1 | 8 | 0 | 0 | 1 | 2 | 1 | 12 | 70 | 4 | 37 | 24 | 18 | 29 | 10 | 7 | 8 | 2 | 3 | 1 | 2 |
9,116 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/operators/snowpark.py | snowflake.operators.snowpark.SnowparkOperator | from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
from typing import Any
from collections.abc import Callable, Collection, Mapping, Sequence
from airflow.providers.snowflake.utils.snowpark import inject_session_into_op_kwargs
from airflow.providers.common.compat.standard.operators import PythonOpera... |
class SnowparkOperator(PythonOperator):
'''
Executes a Python function with Snowpark Python code.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SnowparkOperator`
:param snowflake_conn_id: Reference to
:ref:`Snowflak... | 3 | 1 | 31 | 0 | 31 | 1 | 1 | 0.66 | 1 | 9 | 1 | 1 | 2 | 8 | 2 | 6 | 107 | 4 | 62 | 31 | 42 | 41 | 19 | 14 | 16 | 1 | 2 | 1 | 2 |
9,117 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/transfers/copy_into_snowflake.py | snowflake.transfers.copy_into_snowflake.CopyFromExternalStageToSnowflakeOperator | from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
from collections.abc import Sequence
from airflow.providers.snowflake.version_compat import BaseOperator
from airflow.providers.snowflake.utils.common import enclose_param
from typing import Any
class CopyFromExternalStageToSnowflakeOperator(BaseOpe... |
class CopyFromExternalStageToSnowflakeOperator(BaseOperator):
'''
Executes a COPY INTO command to load files from an external stage from clouds to Snowflake.
This operator requires the snowflake_conn_id connection. The snowflake host, login,
and, password field must be setup in the connection. Other in... | 6 | 3 | 56 | 7 | 41 | 9 | 4 | 0.42 | 1 | 13 | 3 | 0 | 3 | 20 | 4 | 4 | 269 | 35 | 166 | 84 | 124 | 69 | 89 | 54 | 77 | 6 | 1 | 3 | 17 |
9,118 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/triggers/snowflake_trigger.py | snowflake.triggers.snowflake_trigger.SnowflakeSqlApiTrigger | from airflow.providers.snowflake.hooks.snowflake_sql_api import SnowflakeSqlApiHook
from typing import TYPE_CHECKING, Any
import asyncio
from collections.abc import AsyncIterator
from airflow.triggers.base import BaseTrigger, TriggerEvent
class SnowflakeSqlApiTrigger(BaseTrigger):
"""
Fetch the status for the ... |
class SnowflakeSqlApiTrigger(BaseTrigger):
'''
Fetch the status for the query ids passed.
:param poll_interval: polling period in seconds to check for the status
:param query_ids: List of Query ids to run and poll for the status
:param snowflake_conn_id: Reference to Snowflake connection id
:p... | 6 | 4 | 13 | 0 | 12 | 1 | 2 | 0.18 | 1 | 12 | 2 | 0 | 5 | 5 | 5 | 38 | 79 | 6 | 62 | 23 | 49 | 11 | 33 | 15 | 27 | 7 | 5 | 4 | 11 |
9,119 | apache/airflow | apache_airflow/providers/snowflake/src/airflow/providers/snowflake/utils/sql_api_generate_jwt.py | snowflake.utils.sql_api_generate_jwt.JWTGenerator | from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
from datetime import datetime, timedelta, timezone
import jwt
from typing import Any
import base64
import hashlib
class JWTGenerator:
"""
Creates and signs a JWT with the specified private key file, username, and account identifier... |
class JWTGenerator:
'''
Creates and signs a JWT with the specified private key file, username, and account identifier.
The JWTGenerator keeps the generated token and only regenerates the token if a specified period
of time has passed.
Creates an object that generates JWTs for the specified user, ac... | 5 | 4 | 27 | 4 | 15 | 8 | 2 | 0.78 | 0 | 6 | 0 | 0 | 4 | 8 | 4 | 4 | 133 | 23 | 64 | 31 | 52 | 50 | 38 | 24 | 33 | 3 | 0 | 2 | 7 |
9,120 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/decorators/pyspark.py | spark.decorators.pyspark._PySparkDecoratedOperator | from airflow.providers.apache.spark.hooks.spark_connect import SparkConnectHook
from airflow.providers.apache.spark.version_compat import BaseHook, DecoratedOperator, TaskDecorator, task_decorator_factory
from airflow.providers.common.compat.standard.operators import PythonOperator
import inspect
from collections.abc i... |
class _PySparkDecoratedOperator(DecoratedOperator, PythonOperator):
def __init__(self, python_callable: Callable, op_args: Sequence | None=None, op_kwargs: dict | None=None, conn_id: str | None=None, config_kwargs: dict | None=None, **kwargs):
pass
def execute(self, context: Context):
pass | 3 | 0 | 39 | 7 | 30 | 4 | 7 | 0.11 | 2 | 7 | 2 | 0 | 2 | 3 | 2 | 11 | 84 | 16 | 62 | 27 | 49 | 7 | 39 | 19 | 34 | 11 | 2 | 2 | 13 |
9,121 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_connect.py | spark.hooks.spark_connect.SparkConnectHook | from airflow.providers.apache.spark.version_compat import BaseHook
from urllib.parse import quote, urlparse, urlunparse
from airflow.utils.log.logging_mixin import LoggingMixin
from typing import Any, cast
class SparkConnectHook(BaseHook, LoggingMixin):
"""Hook for Spark Connect."""
PARAM_USE_SSL = 'use_ssl'
... |
class SparkConnectHook(BaseHook, LoggingMixin):
'''Hook for Spark Connect.'''
@classmethod
def get_ui_field_behaviour(cls) -> dict[str, Any]:
'''Return custom UI field behaviour for Spark Connect connection.'''
pass
@classmethod
def get_connection_form_widgets(cls) -> dict[str, Any]... | 7 | 3 | 14 | 2 | 11 | 1 | 3 | 0.09 | 2 | 5 | 0 | 0 | 2 | 1 | 4 | 16 | 73 | 15 | 54 | 22 | 45 | 5 | 36 | 20 | 29 | 7 | 2 | 1 | 10 |
9,122 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc.py | spark.hooks.spark_jdbc.SparkJDBCHook | from airflow.exceptions import AirflowException
import os
from typing import Any, cast
from airflow.providers.apache.spark.hooks.spark_submit import SparkSubmitHook
class SparkJDBCHook(SparkSubmitHook):
"""
Extends the SparkSubmitHook for performing data transfers to/from JDBC-based databases with Apache Spark... |
class SparkJDBCHook(SparkSubmitHook):
'''
Extends the SparkSubmitHook for performing data transfers to/from JDBC-based databases with Apache Spark.
:param spark_app_name: Name of the job (default airflow-spark-jdbc)
:param spark_conn_id: The :ref:`spark connection id <howto/connection:spark-submit>`
... | 6 | 2 | 28 | 0 | 27 | 0 | 5 | 0.44 | 1 | 8 | 1 | 0 | 5 | 31 | 5 | 35 | 210 | 7 | 141 | 78 | 102 | 62 | 95 | 45 | 89 | 16 | 3 | 2 | 24 |
9,123 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_sql.py | spark.hooks.spark_sql.SparkSqlHook | from typing import TYPE_CHECKING, Any
from airflow.exceptions import AirflowException, AirflowNotFoundException
import subprocess
from airflow.providers.apache.spark.version_compat import BaseHook
class SparkSqlHook(BaseHook):
"""
This hook is a wrapper around the spark-sql binary; requires the "spark-sql" bin... |
class SparkSqlHook(BaseHook):
'''
This hook is a wrapper around the spark-sql binary; requires the "spark-sql" binary to be in the PATH.
:param sql: The SQL query to execute
:param conf: arbitrary Spark configuration property
:param conn_id: connection_id string
:param total_executor_cores: (St... | 10 | 6 | 22 | 2 | 18 | 2 | 5 | 0.25 | 1 | 11 | 3 | 0 | 5 | 13 | 7 | 19 | 190 | 22 | 135 | 56 | 106 | 34 | 97 | 39 | 85 | 20 | 2 | 3 | 35 |
9,124 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py | spark.hooks.spark_submit.SparkSubmitHook | import time
import os
from collections.abc import Iterator
from typing import Any
import tempfile
import base64
import re
import uuid
from airflow.configuration import conf as airflow_conf
from pathlib import Path
from airflow.security.kerberos import renew_from_kt
import subprocess
import shutil
from airflow.providers... |
class SparkSubmitHook(BaseHook, LoggingMixin):
'''
Wrap the spark-submit binary to kick off a spark-submit job; requires "spark-submit" binary in the PATH.
:param conf: Arbitrary Spark configuration properties
:param spark_conn_id: The :ref:`spark connection id <howto/connection:spark-submit>` as confi... | 21 | 13 | 38 | 4 | 27 | 7 | 6 | 0.36 | 2 | 14 | 1 | 1 | 16 | 41 | 18 | 30 | 762 | 95 | 498 | 151 | 439 | 181 | 327 | 113 | 302 | 33 | 2 | 3 | 101 |
9,125 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_jdbc.py | spark.operators.spark_jdbc.SparkJDBCOperator | from airflow.providers.apache.spark.hooks.spark_jdbc import SparkJDBCHook
from typing import TYPE_CHECKING, Any
from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator
class SparkJDBCOperator(SparkSubmitOperator):
"""
Extend the SparkSubmitOperator to perform data transfers to/fro... |
class SparkJDBCOperator(SparkSubmitOperator):
'''
Extend the SparkSubmitOperator to perform data transfers to/from JDBC-based databases with Apache Spark.
As with the SparkSubmitOperator, it assumes that the "spark-submit" binary is available on the PATH.
.. seealso::
For more information on h... | 5 | 2 | 23 | 0 | 22 | 0 | 2 | 0.62 | 1 | 7 | 1 | 0 | 4 | 29 | 4 | 8 | 153 | 7 | 90 | 59 | 60 | 56 | 35 | 27 | 30 | 2 | 2 | 1 | 6 |
9,126 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_sql.py | spark.operators.spark_sql.SparkSqlOperator | from typing import TYPE_CHECKING, Any
from airflow.providers.apache.spark.version_compat import BaseOperator
from airflow.providers.apache.spark.hooks.spark_sql import SparkSqlHook
from collections.abc import Sequence
class SparkSqlOperator(BaseOperator):
"""
Execute Spark SQL query.
.. seealso::
... |
class SparkSqlOperator(BaseOperator):
'''
Execute Spark SQL query.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SparkSqlOperator`
:param sql: The SQL query to execute. (templated)
:param conf: arbitrary Spark configura... | 5 | 3 | 15 | 0 | 14 | 1 | 2 | 0.39 | 1 | 7 | 1 | 0 | 4 | 14 | 4 | 4 | 92 | 7 | 61 | 39 | 39 | 24 | 30 | 22 | 25 | 2 | 1 | 1 | 6 |
9,127 | apache/airflow | apache_airflow/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py | spark.operators.spark_submit.SparkSubmitOperator | from airflow.configuration import conf
from airflow.providers.apache.spark.hooks.spark_submit import SparkSubmitHook
from typing import TYPE_CHECKING, Any
from collections.abc import Sequence
from airflow.providers.apache.spark.version_compat import BaseOperator
from airflow.settings import WEB_COLORS
from airflow.prov... |
class SparkSubmitOperator(BaseOperator):
'''
Wrap the spark-submit binary to kick off a spark-submit job; requires "spark-submit" binary in the PATH.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SparkSubmitOperator`
:param... | 5 | 2 | 27 | 0 | 27 | 0 | 2 | 0.41 | 1 | 8 | 1 | 1 | 4 | 31 | 4 | 4 | 185 | 7 | 126 | 72 | 87 | 52 | 46 | 38 | 41 | 2 | 1 | 1 | 6 |
9,128 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/dialects/dialect.py | sql.dialects.dialect.Dialect | from methodtools import lru_cache
from collections.abc import Callable, Iterable, Mapping
from airflow.utils.log.logging_mixin import LoggingMixin
import re
from typing import TYPE_CHECKING, Any, TypeVar
class Dialect(LoggingMixin):
"""Generic dialect implementation."""
pattern = re.compile('[^\\w]')
def ... |
class Dialect(LoggingMixin):
'''Generic dialect implementation.'''
def __init__(self, hook, **kwargs) -> None:
pass
@property
def placeholder(self) -> str:
pass
@property
def inspector(self) -> Inspector:
pass
@property
def insert_statement_format(self) -> str:
... | 33 | 5 | 7 | 1 | 5 | 1 | 1 | 0.23 | 1 | 13 | 1 | 2 | 19 | 1 | 20 | 26 | 179 | 32 | 120 | 57 | 72 | 28 | 71 | 32 | 48 | 3 | 1 | 1 | 31 |
9,129 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py | sql.hooks.sql.ConnectorProtocol | from typing import TYPE_CHECKING, Any, Literal, Protocol, TypeVar, cast, overload
class ConnectorProtocol(Protocol):
"""Database connection protocol."""
def connect(self, host: str, port: int, username: str, schema: str) -> Any:
"""
Connect to a database.
:param host: The database hos... |
class ConnectorProtocol(Protocol):
'''Database connection protocol.'''
def connect(self, host: str, port: int, username: str, schema: str) -> Any:
'''
Connect to a database.
:param host: The database host to connect to.
:param port: The database port to connect to.
:par... | 2 | 2 | 10 | 1 | 1 | 8 | 1 | 4.5 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 25 | 13 | 2 | 2 | 2 | 0 | 9 | 2 | 2 | 0 | 1 | 5 | 0 | 1 |
9,130 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py | sql.hooks.sql.DbApiHook | from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping, Sequence
import sqlparse
from methodtools import lru_cache
from sqlalchemy.exc import ArgumentError, NoSuchModuleError
from deprecated import deprecated
from urllib.parse import urlparse
from datetime import datetime
from contextlib imp... |
class DbApiHook(BaseHook):
'''
Abstract base class for sql hooks.
When subclassing, maintainers can override the `_make_common_data_structure` method:
This method transforms the result of the handler method (typically `cursor.fetchall()`) into
objects common across all Hooks derived from this class... | 90 | 40 | 13 | 1 | 8 | 4 | 2 | 0.52 | 1 | 30 | 5 | 34 | 44 | 8 | 49 | 61 | 742 | 115 | 413 | 182 | 286 | 214 | 283 | 98 | 230 | 11 | 2 | 5 | 103 |
9,131 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.BaseSQLOperator | from airflow.exceptions import AirflowException, AirflowFailException, AirflowSkipException
from collections.abc import Callable, Iterable, Mapping, Sequence
from airflow.providers.common.sql.version_compat import BaseHook, BaseOperator
from functools import cached_property
from typing import TYPE_CHECKING, Any, ClassV... |
class BaseSQLOperator(BaseOperator):
'''
This is a base class for generic SQL Operator to get a DB Hook.
The provided method is .get_db_hook(). The default behavior will try to
retrieve the DB hook based on connection type.
You can customize the behavior by overriding the .get_db_hook() method.
... | 8 | 4 | 11 | 1 | 8 | 2 | 2 | 0.41 | 1 | 8 | 4 | 12 | 4 | 4 | 5 | 5 | 78 | 13 | 46 | 25 | 30 | 19 | 29 | 15 | 23 | 4 | 1 | 2 | 9 |
9,132 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.BranchSQLOperator | from collections.abc import Callable, Iterable, Mapping, Sequence
from airflow.exceptions import AirflowException, AirflowFailException, AirflowSkipException
from airflow.models import SkipMixin
from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
class BranchSQLOperator(BaseSQLOperator, SkipMixin):
... |
class BranchSQLOperator(BaseSQLOperator, SkipMixin):
'''
Allows a DAG to "branch" or follow a specified path based on the results of a SQL query.
:param sql: The SQL code to be executed, should return true or false (templated)
Template reference are recognized by str ending in '.sql'.
Expecte... | 3 | 1 | 34 | 3 | 30 | 2 | 7 | 0.26 | 2 | 12 | 1 | 1 | 2 | 4 | 2 | 7 | 89 | 9 | 66 | 25 | 53 | 17 | 39 | 15 | 36 | 13 | 2 | 3 | 14 |
9,133 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLCheckOperator | from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
from collections.abc import Callable, Iterable, Mapping, Sequence
class SQLCheckOperator(BaseSQLOperator):
"""
Performs checks against a db.
The ``SQLCheckOperator`` expects a sql query that will return a single row.
Each value on ... |
class SQLCheckOperator(BaseSQLOperator):
'''
Performs checks against a db.
The ``SQLCheckOperator`` expects a sql query that will return a single row.
Each value on that first row is evaluated using python ``bool`` casting.
If any of the values return ``False`` the check is failed and errors out.
... | 3 | 1 | 13 | 1 | 12 | 0 | 3 | 1 | 1 | 6 | 0 | 2 | 2 | 2 | 2 | 7 | 72 | 11 | 31 | 18 | 20 | 31 | 18 | 10 | 15 | 4 | 2 | 1 | 5 |
9,134 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLColumnCheckOperator | from collections.abc import Callable, Iterable, Mapping, Sequence
from airflow.exceptions import AirflowException, AirflowFailException, AirflowSkipException
from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
class SQLColumnCheckOperator(BaseSQLOperator):
"""
Performs one or more of the tem... |
class SQLColumnCheckOperator(BaseSQLOperator):
'''
Performs one or more of the templated checks in the column_checks dictionary.
Checks are performed on a per-column basis specified by the column_mapping.
Each check can take one or more of the following options:
* ``equal_to``: an exact value to eq... | 8 | 1 | 27 | 3 | 24 | 0 | 6 | 0.24 | 1 | 7 | 1 | 1 | 5 | 5 | 5 | 10 | 245 | 37 | 168 | 39 | 150 | 40 | 88 | 28 | 80 | 14 | 2 | 2 | 39 |
9,135 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLExecuteQueryOperator | import ast
from airflow.providers.common.sql.hooks.handlers import fetch_all_handler, return_single_query_results
from airflow.utils.helpers import merge_dicts
from collections.abc import Callable, Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
class SQLExecuteQueryO... |
class SQLExecuteQueryOperator(BaseSQLOperator):
'''
Executes SQL code in a specific database.
When implementing a specific Operator, you can also implement `_process_output` method in the
hook to perform additional processing of values returned by the DB Hook of yours. For example, you
can join des... | 8 | 3 | 22 | 2 | 17 | 3 | 3 | 0.35 | 1 | 13 | 2 | 11 | 7 | 9 | 7 | 12 | 191 | 26 | 123 | 59 | 90 | 43 | 78 | 36 | 67 | 6 | 2 | 1 | 21 |
9,136 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLIntervalCheckOperator | from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
from collections.abc import Callable, Iterable, Mapping, Sequence
from airflow.exceptions import AirflowException, AirflowFailException, AirflowSkipException
class SQLIntervalCheckOperator(BaseSQLOperator):
"""
Check that metrics given as S... |
class SQLIntervalCheckOperator(BaseSQLOperator):
'''
Check that metrics given as SQL expressions are within tolerance of the ones from days_back before.
:param table: the table name
:param conn_id: the connection ID used to connect to the database.
:param database: name of database which will overw... | 3 | 1 | 50 | 5 | 45 | 0 | 5 | 0.17 | 1 | 8 | 1 | 2 | 2 | 9 | 2 | 7 | 135 | 16 | 103 | 47 | 88 | 17 | 58 | 35 | 55 | 8 | 2 | 3 | 10 |
9,137 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLTableCheckOperator | from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
from collections.abc import Callable, Iterable, Mapping, Sequence
class SQLTableCheckOperator(BaseSQLOperator):
"""
Performs one or more of the checks provided in the checks dictionary.
Checks should be written to return a boolean resu... |
class SQLTableCheckOperator(BaseSQLOperator):
'''
Performs one or more of the checks provided in the checks dictionary.
Checks should be written to return a boolean result.
:param table: the table to run checks on
:param checks: the dictionary of checks, where check names are followed by a dictiona... | 5 | 1 | 18 | 2 | 16 | 0 | 3 | 0.34 | 1 | 4 | 0 | 1 | 3 | 4 | 3 | 8 | 110 | 24 | 64 | 27 | 50 | 22 | 33 | 18 | 28 | 4 | 2 | 1 | 10 |
9,138 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLThresholdCheckOperator | from collections.abc import Callable, Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
class SQLThresholdCheckOperator(BaseSQLOperator):
"""
Performs a value check using sql code against a minimum threshold and a maximum threshold.
Thresholds can be in the... |
class SQLThresholdCheckOperator(BaseSQLOperator):
'''
Performs a value check using sql code against a minimum threshold and a maximum threshold.
Thresholds can be in the form of a numeric value OR a sql statement that results a numeric.
:param sql: the sql to be executed. (templated)
:param conn_id... | 4 | 2 | 24 | 3 | 19 | 2 | 3 | 0.27 | 1 | 6 | 0 | 0 | 3 | 3 | 3 | 8 | 103 | 15 | 70 | 28 | 57 | 19 | 34 | 19 | 30 | 6 | 2 | 1 | 8 |
9,139 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/operators/sql.py | sql.operators.sql.SQLValueCheckOperator | from typing import TYPE_CHECKING, Any, ClassVar, NoReturn, SupportsAbs
from airflow.exceptions import AirflowException, AirflowFailException, AirflowSkipException
from collections.abc import Callable, Iterable, Mapping, Sequence
class SQLValueCheckOperator(BaseSQLOperator):
"""
Performs a simple value check us... | null | 7 | 1 | 10 | 1 | 9 | 0 | 2 | 0.11 | 1 | 7 | 1 | 2 | 6 | 4 | 6 | 11 | 83 | 13 | 64 | 32 | 48 | 7 | 41 | 23 | 34 | 7 | 2 | 2 | 14 |
9,140 | apache/airflow | apache_airflow/providers/common/sql/src/airflow/providers/common/sql/sensors/sql.py | sql.sensors.sql.SqlSensor | from collections.abc import Callable, Mapping, Sequence
from typing import TYPE_CHECKING, Any
from airflow.providers.common.sql.hooks.sql import DbApiHook
from airflow.providers.common.sql.version_compat import BaseHook, BaseSensorOperator
from operator import itemgetter
from airflow.exceptions import AirflowException
... |
class SqlSensor(BaseSensorOperator):
'''
Run a SQL statement repeatedly until a criteria is met.
This will keep trying until success or failure criteria are met, or if the
first cell is not either ``0``, ``'0'``, ``''``, or ``None``. Optional
success and failure callables are called with the first ... | 4 | 1 | 20 | 1 | 19 | 0 | 4 | 0.43 | 1 | 10 | 3 | 1 | 3 | 8 | 3 | 24 | 96 | 10 | 61 | 33 | 45 | 26 | 43 | 21 | 39 | 8 | 3 | 3 | 11 |
9,141 | apache/airflow | apache_airflow/providers/sqlite/src/airflow/providers/sqlite/hooks/sqlite.py | sqlite.hooks.sqlite.SqliteHook | import sqlite3
from airflow.providers.common.sql.hooks.sql import DbApiHook
from urllib.parse import unquote
class SqliteHook(DbApiHook):
"""Interact with SQLite."""
conn_name_attr = 'sqlite_conn_id'
default_conn_name = 'sqlite_default'
conn_type = 'sqlite'
hook_name = 'Sqlite'
def __init__(se... |
class SqliteHook(DbApiHook):
'''Interact with SQLite.'''
def __init__(self, *args, **kwargs):
pass
def get_conn(self) -> sqlite3.dbapi2.Connection:
'''Return SQLite connection object.'''
pass
def get_uri(self) -> str:
'''Override DbApiHook get_uri method for get_sqlal... | 4 | 3 | 8 | 0 | 6 | 2 | 1 | 0.36 | 1 | 2 | 0 | 2 | 3 | 1 | 3 | 64 | 34 | 4 | 22 | 17 | 18 | 8 | 22 | 17 | 18 | 2 | 3 | 1 | 4 |
9,142 | apache/airflow | apache_airflow/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py | ssh.hooks.ssh.SSHHook | from collections.abc import Sequence
from sshtunnel import SSHTunnelForwarder
from tenacity import Retrying, stop_after_attempt, wait_fixed, wait_random
from select import select
from airflow.exceptions import AirflowException
import paramiko
from paramiko.config import SSH_PORT
from airflow.utils.types import NOTSET, ... | null | 12 | 6 | 46 | 6 | 35 | 5 | 8 | 0.22 | 1 | 13 | 1 | 2 | 7 | 21 | 8 | 20 | 473 | 72 | 333 | 104 | 296 | 72 | 222 | 74 | 212 | 29 | 2 | 4 | 71 |
9,143 | apache/airflow | apache_airflow/providers/ssh/src/airflow/providers/ssh/operators/ssh.py | ssh.operators.ssh.SSHOperator | from functools import cached_property
from airflow.providers.ssh.hooks.ssh import SSHHook
from airflow.configuration import conf
from base64 import b64encode
from airflow.providers.ssh.version_compat import BaseOperator
from airflow.utils.types import NOTSET, ArgNotSet
from collections.abc import Container, Sequence
fr... |
class SSHOperator(BaseOperator):
'''
SSHOperator to execute commands on given remote host using the ssh_hook.
:param ssh_hook: predefined ssh_hook to use for remote execution.
Either `ssh_hook` or `ssh_conn_id` needs to be provided.
:param ssh_conn_id: :ref:`ssh connection id<howto/connection:s... | 12 | 4 | 11 | 0 | 10 | 1 | 2 | 0.34 | 1 | 11 | 3 | 0 | 9 | 9 | 9 | 9 | 159 | 15 | 108 | 45 | 82 | 37 | 64 | 28 | 54 | 5 | 1 | 2 | 21 |
9,144 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/hooks/filesystem.py | standard.hooks.filesystem.FSHook | from airflow.providers.standard.version_compat import BaseHook
from pathlib import Path
from typing import Any
class FSHook(BaseHook):
"""
Allows for interaction with an file server.
Connection should have a name and a path specified under extra:
example:
Connection Id: fs_test
Connection Typ... |
class FSHook(BaseHook):
'''
Allows for interaction with an file server.
Connection should have a name and a path specified under extra:
example:
Connection Id: fs_test
Connection Type: File (path)
Host, Schema, Login, Password, Port: empty
Extra: {"path": "/tmp"}
'''
@classmetho... | 9 | 5 | 7 | 0 | 5 | 1 | 2 | 0.43 | 1 | 6 | 0 | 0 | 4 | 2 | 6 | 18 | 64 | 11 | 37 | 21 | 25 | 16 | 31 | 18 | 21 | 4 | 2 | 2 | 9 |
9,145 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/hooks/package_index.py | standard.hooks.package_index.PackageIndexHook | from airflow.providers.standard.version_compat import BaseHook
from urllib.parse import quote, urlparse
import subprocess
from typing import Any
class PackageIndexHook(BaseHook):
"""Specify package indexes/Python package sources using Airflow connections."""
conn_name_attr = 'pi_conn_id'
default_conn_name ... |
class PackageIndexHook(BaseHook):
'''Specify package indexes/Python package sources using Airflow connections.'''
def __init__(self, pi_conn_id: str=default_conn_name, **kwargs) -> None:
pass
@staticmethod
def get_ui_field_behaviour() -> dict[str, Any]:
'''Return custom field behaviour... | 9 | 6 | 9 | 0 | 8 | 1 | 2 | 0.17 | 1 | 7 | 0 | 0 | 4 | 2 | 6 | 18 | 67 | 8 | 52 | 22 | 43 | 9 | 34 | 20 | 27 | 3 | 2 | 2 | 10 |
9,146 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/hooks/subprocess.py | standard.hooks.subprocess.SubprocessHook | import signal
from airflow.providers.standard.version_compat import BaseHook
from tempfile import TemporaryDirectory, gettempdir
import os
from subprocess import PIPE, STDOUT, Popen
class SubprocessHook(BaseHook):
"""Hook for running processes with the ``subprocess`` module."""
def __init__(self, **kwargs) ->... |
class SubprocessHook(BaseHook):
'''Hook for running processes with the ``subprocess`` module.'''
def __init__(self, **kwargs) -> None:
pass
def run_command(self, command: list[str], env: dict[str, str] | None=None, output_encoding: str='utf-8', cwd: str | None=None) -> SubprocessResult:
'... | 5 | 3 | 19 | 2 | 12 | 5 | 3 | 0.44 | 1 | 8 | 0 | 0 | 3 | 1 | 3 | 15 | 74 | 12 | 43 | 16 | 32 | 19 | 30 | 10 | 25 | 5 | 2 | 3 | 11 |
9,147 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/bash.py | standard.operators.bash.BashOperator | import tempfile
import shutil
from typing import TYPE_CHECKING, Any, cast
from airflow.providers.standard.hooks.subprocess import SubprocessHook, SubprocessResult, working_directory
from airflow.exceptions import AirflowException, AirflowSkipException
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_... |
class BashOperator(BaseOperator):
'''
Execute a Bash script, command or set of commands.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:BashOperator`
If BaseOperator.do_xcom_push is True, the last line written to stdout
... | 11 | 6 | 15 | 1 | 11 | 3 | 2 | 1.05 | 1 | 10 | 2 | 3 | 7 | 9 | 9 | 9 | 267 | 47 | 108 | 50 | 82 | 113 | 68 | 34 | 57 | 8 | 1 | 2 | 20 |
9,148 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/datetime.py | standard.operators.datetime.BranchDateTimeOperator | from airflow.exceptions import AirflowException
from typing import TYPE_CHECKING
from airflow.utils import timezone
from collections.abc import Iterable
import datetime
from airflow.providers.standard.operators.branch import BaseBranchOperator
class BranchDateTimeOperator(BaseBranchOperator):
"""
Branches into... |
class BranchDateTimeOperator(BaseBranchOperator):
'''
Branches into one of two lists of tasks depending on the current datetime.
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:BranchDateTimeOperator`.
True branch will be returned when ``datetime.dat... | 3 | 1 | 19 | 2 | 17 | 0 | 3 | 0.43 | 1 | 8 | 2 | 0 | 2 | 5 | 2 | 15 | 59 | 9 | 35 | 19 | 23 | 15 | 22 | 10 | 19 | 4 | 4 | 1 | 6 |
9,149 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/empty.py | standard.operators.empty.EmptyOperator | from airflow.providers.standard.version_compat import BaseOperator
class EmptyOperator(BaseOperator):
"""
Operator that does literally nothing.
It can be used to group tasks in a DAG.
The task is evaluated by the scheduler but never processed by the executor.
"""
ui_color = '#e8f7e4'
inher... |
class EmptyOperator(BaseOperator):
'''
Operator that does literally nothing.
It can be used to group tasks in a DAG.
The task is evaluated by the scheduler but never processed by the executor.
'''
def execute(self, context: Context):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 1.2 | 1 | 1 | 1 | 5 | 1 | 0 | 1 | 66 | 13 | 3 | 5 | 4 | 3 | 6 | 5 | 4 | 3 | 1 | 6 | 0 | 1 |
9,150 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.BranchExternalPythonOperator | from collections.abc import Callable, Collection, Container, Iterable, Mapping, Sequence
class BranchExternalPythonOperator(BaseBranchOperator, ExternalPythonOperator):
"""
A workflow can "branch" or follow a path after the execution of this task.
Extends ExternalPythonOperator, so expects to get Python:
... |
class BranchExternalPythonOperator(BaseBranchOperator, ExternalPythonOperator):
'''
A workflow can "branch" or follow a path after the execution of this task.
Extends ExternalPythonOperator, so expects to get Python:
virtual environment that should be used (in ``VENV/bin`` folder). Should be absolute p... | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 3 | 2 | 2 | 0 | 1 | 1 | 0 | 1 | 52 | 15 | 3 | 3 | 2 | 1 | 9 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
9,151 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.BranchPythonOperator | from collections.abc import Callable, Collection, Container, Iterable, Mapping, Sequence
class BranchPythonOperator(BaseBranchOperator, PythonOperator):
"""
A workflow can "branch" or follow a path after the execution of this task.
It derives the PythonOperator and expects a Python function that returns
... |
class BranchPythonOperator(BaseBranchOperator, PythonOperator):
'''
A workflow can "branch" or follow a path after the execution of this task.
It derives the PythonOperator and expects a Python function that returns
a single task_id, a single task_group_id, or a list of task_ids and/or
task_group_i... | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 3.67 | 2 | 2 | 0 | 1 | 1 | 0 | 1 | 16 | 16 | 2 | 3 | 2 | 1 | 11 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
9,152 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.BranchPythonVirtualenvOperator | from collections.abc import Callable, Collection, Container, Iterable, Mapping, Sequence
class BranchPythonVirtualenvOperator(BaseBranchOperator, PythonVirtualenvOperator):
"""
A workflow can "branch" or follow a path after the execution of this task in a virtual environment.
It derives the PythonVirtuale... |
class BranchPythonVirtualenvOperator(BaseBranchOperator, PythonVirtualenvOperator):
'''
A workflow can "branch" or follow a path after the execution of this task in a virtual environment.
It derives the PythonVirtualenvOperator and expects a Python function that returns
a single task_id, a single task_... | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 4.67 | 2 | 2 | 0 | 1 | 1 | 0 | 1 | 53 | 20 | 3 | 3 | 2 | 1 | 14 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
9,153 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.ExternalPythonOperator | import textwrap
from pathlib import Path
from typing import TYPE_CHECKING, Any, NamedTuple, cast
import sys
from collections.abc import Callable, Collection, Container, Iterable, Mapping, Sequence
from airflow.exceptions import AirflowConfigException, AirflowException, AirflowProviderDeprecationWarning, AirflowSkipExce... | null | 8 | 2 | 21 | 1 | 18 | 2 | 3 | 0.55 | 1 | 15 | 1 | 2 | 6 | 2 | 6 | 40 | 191 | 16 | 113 | 35 | 87 | 62 | 50 | 15 | 42 | 5 | 4 | 2 | 18 |
9,154 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.PythonOperator | from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, context_merge
from airflow.exceptions import AirflowConfigException, AirflowException, AirflowProviderDeprecationWarning, AirflowSkipException, DeserializingResultError
from collections.abc import Callable, Collection, Container, It... |
class PythonOperator(BaseOperator):
'''
Executes a Python callable.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:PythonOperator`
When running your callable, Airflow will pass a set of keyword arguments that can be used in ... | 6 | 2 | 15 | 2 | 12 | 1 | 3 | 0.81 | 1 | 10 | 1 | 8 | 4 | 8 | 4 | 4 | 117 | 24 | 52 | 34 | 34 | 42 | 40 | 24 | 32 | 4 | 1 | 1 | 11 |
9,155 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.PythonVirtualenvOperator | from collections.abc import Callable, Collection, Container, Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, NamedTuple, cast
import sys
from pathlib import Path
from tempfile import TemporaryDirectory
from airflow.models.variable import Variable
from packaging.version import InvalidVersion
from airf... | null | 10 | 6 | 27 | 1 | 24 | 2 | 4 | 0.45 | 1 | 17 | 1 | 2 | 7 | 6 | 7 | 41 | 269 | 20 | 173 | 56 | 143 | 77 | 86 | 32 | 77 | 7 | 4 | 5 | 25 |
9,156 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python.ShortCircuitOperator | from typing import TYPE_CHECKING, Any, NamedTuple, cast
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, context_merge
import logging
class ShortCircuitOperator(PythonOperator, SkipMixin):
"""
Allows a pipeline to continue based on the result of a ``python_callable``.
... |
class ShortCircuitOperator(PythonOperator, SkipMixin):
'''
Allows a pipeline to continue based on the result of a ``python_callable``.
The ShortCircuitOperator is derived from the PythonOperator and evaluates the result of a
``python_callable``. If the returned result is False or a falsy value, the pip... | 4 | 1 | 20 | 3 | 16 | 1 | 3 | 0.55 | 2 | 4 | 0 | 2 | 2 | 1 | 2 | 15 | 78 | 14 | 42 | 10 | 38 | 23 | 30 | 10 | 26 | 5 | 2 | 2 | 10 |
9,157 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python._BasePythonVirtualenvOperator | from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, context_merge
from pathlib import Path
import subprocess
from airflow.utils.file import get_unique_dag_module_name
from airflow.utils.operator_helpers import KeywordParameters
from airflow.providers.standard.utils.python_virtualenv ... |
class _BasePythonVirtualenvOperator(PythonOperator, metaclass=ABCMeta):
def __init__(self, *, python_callable: Callable, serializer: _SerializerTypeDef | None=None, op_args: Collection[Any] | None=None, op_kwargs: Mapping[str, Any] | None=None, string_args: Iterable[str] | None=None, templates_dict: dict | None=N... | 13 | 2 | 16 | 1 | 15 | 0 | 3 | 0.03 | 2 | 18 | 1 | 2 | 10 | 7 | 10 | 34 | 220 | 22 | 193 | 57 | 166 | 6 | 87 | 37 | 76 | 10 | 3 | 4 | 28 |
9,158 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/python.py | standard.operators.python._PythonVersionInfo | from typing import TYPE_CHECKING, Any, NamedTuple, cast
import subprocess
class _PythonVersionInfo(NamedTuple):
"""Provide the same interface as ``sys.version_info``."""
major: int
minor: int
micro: int
releaselevel: str
serial: int
@classmethod
def from_executable(cls, executable: str... |
class _PythonVersionInfo(NamedTuple):
'''Provide the same interface as ``sys.version_info``.'''
@classmethod
def from_executable(cls, executable: str) -> _PythonVersionInfo:
'''Parse python version info from an executable.'''
pass | 3 | 2 | 8 | 0 | 7 | 1 | 2 | 0.14 | 1 | 3 | 0 | 0 | 0 | 0 | 1 | 1 | 18 | 2 | 14 | 6 | 11 | 2 | 13 | 4 | 11 | 2 | 1 | 1 | 2 |
9,159 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py | standard.operators.trigger_dagrun.TriggerDagRunLink | from typing import TYPE_CHECKING, Any
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, BaseOperatorLink, timezone
class TriggerDagRunLink(BaseOperatorLink):
"""
Operator link for TriggerDagRunOperator.
It allows users to access DAG triggered by task using TriggerDagR... |
class TriggerDagRunLink(BaseOperatorLink):
'''
Operator link for TriggerDagRunOperator.
It allows users to access DAG triggered by task using TriggerDagRunOperator.
'''
def get_link(self, operator: BaseOperator, *, ti_key: TaskInstanceKey) -> str:
pass | 2 | 1 | 26 | 4 | 20 | 2 | 3 | 0.27 | 1 | 5 | 4 | 0 | 1 | 0 | 1 | 1 | 35 | 7 | 22 | 11 | 18 | 6 | 16 | 11 | 12 | 3 | 1 | 1 | 3 |
9,160 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py | standard.operators.trigger_dagrun.TriggerDagRunOperator | from typing import TYPE_CHECKING, Any
from airflow.exceptions import AirflowException, AirflowSkipException, DagNotFound, DagRunAlreadyExists
from airflow.models.dagrun import DagRun
import time
from airflow.models.dag import DagModel
from sqlalchemy import select
import datetime
from airflow.models.serialized_dag impo... |
class TriggerDagRunOperator(BaseOperator):
'''
Triggers a DAG run for a specified DAG ID.
Note that if database isolation mode is enabled, not all features are supported.
:param trigger_dag_id: The ``dag_id`` of the DAG to trigger (templated).
:param trigger_run_id: The run ID to use for the trigge... | 9 | 1 | 51 | 4 | 44 | 3 | 8 | 0.26 | 1 | 23 | 12 | 0 | 3 | 11 | 3 | 3 | 200 | 19 | 144 | 48 | 124 | 38 | 82 | 31 | 78 | 15 | 1 | 3 | 23 |
9,161 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/operators/weekday.py | standard.operators.weekday.BranchDayOfWeekOperator | from airflow.providers.standard.utils.weekday import WeekDay
from airflow.providers.standard.operators.branch import BaseBranchOperator
from airflow.utils import timezone
from collections.abc import Iterable
class BranchDayOfWeekOperator(BaseBranchOperator):
"""
Branches into one of two lists of tasks dependin... |
class BranchDayOfWeekOperator(BaseBranchOperator):
'''
Branches into one of two lists of tasks depending on the current day.
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:BranchDayOfWeekOperator`
**Example** (with single day):
.. code-block:: p... | 3 | 1 | 12 | 1 | 12 | 0 | 2 | 2.08 | 1 | 6 | 2 | 0 | 2 | 5 | 2 | 15 | 91 | 17 | 24 | 17 | 13 | 50 | 15 | 9 | 12 | 3 | 4 | 1 | 4 |
9,162 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/bash.py | standard.sensors.bash.BashSensor | from collections.abc import Sequence
from subprocess import PIPE, STDOUT, Popen
from airflow.exceptions import AirflowFailException
from airflow.providers.standard.version_compat import BaseSensorOperator
from tempfile import NamedTemporaryFile, TemporaryDirectory, gettempdir
import os
class BashSensor(BaseSensorOpera... |
class BashSensor(BaseSensorOperator):
'''
Executes a bash command/script.
Return True if and only if the return code is 0.
:param bash_command: The command, set of commands or reference to a
bash script (must be '.sh') to be executed.
:param env: If env is not None, it must be a mapping tha... | 3 | 2 | 28 | 2 | 24 | 2 | 4 | 0.49 | 1 | 7 | 2 | 0 | 2 | 4 | 2 | 23 | 84 | 11 | 49 | 17 | 44 | 24 | 33 | 12 | 30 | 6 | 3 | 4 | 7 |
9,163 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/date_time.py | standard.sensors.date_time.DateTimeSensor | import datetime
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseSensorOperator
from collections.abc import Sequence
class DateTimeSensor(BaseSensorOperator):
"""
Waits until the specified datetime.
A major advantage of this sensor is idempotence for the ``target_time``.
I... |
class DateTimeSensor(BaseSensorOperator):
'''
Waits until the specified datetime.
A major advantage of this sensor is idempotence for the ``target_time``.
It handles some cases for which ``TimeSensor`` and ``TimeDeltaSensor`` are not suited.
**Example** 1 :
If a task needs to wait for 11am ... | 5 | 1 | 8 | 1 | 7 | 1 | 2 | 1.47 | 1 | 7 | 1 | 1 | 2 | 1 | 2 | 23 | 47 | 10 | 15 | 5 | 12 | 22 | 11 | 5 | 8 | 3 | 3 | 1 | 4 |
9,164 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/date_time.py | standard.sensors.date_time.DateTimeSensorAsync | from typing import TYPE_CHECKING, Any, NoReturn
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseSensorOperator
from airflow.providers.standard.triggers.temporal import DateTimeTrigger
class DateTimeSensorAsync(DateTimeSensor):
"""
Wait until the specified datetime occurs.
Def... |
class DateTimeSensorAsync(DateTimeSensor):
'''
Wait until the specified datetime occurs.
Deferring itself to avoid taking up a worker slot while it is waiting.
It is a drop-in replacement for DateTimeSensor.
:param target_time: datetime after which the job succeeds. (templated)
:param start_fro... | 4 | 2 | 10 | 0 | 9 | 0 | 2 | 0.3 | 1 | 7 | 2 | 0 | 3 | 2 | 3 | 26 | 55 | 7 | 37 | 15 | 26 | 11 | 13 | 7 | 9 | 2 | 4 | 1 | 5 |
9,165 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py | standard.sensors.external_task.ExternalDagLink | from typing import TYPE_CHECKING, Any, ClassVar
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, BaseOperatorLink, BaseSensorOperator
class ExternalDagLink(BaseOperatorLink):
"""
Operator link for ExternalTaskSensor and ExternalTaskMarker.
It allows users to access D... |
class ExternalDagLink(BaseOperatorLink):
'''
Operator link for ExternalTaskSensor and ExternalTaskMarker.
It allows users to access DAG waited with ExternalTaskSensor or cleared by ExternalTaskMarker.
'''
def get_link(self, operator: BaseOperator, *, ti_key: TaskInstanceKey) -> str:
pass | 2 | 1 | 20 | 4 | 16 | 2 | 3 | 0.33 | 1 | 5 | 4 | 0 | 1 | 0 | 1 | 23 | 29 | 7 | 18 | 8 | 15 | 6 | 11 | 8 | 8 | 3 | 4 | 1 | 3 |
9,166 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py | standard.sensors.external_task.ExternalTaskMarker | from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator, BaseOperatorLink, BaseSensorOperator
from typing import TYPE_CHECKING, Any, ClassVar
import datetime
class ExternalTaskMarker(EmptyOperator):
"""
Use this... |
class ExternalTaskMarker(EmptyOperator):
'''
Use this operator to indicate that a task on a different DAG depends on this task.
When this task is cleared with "Recursive" selected, Airflow will clear the task on
the other DAG and its downstream tasks recursively. Transitive dependencies are followed
... | 4 | 2 | 15 | 1 | 14 | 1 | 3 | 0.48 | 1 | 7 | 0 | 0 | 1 | 4 | 2 | 68 | 55 | 7 | 33 | 20 | 21 | 16 | 20 | 11 | 17 | 4 | 7 | 1 | 6 |
9,167 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py | standard.sensors.external_task.ExternalTaskSensor | from airflow.models.dagbag import DagBag
from airflow.exceptions import AirflowSkipException
from airflow.configuration import conf
import warnings
from airflow.models.dag import DagModel
from typing import TYPE_CHECKING, Any, ClassVar
from collections.abc import Callable, Collection, Iterable
from airflow.providers.st... | null | 18 | 9 | 33 | 3 | 26 | 3 | 6 | 0.38 | 1 | 21 | 8 | 0 | 9 | 15 | 9 | 30 | 376 | 46 | 240 | 59 | 212 | 91 | 121 | 40 | 110 | 17 | 3 | 3 | 52 |
9,168 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/filesystem.py | standard.sensors.filesystem.FileSensor | from airflow.exceptions import AirflowException
from glob import glob
import os
from airflow.providers.standard.triggers.file import FileTrigger
from typing import TYPE_CHECKING, Any
from airflow.configuration import conf
import datetime
from functools import cached_property
from collections.abc import Sequence
from ai... |
class FileSensor(BaseSensorOperator):
'''
Waits for a file or folder to land in a filesystem.
If the path given is a directory then this sensor will only return true if
any files exist inside it (either directly, or within a subdirectory)
:param fs_conn_id: reference to the File (path)
conn... | 7 | 1 | 12 | 1 | 11 | 0 | 3 | 0.29 | 1 | 11 | 4 | 0 | 5 | 6 | 5 | 26 | 102 | 14 | 69 | 33 | 52 | 20 | 40 | 20 | 34 | 5 | 3 | 3 | 13 |
9,169 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/python.py | standard.sensors.python.PythonSensor | from airflow.providers.standard.version_compat import BaseSensorOperator, PokeReturnValue, context_merge
from collections.abc import Callable, Mapping, Sequence
from typing import TYPE_CHECKING, Any
from airflow.utils.operator_helpers import determine_kwargs
class PythonSensor(BaseSensorOperator):
"""
Waits fo... |
class PythonSensor(BaseSensorOperator):
'''
Waits for a Python callable to return True.
User could put input argument in templates_dict
e.g ``templates_dict = {'start_ds': 1970}``
and access the argument by calling ``kwargs['templates_dict']['start_ds']``
in the callable
:param python_calla... | 3 | 1 | 12 | 1 | 12 | 0 | 2 | 0.76 | 1 | 8 | 1 | 1 | 2 | 4 | 2 | 23 | 51 | 7 | 25 | 17 | 14 | 19 | 16 | 9 | 13 | 2 | 3 | 1 | 3 |
9,170 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/time.py | standard.sensors.time.TimeSensor | from airflow.providers.standard.triggers.temporal import DateTimeTrigger
import datetime
from airflow.providers.standard.version_compat import BaseSensorOperator
from airflow.configuration import conf
from typing import TYPE_CHECKING, Any
class TimeSensor(BaseSensorOperator):
"""
Waits until the specified time... |
class TimeSensor(BaseSensorOperator):
'''
Waits until the specified time of the day.
:param target_time: time after which the job succeeds
:param deferrable: whether to defer execution
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto... | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 1 | 1 | 4 | 1 | 0 | 2 | 1 | 2 | 23 | 19 | 5 | 7 | 4 | 4 | 7 | 7 | 4 | 4 | 1 | 3 | 0 | 2 |
9,171 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/time.py | standard.sensors.time.TimeSensorAsync | from airflow.exceptions import AirflowProviderDeprecationWarning
import warnings
class TimeSensorAsync(TimeSensor):
"""
Deprecated. Use TimeSensor with deferrable=True instead.
:sphinx-autoapi-skip:
"""
def __init__(self, **kwargs) -> None:
warnings.warn('TimeSensorAsync is deprecated and... |
class TimeSensorAsync(TimeSensor):
'''
Deprecated. Use TimeSensor with deferrable=True instead.
:sphinx-autoapi-skip:
'''
def __init__(self, **kwargs) -> None:
pass | 2 | 1 | 11 | 1 | 10 | 0 | 2 | 0.33 | 1 | 9 | 2 | 0 | 3 | 3 | 3 | 24 | 61 | 9 | 39 | 18 | 27 | 13 | 16 | 10 | 12 | 2 | 3 | 1 | 5 |
9,172 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/time_delta.py | standard.sensors.time_delta.TimeDeltaSensor | from airflow.utils import timezone
from airflow.configuration import conf
from airflow.providers.standard.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger
from airflow.exceptions import AirflowProviderDeprecationWarning, AirflowSkipException
from datetime import datetime, timedelta
from typing import TYPE_CHE... |
class TimeDeltaSensor(BaseSensorOperator):
'''
Waits for a timedelta.
The delta will be evaluated against data_interval_end if present for the dag run,
otherwise run_after will be used.
:param delta: time to wait before succeeding.
:param deferrable: Run sensor in deferrable mode. If set to Tru... | 6 | 4 | 6 | 1 | 5 | 0 | 2 | 0.64 | 1 | 4 | 1 | 1 | 2 | 1 | 2 | 23 | 26 | 8 | 11 | 6 | 8 | 7 | 11 | 6 | 8 | 2 | 3 | 1 | 3 |
9,173 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/time_delta.py | standard.sensors.time_delta.TimeDeltaSensorAsync | from airflow.exceptions import AirflowProviderDeprecationWarning, AirflowSkipException
from deprecated.classic import deprecated
import warnings
@deprecated('Use `TimeDeltaSensor` with `deferrable=True` instead', category=AirflowProviderDeprecationWarning)
class TimeDeltaSensorAsync(TimeDeltaSensor):
"""
Depre... | @deprecated('Use `TimeDeltaSensor` with `deferrable=True` instead', category=AirflowProviderDeprecationWarning)
class TimeDeltaSensorAsync(TimeDeltaSensor):
'''
Deprecated. Use TimeDeltaSensor with deferrable=True instead.
:sphinx-autoapi-skip:
'''
def __init__(self, *, end_from_trigger: bool=False... | 3 | 1 | 13 | 2 | 10 | 1 | 3 | 0.38 | 1 | 13 | 3 | 0 | 3 | 1 | 3 | 26 | 56 | 12 | 32 | 9 | 28 | 12 | 26 | 8 | 22 | 7 | 4 | 2 | 9 |
9,174 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/time_delta.py | standard.sensors.time_delta.WaitSensor | from airflow.configuration import conf
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS, BaseSensorOperator
from airflow.providers.standard.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger
from datetime import datetime, timedelta
from time import sleep
class WaitSensor(BaseSensorOpera... |
class WaitSensor(BaseSensorOperator):
'''
A sensor that waits a specified period of time before completing.
This differs from TimeDeltaSensor because the time to wait is measured from the start of the task, not
the data_interval_end of the DAG run.
:param time_to_wait: time length to wait after the... | 3 | 1 | 11 | 0 | 11 | 0 | 3 | 0.3 | 1 | 6 | 2 | 0 | 2 | 2 | 2 | 23 | 34 | 4 | 23 | 10 | 15 | 7 | 11 | 5 | 8 | 3 | 3 | 1 | 5 |
9,175 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/sensors/weekday.py | standard.sensors.weekday.DayOfWeekSensor | from collections.abc import Iterable
from airflow.providers.standard.utils.weekday import WeekDay
from airflow.providers.standard.version_compat import BaseSensorOperator
from airflow.utils import timezone
class DayOfWeekSensor(BaseSensorOperator):
"""
Waits until the first specified day of the week.
For ... |
class DayOfWeekSensor(BaseSensorOperator):
'''
Waits until the first specified day of the week.
For example, if the execution day of the task is '2018-12-22' (Saturday)
and you pass 'FRIDAY', the task will wait until next Friday.
**Example** (with single day): ::
weekend_check = DayOfWeekSe... | 3 | 1 | 11 | 0 | 11 | 0 | 2 | 1.68 | 1 | 6 | 2 | 0 | 2 | 3 | 2 | 23 | 75 | 16 | 22 | 12 | 13 | 37 | 11 | 6 | 8 | 2 | 3 | 1 | 3 |
9,176 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/triggers/external_task.py | standard.triggers.external_task.DagStateTrigger | import typing
from typing import Any
from asgiref.sync import sync_to_async
from sqlalchemy import func
from airflow.models import DagRun
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS
from airflow.triggers.base import BaseTrigger, TriggerEvent
import asyncio
class DagStateTrigger(BaseTrigger... |
class DagStateTrigger(BaseTrigger):
'''
Waits asynchronously for a dag to complete for a specific run_id.
:param dag_id: The dag_id that contains the task you want to wait for
:param states: allowed states, default is ``['success']``
:param run_ids: The run_id of dag run.
:param poll_interval: ... | 8 | 4 | 14 | 0 | 13 | 2 | 2 | 0.27 | 1 | 11 | 2 | 0 | 4 | 5 | 4 | 37 | 73 | 5 | 56 | 23 | 42 | 15 | 23 | 15 | 18 | 4 | 5 | 2 | 9 |
9,177 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/triggers/external_task.py | standard.triggers.external_task.WorkflowTrigger | from airflow.triggers.base import BaseTrigger, TriggerEvent
from airflow.providers.standard.utils.sensor_helper import _get_count
import typing
import asyncio
from typing import Any
from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS
from asgiref.sync import sync_to_async
class WorkflowTrigger(Bas... |
class WorkflowTrigger(BaseTrigger):
'''
A trigger to monitor tasks, task group and dag execution in Apache Airflow.
:param external_dag_id: The ID of the external dag.
:param run_ids: A list of run ids for the external dag.
:param external_task_ids: A collection of external task IDs to wait for.
... | 7 | 4 | 21 | 0 | 19 | 2 | 3 | 0.26 | 1 | 11 | 1 | 0 | 4 | 10 | 4 | 37 | 102 | 6 | 77 | 34 | 58 | 20 | 39 | 20 | 34 | 8 | 5 | 3 | 13 |
9,178 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/triggers/file.py | standard.triggers.file.FileTrigger | import os
from collections.abc import AsyncIterator
import datetime
from typing import Any
from glob import glob
import asyncio
class FileTrigger(BaseTrigger):
"""
A trigger that fires exactly once after it finds the requested file or folder.
:param filepath: File or folder name (relative to the base path... |
class FileTrigger(BaseTrigger):
'''
A trigger that fires exactly once after it finds the requested file or folder.
:param filepath: File or folder name (relative to the base path set within the connection), can
be a glob.
:param recursive: when set to ``True``, enables recursive directory match... | 4 | 3 | 12 | 0 | 11 | 1 | 3 | 0.29 | 1 | 9 | 1 | 0 | 3 | 3 | 3 | 36 | 49 | 4 | 35 | 17 | 25 | 10 | 22 | 11 | 18 | 6 | 5 | 4 | 8 |
9,179 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/triggers/temporal.py | standard.triggers.temporal.DateTimeTrigger | from typing import Any
import pendulum
import datetime
from collections.abc import AsyncIterator
import asyncio
from airflow.triggers.base import BaseTrigger, TaskSuccessEvent, TriggerEvent
class DateTimeTrigger(BaseTrigger):
"""
Trigger based on a datetime.
A trigger that fires exactly once, at the given... |
class DateTimeTrigger(BaseTrigger):
'''
Trigger based on a datetime.
A trigger that fires exactly once, at the given datetime, give or take
a few seconds.
The provided datetime MUST be in UTC.
:param moment: when to yield event
:param end_from_trigger: whether the trigger should mark the ta... | 4 | 2 | 15 | 1 | 11 | 3 | 3 | 0.56 | 1 | 13 | 3 | 1 | 3 | 2 | 3 | 36 | 61 | 8 | 34 | 8 | 30 | 19 | 28 | 8 | 24 | 5 | 5 | 2 | 10 |
9,180 | apache/airflow | apache_airflow/providers/standard/src/airflow/providers/standard/triggers/temporal.py | standard.triggers.temporal.TimeDeltaTrigger | import datetime
class TimeDeltaTrigger(DateTimeTrigger):
"""
Create DateTimeTriggers based on delays.
Subclass to create DateTimeTriggers based on time delays rather
than exact moments.
While this is its own distinct class here, it will serialise to a
DateTimeTrigger class, since they're oper... |
class TimeDeltaTrigger(DateTimeTrigger):
'''
Create DateTimeTriggers based on delays.
Subclass to create DateTimeTriggers based on time delays rather
than exact moments.
While this is its own distinct class here, it will serialise to a
DateTimeTrigger class, since they're operationally the same... | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 3.33 | 1 | 3 | 0 | 1 | 1 | 0 | 1 | 37 | 17 | 4 | 3 | 2 | 1 | 10 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
9,181 | apache/airflow | apache_airflow/providers/tableau/src/airflow/providers/tableau/hooks/tableau.py | tableau.hooks.tableau.TableauHook | from tableauserverclient import JWTAuth, Pager, Server, TableauAuth
from pathlib import Path
from typing import TYPE_CHECKING, Any, cast
from airflow.utils.helpers import exactly_one
import time
from airflow.providers.tableau.version_compat import BaseHook
from airflow.exceptions import AirflowException
class TableauH... | null | 10 | 5 | 10 | 1 | 6 | 3 | 2 | 0.71 | 1 | 10 | 1 | 0 | 8 | 5 | 8 | 20 | 103 | 19 | 49 | 22 | 40 | 35 | 45 | 22 | 36 | 2 | 2 | 1 | 13 |
9,182 | apache/airflow | apache_airflow/providers/tableau/src/airflow/providers/tableau/hooks/tableau.py | tableau.hooks.tableau.TableauJobFailedException | from airflow.exceptions import AirflowException
class TableauJobFailedException(AirflowException):
"""An exception that indicates that a Job failed to complete.""" |
class TableauJobFailedException(AirflowException):
'''An exception that indicates that a Job failed to complete.'''
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 |
9,183 | apache/airflow | apache_airflow/providers/tableau/src/airflow/providers/tableau/hooks/tableau.py | tableau.hooks.tableau.TableauJobFinishCode | from enum import Enum
class TableauJobFinishCode(Enum):
"""
The finish code indicates the status of the job.
.. seealso:: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#query_job
"""
PENDING = -1
SUCCESS = 0
ERROR = 1
CANCELED = 2 |
class TableauJobFinishCode(Enum):
'''
The finish code indicates the status of the job.
.. seealso:: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#query_job
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 11 | 2 | 5 | 5 | 4 | 4 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
9,184 | apache/airflow | apache_airflow/providers/tableau/src/airflow/providers/tableau/operators/tableau.py | tableau.operators.tableau.TableauOperator | from airflow.exceptions import AirflowException
from airflow.providers.tableau.version_compat import BaseOperator
from collections.abc import Sequence
from airflow.providers.tableau.hooks.tableau import TableauHook, TableauJobFailedException, TableauJobFinishCode
class TableauOperator(BaseOperator):
"""
Execut... |
class TableauOperator(BaseOperator):
'''
Execute a Tableau API Resource.
https://tableau.github.io/server-client-python/docs/api-ref
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:TableauOperator`
:param resource: The na... | 4 | 2 | 23 | 3 | 18 | 2 | 4 | 0.37 | 1 | 9 | 5 | 0 | 3 | 8 | 3 | 3 | 99 | 17 | 60 | 36 | 44 | 22 | 41 | 23 | 37 | 6 | 1 | 4 | 11 |
9,185 | apache/airflow | apache_airflow/providers/tableau/src/airflow/providers/tableau/sensors/tableau.py | tableau.sensors.tableau.TableauJobStatusSensor | from airflow.providers.tableau.version_compat import BaseSensorOperator
from airflow.providers.tableau.hooks.tableau import TableauHook, TableauJobFailedException, TableauJobFinishCode
from collections.abc import Sequence
class TableauJobStatusSensor(BaseSensorOperator):
"""
Watches the status of a Tableau Ser... |
class TableauJobStatusSensor(BaseSensorOperator):
'''
Watches the status of a Tableau Server Job.
.. seealso:: https://tableau.github.io/server-client-python/docs/api-ref#jobs
:param job_id: Id of the job to watch.
:param site_id: The id of the site where the workbook belongs to.
:param tableau... | 3 | 2 | 14 | 2 | 10 | 3 | 2 | 0.59 | 1 | 7 | 4 | 0 | 2 | 3 | 2 | 23 | 43 | 8 | 22 | 17 | 12 | 13 | 15 | 9 | 12 | 2 | 3 | 2 | 3 |
9,186 | apache/airflow | apache_airflow/providers/telegram/src/airflow/providers/telegram/hooks/telegram.py | telegram.hooks.telegram.TelegramHook | from typing import Any
import telegram
from airflow.exceptions import AirflowException
from airflow.providers.telegram.version_compat import BaseHook
import tenacity
import asyncio
class TelegramHook(BaseHook):
"""
This hook allows you to post messages to Telegram using the telegram python-telegram-bot library... |
class TelegramHook(BaseHook):
'''
This hook allows you to post messages to Telegram using the telegram python-telegram-bot library.
The library can be found here: https://github.com/python-telegram-bot/python-telegram-bot
It accepts both telegram bot API token directly or connection that has telegram b... | 11 | 7 | 15 | 3 | 9 | 4 | 3 | 0.68 | 1 | 5 | 1 | 0 | 6 | 3 | 7 | 19 | 159 | 31 | 77 | 37 | 53 | 52 | 53 | 21 | 45 | 4 | 2 | 2 | 18 |
9,187 | apache/airflow | apache_airflow/providers/telegram/src/airflow/providers/telegram/operators/telegram.py | telegram.operators.telegram.TelegramFileOperator | from airflow.exceptions import AirflowException
from airflow.providers.telegram.hooks.telegram import TelegramHook
from collections.abc import Sequence
from airflow.providers.telegram.version_compat import BaseOperator
class TelegramFileOperator(BaseOperator):
"""
This operator allows you to send file to Teleg... |
class TelegramFileOperator(BaseOperator):
'''
This operator allows you to send file to Telegram using Telegram Bot API.
Takes both Telegram Bot API token directly or connection that has Telegram token in password field.
If both supplied, token parameter will be given precedence.
.. seealso::
... | 3 | 2 | 16 | 2 | 14 | 1 | 2 | 0.5 | 1 | 6 | 3 | 0 | 2 | 5 | 2 | 2 | 54 | 10 | 30 | 20 | 18 | 15 | 17 | 11 | 14 | 2 | 1 | 1 | 4 |
9,188 | apache/airflow | apache_airflow/providers/telegram/src/airflow/providers/telegram/operators/telegram.py | telegram.operators.telegram.TelegramOperator | from airflow.providers.telegram.version_compat import BaseOperator
from airflow.exceptions import AirflowException
from airflow.providers.telegram.hooks.telegram import TelegramHook
from collections.abc import Sequence
class TelegramOperator(BaseOperator):
"""
This operator allows you to post messages to Teleg... |
class TelegramOperator(BaseOperator):
'''
This operator allows you to post messages to Telegram using Telegram Bot API.
Takes both Telegram Bot API token directly or connection that has Telegram token in password field.
If both supplied, token parameter will be given precedence.
.. seealso::
... | 3 | 2 | 16 | 2 | 14 | 1 | 2 | 0.5 | 1 | 6 | 3 | 0 | 2 | 5 | 2 | 2 | 54 | 10 | 30 | 20 | 18 | 15 | 17 | 11 | 14 | 2 | 1 | 1 | 4 |
9,189 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/hooks/teradata.py | teradata.hooks.teradata.TeradataHook | import teradatasql
from airflow.providers.common.sql.hooks.sql import DbApiHook
from typing import TYPE_CHECKING, Any
from teradatasql import TeradataConnection
import sqlalchemy
class TeradataHook(DbApiHook):
"""
General hook for interacting with Teradata SQL Database.
This module contains basic APIs to ... |
class TeradataHook(DbApiHook):
'''
General hook for interacting with Teradata SQL Database.
This module contains basic APIs to connect to and interact with Teradata SQL Database. It uses teradatasql
client internally as a database driver for connecting to Teradata database. The config parameters like
... | 10 | 7 | 19 | 3 | 14 | 3 | 3 | 0.41 | 1 | 10 | 1 | 1 | 6 | 0 | 7 | 68 | 195 | 37 | 112 | 44 | 91 | 46 | 72 | 31 | 62 | 10 | 3 | 3 | 24 |
9,190 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata.py | teradata.operators.teradata.TeradataOperator | from typing import TYPE_CHECKING, ClassVar
from airflow.providers.teradata.hooks.teradata import TeradataHook
from collections.abc import Sequence
from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator
class TeradataOperator(SQLExecuteQueryOperator):
"""
General Teradata Operator to exe... |
class TeradataOperator(SQLExecuteQueryOperator):
'''
General Teradata Operator to execute queries on Teradata Database.
Executes sql statements in the Teradata SQL Database using Teradata Python SQL Driver
.. seealso::
For more information on how to use this operator, take a look at the guide:
... | 2 | 1 | 14 | 0 | 14 | 0 | 2 | 0.59 | 1 | 3 | 1 | 0 | 1 | 1 | 1 | 13 | 39 | 5 | 22 | 13 | 15 | 13 | 11 | 8 | 9 | 2 | 3 | 1 | 2 |
9,191 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata.py | teradata.operators.teradata.TeradataStoredProcedureOperator | from airflow.providers.teradata.version_compat import BaseOperator
from airflow.providers.teradata.hooks.teradata import TeradataHook
from collections.abc import Sequence
class TeradataStoredProcedureOperator(BaseOperator):
"""
Executes stored procedure in a specific Teradata database.
:param procedure: n... |
class TeradataStoredProcedureOperator(BaseOperator):
'''
Executes stored procedure in a specific Teradata database.
:param procedure: name of stored procedure to call (templated)
:param teradata_conn_id: The :ref:`Teradata connection id <howto/connection:teradata>`
reference to a specific Terad... | 3 | 1 | 8 | 0 | 8 | 0 | 1 | 0.38 | 1 | 6 | 2 | 0 | 2 | 3 | 2 | 2 | 33 | 5 | 21 | 16 | 11 | 8 | 11 | 9 | 8 | 1 | 1 | 0 | 2 |
9,192 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster.TeradataComputeClusterDecommissionOperator | from collections.abc import Sequence
class TeradataComputeClusterDecommissionOperator(_TeradataComputeClusterOperator):
"""
Drops the compute cluster with specified Compute Group Name and Compute Profile Name.
.. seealso::
For more information on how to use this operator, take a look at the guide:... |
class TeradataComputeClusterDecommissionOperator(_TeradataComputeClusterOperator):
'''
Drops the compute cluster with specified Compute Group Name and Compute Profile Name.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:Teradata... | 4 | 2 | 11 | 0 | 8 | 2 | 2 | 0.62 | 1 | 3 | 1 | 0 | 3 | 1 | 3 | 12 | 62 | 8 | 34 | 13 | 26 | 21 | 20 | 9 | 16 | 3 | 2 | 1 | 5 |
9,193 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster.TeradataComputeClusterProvisionOperator | from airflow.providers.teradata.utils.constants import Constants
from collections.abc import Sequence
class TeradataComputeClusterProvisionOperator(_TeradataComputeClusterOperator):
"""
Creates the new Computer Cluster with specified Compute Group Name and Compute Profile Name.
.. seealso::
For m... |
class TeradataComputeClusterProvisionOperator(_TeradataComputeClusterOperator):
'''
Creates the new Computer Cluster with specified Compute Group Name and Compute Profile Name.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:Tera... | 5 | 2 | 18 | 0 | 16 | 2 | 4 | 0.33 | 1 | 5 | 2 | 0 | 4 | 3 | 4 | 13 | 110 | 10 | 76 | 26 | 65 | 25 | 50 | 20 | 45 | 8 | 2 | 3 | 15 |
9,194 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster.TeradataComputeClusterResumeOperator | from airflow.providers.teradata.utils.constants import Constants
from collections.abc import Sequence
from airflow.exceptions import AirflowException
class TeradataComputeClusterResumeOperator(_TeradataComputeClusterOperator):
"""
Teradata Compute Cluster Operator to Resume the specified Teradata Vantage Cloud... |
class TeradataComputeClusterResumeOperator(_TeradataComputeClusterOperator):
'''
Teradata Compute Cluster Operator to Resume the specified Teradata Vantage Cloud Lake Compute Cluster.
Resumes the Teradata Vantage Lake Computer Cluster by employing the RESUME SQL statement within the
Teradata Vantage La... | 4 | 2 | 14 | 0 | 11 | 3 | 2 | 0.55 | 1 | 5 | 3 | 0 | 3 | 0 | 3 | 12 | 70 | 9 | 40 | 13 | 33 | 22 | 24 | 10 | 20 | 5 | 2 | 2 | 7 |
9,195 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster.TeradataComputeClusterSuspendOperator | from airflow.exceptions import AirflowException
from airflow.providers.teradata.utils.constants import Constants
from collections.abc import Sequence
class TeradataComputeClusterSuspendOperator(_TeradataComputeClusterOperator):
"""
Teradata Compute Cluster Operator to suspend the specified Teradata Vantage Clo... |
class TeradataComputeClusterSuspendOperator(_TeradataComputeClusterOperator):
'''
Teradata Compute Cluster Operator to suspend the specified Teradata Vantage Cloud Lake Compute Cluster.
Suspends the Teradata Vantage Lake Computer Cluster by employing the SUSPEND SQL statement within the
Teradata Vantag... | 4 | 2 | 14 | 0 | 11 | 3 | 2 | 0.55 | 1 | 5 | 3 | 0 | 3 | 0 | 3 | 12 | 70 | 9 | 40 | 11 | 33 | 22 | 24 | 8 | 20 | 5 | 2 | 2 | 7 |
9,196 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster._Operation | from enum import Enum
class _Operation(Enum):
SETUP = 1
STATE = 2 |
class _Operation(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
9,197 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/operators/teradata_compute_cluster.py | teradata.operators.teradata_compute_cluster._TeradataComputeClusterOperator | from airflow.providers.teradata.triggers.teradata_compute_cluster import TeradataComputeClusterSyncTrigger
from abc import abstractmethod
from airflow.providers.teradata.utils.constants import Constants
from functools import cached_property
from datetime import timedelta
from airflow.providers.teradata.hooks.teradata i... |
class _TeradataComputeClusterOperator(BaseOperator):
'''
Teradata Compute Cluster Base Operator to set up and status operations of compute cluster.
:param compute_profile_name: Name of the Compute Profile to manage.
:param compute_group_name: Name of compute group to which compute profile belongs.
... | 12 | 2 | 11 | 0 | 9 | 1 | 2 | 0.19 | 1 | 12 | 5 | 4 | 9 | 4 | 9 | 9 | 125 | 14 | 94 | 36 | 75 | 18 | 59 | 25 | 49 | 6 | 1 | 3 | 19 |
9,198 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/transfers/azure_blob_to_teradata.py | teradata.transfers.azure_blob_to_teradata.AzureBlobStorageToTeradataOperator | from airflow.providers.teradata.hooks.teradata import TeradataHook
from textwrap import dedent
from airflow.providers.teradata.version_compat import BaseOperator
from collections.abc import Sequence
class AzureBlobStorageToTeradataOperator(BaseOperator):
"""
Loads CSV, JSON and Parquet format data from Azure ... |
class AzureBlobStorageToTeradataOperator(BaseOperator):
'''
Loads CSV, JSON and Parquet format data from Azure Blob Storage to Teradata.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureBlobStorageToTeradataOperator`
:par... | 3 | 1 | 26 | 0 | 24 | 2 | 3 | 0.53 | 1 | 6 | 2 | 0 | 2 | 6 | 2 | 2 | 84 | 7 | 51 | 29 | 38 | 27 | 30 | 18 | 27 | 4 | 1 | 2 | 5 |
9,199 | apache/airflow | apache_airflow/providers/teradata/src/airflow/providers/teradata/transfers/s3_to_teradata.py | teradata.transfers.s3_to_teradata.S3ToTeradataOperator | from airflow.providers.teradata.version_compat import BaseOperator
from textwrap import dedent
from airflow.providers.teradata.hooks.teradata import TeradataHook
from collections.abc import Sequence
class S3ToTeradataOperator(BaseOperator):
"""
Loads CSV, JSON and Parquet format data from Amazon S3 to Teradata... |
class S3ToTeradataOperator(BaseOperator):
'''
Loads CSV, JSON and Parquet format data from Amazon S3 to Teradata.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:S3ToTeradataOperator`
:param s3_source_key: The URI format spec... | 3 | 1 | 27 | 1 | 26 | 1 | 3 | 0.46 | 1 | 7 | 3 | 0 | 2 | 6 | 2 | 2 | 85 | 7 | 54 | 30 | 41 | 25 | 33 | 19 | 30 | 5 | 1 | 3 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.