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,900 | apache/airflow | apache_airflow/providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/await_message.py | kafka.triggers.await_message.AwaitMessageTrigger | from collections.abc import Sequence
import asyncio
from airflow.exceptions import AirflowException
from typing import Any
from airflow.triggers.base import BaseTrigger, TriggerEvent
from airflow.utils.module_loading import import_string
from airflow.providers.apache.kafka.hooks.consume import KafkaConsumerHook
from fu... |
class AwaitMessageTrigger(BaseTrigger):
'''
A trigger that waits for a message matching specific criteria to arrive in Kafka.
The behavior of the consumer of this trigger is as follows:
- poll the Kafka topics for a message, if no message returned, sleep
- process the message with provided callable... | 4 | 1 | 19 | 1 | 18 | 0 | 2 | 0.35 | 1 | 10 | 3 | 0 | 3 | 7 | 3 | 36 | 87 | 13 | 55 | 29 | 42 | 19 | 32 | 20 | 28 | 5 | 5 | 3 | 7 |
8,901 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/callbacks.py | kubernetes.callbacks.ExecutionMode | from enum import Enum
class ExecutionMode(str, Enum):
"""Enum class for execution mode."""
SYNC = 'sync'
ASYNC = 'async' |
class ExecutionMode(str, Enum):
'''Enum class for execution mode.'''
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,902 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/callbacks.py | kubernetes.callbacks.KubernetesPodOperatorCallback | import kubernetes.client as k8s
class KubernetesPodOperatorCallback:
"""
`KubernetesPodOperator` callbacks methods.
Currently, the callbacks methods are not called in the async mode, this support will be added
in the future.
"""
@staticmethod
def on_sync_client_creation(*, client: k8s.Cor... |
class KubernetesPodOperatorCallback:
'''
`KubernetesPodOperator` callbacks methods.
Currently, the callbacks methods are not called in the async mode, this support will be added
in the future.
'''
@staticmethod
def on_sync_client_creation(*, client: k8s.CoreV1Api, operator: KubernetesPodOpe... | 19 | 10 | 15 | 1 | 8 | 6 | 1 | 0.68 | 0 | 3 | 1 | 1 | 0 | 0 | 9 | 9 | 162 | 19 | 85 | 76 | 9 | 58 | 19 | 10 | 9 | 1 | 0 | 0 | 9 |
8,903 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/decorators/kubernetes.py | kubernetes.decorators.kubernetes._KubernetesDecoratedOperator | import os
from kubernetes.client import models as k8s
from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator
from collections.abc import Callable, Sequence
from tempfile import TemporaryDirectory
from airflow.providers.cncf.kubernetes.version_compat import DecoratedOperator, TaskDecorator, ta... |
class _KubernetesDecoratedOperator(DecoratedOperator, KubernetesPodOperator):
def __init__(self, namespace: str | None=None, use_dill: bool=False, **kwargs) -> None:
pass
def _generate_cmds(self) -> list[str]:
pass
def execute(self, context: Context):
pass | 4 | 0 | 20 | 2 | 18 | 0 | 1 | 0.05 | 2 | 5 | 0 | 0 | 3 | 3 | 3 | 46 | 73 | 10 | 60 | 24 | 56 | 3 | 29 | 22 | 25 | 2 | 2 | 2 | 4 |
8,904 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/exceptions.py | kubernetes.exceptions.PodMutationHookException | from airflow.exceptions import AirflowException
class PodMutationHookException(AirflowException):
"""Raised when exception happens during Pod Mutation Hook execution.""" |
class PodMutationHookException(AirflowException):
'''Raised when exception happens during Pod Mutation Hook execution.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,905 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/exceptions.py | kubernetes.exceptions.PodReconciliationError | from airflow.exceptions import AirflowException
class PodReconciliationError(AirflowException):
"""Raised when an error is encountered while trying to merge pod configs.""" |
class PodReconciliationError(AirflowException):
'''Raised when an error is encountered while trying to merge pod configs.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,906 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py | kubernetes.executors.kubernetes_executor.KubernetesExecutor | from airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types import ADOPTED, POD_EXECUTOR_DONE_KEY, KubernetesJob, KubernetesResults
import multiprocessing
from queue import Empty, Queue
from airflow.stats import Stats
from airflow.utils.log.logging_mixin import remove_escape_codes
from kubernetes.dynamic... |
class KubernetesExecutor(BaseExecutor):
'''Executor for Kubernetes.'''
def __init__(self):
pass
def _list_pods(self, query_kwargs):
pass
def _make_safe_label_value(self, input_value: str | datetime) -> str:
'''
Normalize a provided label to be of valid length and char... | 28 | 13 | 26 | 2 | 21 | 3 | 4 | 0.14 | 1 | 29 | 11 | 0 | 18 | 11 | 20 | 60 | 580 | 67 | 449 | 140 | 389 | 64 | 322 | 108 | 289 | 12 | 2 | 4 | 83 |
8,907 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py | kubernetes.executors.kubernetes_executor_utils.AirflowKubernetesScheduler | from airflow.providers.cncf.kubernetes.pod_generator import PodGenerator, workload_to_command_args
from queue import Empty, Queue
import time
from typing import TYPE_CHECKING, Any, Literal, cast
from airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types import ADOPTED, ALL_NAMESPACES, POD_EXECUTOR_DONE_... |
class AirflowKubernetesScheduler(LoggingMixin):
'''Airflow Scheduler for Kubernetes.'''
def __init__(self, kube_config: Any, result_queue: Queue[KubernetesResults], kube_client: client.CoreV1Api, scheduler_job_id: str):
pass
def run_pod_async(self, pod: k8s.V1Pod, **kwargs):
'''Run POD as... | 14 | 9 | 16 | 1 | 14 | 2 | 2 | 0.11 | 1 | 13 | 4 | 0 | 13 | 8 | 13 | 19 | 227 | 23 | 183 | 49 | 163 | 21 | 112 | 40 | 98 | 4 | 1 | 3 | 29 |
8,908 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py | kubernetes.executors.kubernetes_executor_utils.KubernetesJobWatcher | from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import annotations_for_logging_task_metadata, annotations_to_key, create_unique_id
import multiprocessing
import time
from airflow.providers.cncf.kubernetes.backcompat import get_logical_date_key
from airflow.exceptions import AirflowException
from queu... |
class KubernetesJobWatcher(multiprocessing.Process, LoggingMixin):
'''Watches for Kubernetes jobs.'''
def __init__(self, namespace: str, watcher_queue: Queue[KubernetesWatch], resource_version: str | None, scheduler_job_id: str, kube_config: Configuration):
pass
def run(self) -> None:
'''... | 7 | 4 | 39 | 2 | 35 | 3 | 6 | 0.09 | 2 | 10 | 3 | 0 | 6 | 5 | 6 | 12 | 240 | 15 | 208 | 53 | 180 | 18 | 112 | 31 | 105 | 12 | 1 | 6 | 34 |
8,909 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py | kubernetes.executors.kubernetes_executor_utils.ResourceVersion | from airflow.utils.singleton import Singleton
class ResourceVersion(metaclass=Singleton):
"""Singleton for tracking resourceVersion from Kubernetes."""
resource_version: dict[str, str] = {} |
class ResourceVersion(metaclass=Singleton):
'''Singleton for tracking resourceVersion from Kubernetes.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 4 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
8,910 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py | kubernetes.executors.local_kubernetes_executor.LocalKubernetesExecutor | from deprecated import deprecated
from typing import TYPE_CHECKING, Any
from airflow.providers.cncf.kubernetes.executors.kubernetes_executor import KubernetesExecutor
from airflow.providers.cncf.kubernetes.version_compat import AIRFLOW_V_3_0_PLUS
from airflow.executors.base_executor import BaseExecutor
from collections... |
class LocalKubernetesExecutor(BaseExecutor):
'''
Chooses between LocalExecutor and KubernetesExecutor based on the queue defined on the task.
When the task's queue is the value of ``kubernetes_queue`` in section ``[local_kubernetes_executor]``
of the configuration (default value: `kubernetes`), Kuberne... | 40 | 23 | 7 | 0 | 5 | 2 | 1 | 0.37 | 1 | 15 | 5 | 0 | 26 | 3 | 27 | 67 | 251 | 45 | 151 | 86 | 86 | 56 | 99 | 50 | 70 | 2 | 2 | 1 | 32 |
8,911 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py | kubernetes.hooks.kubernetes.AsyncKubernetesHook | import contextlib
from airflow.exceptions import AirflowException, AirflowNotFoundException
from urllib3.exceptions import HTTPError
import aiofiles
from asgiref.sync import sync_to_async
from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol, container_is_completed, container_is_runnin... |
class AsyncKubernetesHook(KubernetesHook):
'''Hook to use Kubernetes SDK asynchronously.'''
def __init__(self, config_dict: dict | None=None, *args, **kwargs):
pass
async def _load_config(self):
'''Return Kubernetes API session for use with requests.'''
pass
async def api... | 15 | 9 | 17 | 1 | 12 | 4 | 3 | 0.32 | 1 | 6 | 0 | 1 | 12 | 4 | 12 | 93 | 227 | 27 | 152 | 50 | 133 | 48 | 113 | 37 | 99 | 6 | 7 | 3 | 33 |
8,912 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py | kubernetes.hooks.kubernetes.KubernetesHook | from kubernetes.client.models import V1Deployment
from kubernetes import client, config, utils, watch
import tenacity
from time import sleep
from collections.abc import Generator
from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol, container_is_completed, container_is_running
import ... |
class KubernetesHook(BaseHook, PodOperatorHookProtocol):
'''
Creates Kubernetes API connection.
- use in cluster configuration by using extra field ``in_cluster`` in connection
- use custom config by providing path to the file using extra field ``kube_config_path`` in connection
- use custom config... | 56 | 31 | 14 | 1 | 10 | 3 | 2 | 0.38 | 2 | 11 | 0 | 2 | 32 | 8 | 39 | 81 | 638 | 81 | 403 | 167 | 291 | 155 | 218 | 89 | 175 | 8 | 6 | 3 | 73 |
8,913 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/k8s_model.py | kubernetes.k8s_model.K8SModel | from abc import ABC, abstractmethod
class K8SModel(ABC):
"""
Airflow Kubernetes models are here for backwards compatibility reasons only.
Ideally clients should use the kubernetes API
and the process of
client input -> Airflow k8s models -> k8s models
can be avoided. All of these models ... |
class K8SModel(ABC):
'''
Airflow Kubernetes models are here for backwards compatibility reasons only.
Ideally clients should use the kubernetes API
and the process of
client input -> Airflow k8s models -> k8s models
can be avoided. All of these models implement the
`attach_to_pod` metho... | 3 | 2 | 7 | 1 | 1 | 5 | 1 | 4.33 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 21 | 21 | 5 | 3 | 3 | 0 | 13 | 2 | 2 | 0 | 1 | 4 | 0 | 1 |
8,914 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/kube_config.py | kubernetes.kube_config.KubeConfig | from airflow.settings import AIRFLOW_HOME
from airflow.configuration import conf
from airflow.exceptions import AirflowConfigException
class KubeConfig:
"""Configuration for Kubernetes."""
core_section = 'core'
kubernetes_section = 'kubernetes_executor'
logging_section = 'logging'
def __init__(sel... |
class KubeConfig:
'''Configuration for Kubernetes.'''
def __init__(self):
pass | 2 | 1 | 69 | 4 | 57 | 8 | 8 | 0.15 | 0 | 5 | 1 | 0 | 1 | 18 | 1 | 1 | 76 | 6 | 61 | 24 | 59 | 9 | 37 | 24 | 35 | 8 | 0 | 2 | 8 |
8,915 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py | kubernetes.operators.custom_object_launcher.CustomObjectLauncher | from airflow.exceptions import AirflowException
from kubernetes.client.rest import ApiException
from datetime import datetime as dt
import time
from functools import cached_property
import tenacity
import contextlib
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.providers.cncf.kubernetes.utils.po... |
class CustomObjectLauncher(LoggingMixin):
'''Launches PODS.'''
def __init__(self, name: str | None, namespace: str | None, kube_client: CoreV1Api, custom_obj_api: CustomObjectsApi, template_body: str | None=None):
'''
Create custom object launcher(sparkapplications crd).
:param kube_cl... | 10 | 5 | 22 | 1 | 18 | 3 | 3 | 0.15 | 1 | 11 | 5 | 0 | 7 | 12 | 7 | 13 | 167 | 12 | 135 | 46 | 113 | 20 | 89 | 30 | 81 | 6 | 1 | 3 | 23 |
8,916 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py | kubernetes.operators.custom_object_launcher.CustomObjectStatus | class CustomObjectStatus:
"""Status of the PODs."""
SUBMITTED = 'SUBMITTED'
RUNNING = 'RUNNING'
FAILED = 'FAILED'
SUCCEEDED = 'SUCCEEDED' | class CustomObjectStatus:
'''Status of the PODs.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 0 | 0 | 0 |
8,917 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py | kubernetes.operators.custom_object_launcher.KubernetesSpec | from airflow.providers.cncf.kubernetes.resource_convert.configmap import convert_configmap, convert_configmap_to_volume
from airflow.providers.cncf.kubernetes.resource_convert.secret import convert_image_pull_secrets, convert_secret
from airflow.providers.cncf.kubernetes.resource_convert.env_variable import convert_env... |
class KubernetesSpec:
'''Spark kubernetes spec.'''
def __init__(self, **entries):
pass
def set_attribute(self):
pass | 3 | 1 | 8 | 0 | 8 | 0 | 4 | 0.06 | 0 | 0 | 0 | 0 | 2 | 2 | 2 | 2 | 20 | 2 | 17 | 6 | 14 | 1 | 15 | 6 | 12 | 6 | 0 | 1 | 7 |
8,918 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py | kubernetes.operators.custom_object_launcher.SparkJobSpec | from airflow.exceptions import AirflowException
class SparkJobSpec:
"""Spark job spec."""
def __init__(self, **entries):
self.__dict__.update(entries)
self.validate()
self.update_resources()
def validate(self):
if self.spec.get('dynamicAllocation', {}).get('enabled'):
... |
class SparkJobSpec:
'''Spark job spec.'''
def __init__(self, **entries):
pass
def validate(self):
pass
def update_resources(self):
pass | 4 | 1 | 7 | 0 | 7 | 0 | 2 | 0.05 | 0 | 2 | 2 | 0 | 3 | 0 | 3 | 3 | 26 | 3 | 22 | 5 | 18 | 1 | 14 | 5 | 10 | 3 | 0 | 2 | 6 |
8,919 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py | kubernetes.operators.custom_object_launcher.SparkResources | from copy import deepcopy
class SparkResources:
"""spark resources."""
def __init__(self, driver: dict | None=None, executor: dict | None=None):
self.default = {'gpu': {'name': None, 'quantity': 0}, 'cpu': {'request': None, 'limit': None}, 'memory': {'request': None, 'limit': None}}
self.drive... |
class SparkResources:
'''spark resources.'''
def __init__(self, driver: dict | None=None, executor: dict | None=None):
pass
@property
def resources(self):
'''Return job resources.'''
pass
@property
def driver_resources(self):
'''Return resources to use.'''
... | 9 | 4 | 16 | 1 | 14 | 1 | 5 | 0.08 | 0 | 4 | 0 | 0 | 5 | 3 | 5 | 5 | 89 | 8 | 75 | 18 | 62 | 6 | 57 | 11 | 51 | 13 | 0 | 2 | 27 |
8,920 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py | kubernetes.operators.job.KubernetesDeleteJobOperator | from kubernetes.client import BatchV1Api, models as k8s
from functools import cached_property
from collections.abc import Sequence
from kubernetes.client.rest import ApiException
from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from airflow.utils.context import Context
from airflow.exceptio... |
class KubernetesDeleteJobOperator(BaseOperator):
'''
Delete a Kubernetes Job.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:KubernetesDeleteJobOperator`
:param name: name of the Job.
:param namespace: the namespace to r... | 7 | 1 | 17 | 1 | 17 | 0 | 2 | 0.28 | 1 | 6 | 2 | 1 | 4 | 9 | 4 | 4 | 105 | 9 | 75 | 32 | 55 | 21 | 33 | 16 | 28 | 6 | 1 | 2 | 9 |
8,921 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py | kubernetes.operators.job.KubernetesJobOperator | from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator
from airflow.providers.cncf.kubernetes.pod_generator import PodGenerator, merge_objects
from collections.abc import Sequence
from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import add_unique_suffix, create_unique_id
fro... |
class KubernetesJobOperator(KubernetesPodOperator):
'''
Executes a Kubernetes Job.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:KubernetesJobOperator`
.. note::
If you use `Google Kubernetes Engine <https://cloud.g... | 25 | 6 | 23 | 2 | 18 | 3 | 3 | 0.25 | 1 | 12 | 5 | 2 | 10 | 32 | 13 | 51 | 348 | 44 | 248 | 93 | 208 | 62 | 141 | 51 | 126 | 11 | 2 | 2 | 42 |
8,922 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py | kubernetes.operators.job.KubernetesPatchJobOperator | from airflow.utils.context import Context
from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from collections.abc import Sequence
from kubernetes.client import BatchV1Api, models as k8s
from functools import cached_property
class KubernetesPatchJobOperator(BaseOperator):
"""
Update a... |
class KubernetesPatchJobOperator(BaseOperator):
'''
Update a Kubernetes Job.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:KubernetesPatchJobOperator`
:param name: name of the Job
:param namespace: the namespace to run ... | 5 | 1 | 11 | 0 | 11 | 0 | 1 | 0.42 | 1 | 6 | 1 | 0 | 3 | 7 | 3 | 3 | 67 | 6 | 43 | 25 | 27 | 18 | 18 | 13 | 14 | 1 | 1 | 0 | 3 |
8,923 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/kueue.py | kubernetes.operators.kueue.KubernetesInstallKueueOperator | from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from collections.abc import Sequence
from functools import cached_property
from kubernetes.utils import FailToCreateError
from airflow.exceptions import AirflowException
import json
class KubernetesInstallKueueOperator(BaseOperator):
"""... |
class KubernetesInstallKueueOperator(BaseOperator):
'''
Installs a Kubernetes Kueue.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:KubernetesInstallKueueOperator`
:param kueue_version: The Kubernetes Kueue version to instal... | 5 | 1 | 8 | 1 | 8 | 0 | 2 | 0.31 | 1 | 4 | 2 | 1 | 3 | 3 | 3 | 3 | 46 | 8 | 29 | 14 | 24 | 9 | 23 | 11 | 19 | 4 | 1 | 2 | 6 |
8,924 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/kueue.py | kubernetes.operators.kueue.KubernetesStartKueueJobOperator | from airflow.providers.cncf.kubernetes.operators.job import KubernetesJobOperator
from airflow.exceptions import AirflowException
class KubernetesStartKueueJobOperator(KubernetesJobOperator):
"""
Executes a Kubernetes Job in Kueue.
.. seealso::
For more information on how to use this operator, tak... |
class KubernetesStartKueueJobOperator(KubernetesJobOperator):
'''
Executes a Kubernetes Job in Kueue.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:KubernetesStartKueueJobOperator`
:param queue_name: The name of the Queue i... | 2 | 1 | 19 | 1 | 18 | 0 | 3 | 0.35 | 1 | 4 | 1 | 1 | 1 | 2 | 1 | 52 | 32 | 5 | 20 | 5 | 18 | 7 | 12 | 5 | 10 | 3 | 3 | 1 | 3 |
8,925 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py | kubernetes.operators.pod.KubernetesPodOperator | from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import POD_NAME_MAX_LENGTH, add_unique_suffix, create_unique_id
from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
from airflow.settings impor... | null | 50 | 17 | 25 | 2 | 21 | 2 | 4 | 0.22 | 1 | 24 | 6 | 7 | 35 | 67 | 38 | 38 | 1,140 | 107 | 854 | 287 | 719 | 186 | 455 | 186 | 415 | 14 | 1 | 3 | 159 |
8,926 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py | kubernetes.operators.pod.PodCredentialsExpiredFailure | from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
class PodCredentialsExpiredFailure(AirflowException):
"""When pod fails to refresh credentials.""" |
class PodCredentialsExpiredFailure(AirflowException):
'''When pod fails to refresh credentials.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,927 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py | kubernetes.operators.pod.PodEventType | from enum import Enum
class PodEventType(Enum):
"""Type of Events emitted by kubernetes pod."""
WARNING = 'Warning'
NORMAL = 'Normal' |
class PodEventType(Enum):
'''Type of Events emitted by kubernetes pod.'''
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,928 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py | kubernetes.operators.pod.PodReattachFailure | from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
class PodReattachFailure(AirflowException):
"""When we expect to be able to find a pod but cannot.""" |
class PodReattachFailure(AirflowException):
'''When we expect to be able to find a pod but cannot.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,929 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py | kubernetes.operators.pod._optionally_suppress | import logging
from contextlib import AbstractContextManager
class _optionally_suppress(AbstractContextManager):
"""
Returns context manager that will swallow and log exceptions.
By default swallows descendents of Exception, but you can provide other classes through
the vararg ``exceptions``.
Sup... |
class _optionally_suppress(AbstractContextManager):
'''
Returns context manager that will swallow and log exceptions.
By default swallows descendents of Exception, but you can provide other classes through
the vararg ``exceptions``.
Suppression behavior can be disabled with reraise=True.
:meta ... | 4 | 1 | 5 | 0 | 5 | 0 | 2 | 0.41 | 1 | 2 | 0 | 0 | 3 | 3 | 3 | 26 | 30 | 6 | 17 | 10 | 13 | 7 | 16 | 10 | 12 | 3 | 5 | 1 | 5 |
8,930 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/resource.py | kubernetes.operators.resource.KubernetesCreateResourceOperator | import yaml
from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import should_retry_creation
from airflow.exceptions import AirflowException
from kubernetes.utils import create_from_yaml
import tenacity
from airflow.providers.cncf.kubernetes.utils.k8s_resource_iterator import k8s_resource_iterator
import... |
class KubernetesCreateResourceOperator(KubernetesResourceBaseOperator):
'''Create a resource in a kubernetes.'''
def create_custom_from_yaml_object(self, body: dict):
pass
@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_random_exponential(), reraise=True, retry=tenacity.ret... | 5 | 1 | 8 | 0 | 8 | 0 | 2 | 0.03 | 1 | 1 | 0 | 1 | 3 | 1 | 3 | 9 | 36 | 3 | 32 | 13 | 22 | 1 | 18 | 5 | 14 | 3 | 2 | 2 | 7 |
8,931 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/resource.py | kubernetes.operators.resource.KubernetesDeleteResourceOperator | from airflow.exceptions import AirflowException
from airflow.providers.cncf.kubernetes.utils.k8s_resource_iterator import k8s_resource_iterator
from airflow.providers.cncf.kubernetes.utils.delete_from import delete_from_yaml
import yaml
import os
class KubernetesDeleteResourceOperator(KubernetesResourceBaseOperator):
... |
class KubernetesDeleteResourceOperator(KubernetesResourceBaseOperator):
'''Delete a resource in a kubernetes.'''
def delete_custom_from_yaml_object(self, body: dict):
pass
def _delete_objects(self, objects):
pass
def execute(self, context) -> None:
pass | 4 | 1 | 8 | 0 | 8 | 0 | 2 | 0.04 | 1 | 1 | 0 | 1 | 3 | 1 | 3 | 9 | 29 | 3 | 25 | 8 | 21 | 1 | 17 | 6 | 13 | 3 | 2 | 2 | 7 |
8,932 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/resource.py | kubernetes.operators.resource.KubernetesResourceBaseOperator | from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from airflow.exceptions import AirflowException
from collections.abc import Sequence
from functools import cached_property
class KubernetesResourceBaseOperator(BaseOperator):
"""
Abstract base class for all Kubernetes Resource operat... |
class KubernetesResourceBaseOperator(BaseOperator):
'''
Abstract base class for all Kubernetes Resource operators.
:param yaml_conf: string. Contains the kubernetes resources to Create or Delete
:param yaml_conf_file: path to the kubernetes resources file (templated)
:param namespace: string. Conta... | 10 | 1 | 8 | 1 | 8 | 0 | 2 | 0.25 | 1 | 6 | 1 | 2 | 6 | 7 | 6 | 6 | 77 | 12 | 52 | 37 | 31 | 13 | 37 | 23 | 30 | 3 | 1 | 1 | 10 |
8,933 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py | kubernetes.operators.spark_kubernetes.SparkKubernetesOperator | from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import add_unique_suffix
from airflow.providers.cncf.kubernetes import pod_generator
from pathlib import Path
from airflow.providers.cncf.kubernetes.pod_generator import MAX_LABEL_LEN, PodGenerator
from airflow.providers.cncf.kubernetes.operators.pod im... |
class SparkKubernetesOperator(KubernetesPodOperator):
'''
Creates sparkApplication object in kubernetes cluster.
.. seealso::
For more detail about Spark Application Object have a look at the reference:
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/v1beta2-1.3.3-3.1.1/do... | 27 | 7 | 12 | 1 | 10 | 1 | 2 | 0.23 | 1 | 20 | 6 | 0 | 16 | 20 | 18 | 56 | 280 | 38 | 199 | 96 | 148 | 45 | 131 | 64 | 112 | 6 | 2 | 2 | 39 |
8,934 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/pod_generator.py | kubernetes.pod_generator.PodGenerator | from airflow.version import version as airflow_version
from airflow.utils import yaml
from airflow.exceptions import AirflowConfigException
from functools import reduce
import warnings
from __future__ import annotations
from airflow.providers.cncf.kubernetes.backcompat import get_logical_date_key
import os
from airflow... |
class PodGenerator:
'''
Contains Kubernetes Airflow Worker configuration logic.
Represents a kubernetes pod and manages execution of a single pod.
Any configuration that is container specific gets applied to
the first container in the list of containers.
:param pod: The fully specified pod. Mut... | 24 | 12 | 29 | 3 | 20 | 6 | 4 | 0.31 | 0 | 11 | 2 | 0 | 1 | 2 | 12 | 12 | 377 | 46 | 255 | 95 | 182 | 78 | 129 | 34 | 115 | 10 | 0 | 2 | 44 |
8,935 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/secret.py | kubernetes.secret.Secret | from kubernetes.client import models as k8s
import copy
from airflow.exceptions import AirflowConfigException
import uuid
from airflow.providers.cncf.kubernetes.k8s_model import K8SModel
class Secret(K8SModel):
"""Defines Kubernetes Secret Volume."""
def __init__(self, deploy_type, deploy_target, secret, key=... |
class Secret(K8SModel):
'''Defines Kubernetes Secret Volume.'''
def __init__(self, deploy_type, deploy_target, secret, key=None, items=None):
'''
Initialize a Kubernetes Secret Object.
Used to track requested secrets from the user.
:param deploy_type: The type of secret deploy ... | 8 | 6 | 12 | 1 | 8 | 3 | 3 | 0.36 | 1 | 1 | 0 | 0 | 7 | 5 | 7 | 28 | 96 | 17 | 58 | 19 | 50 | 21 | 48 | 19 | 40 | 8 | 5 | 2 | 18 |
8,936 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py | kubernetes.sensors.spark_kubernetes.SparkKubernetesSensor | from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
from functools import cached_property
from kubernetes import client
from airflow.exceptions import AirflowException
from collections.abc import Sequence
class SparkKubernetesSensor(BaseSensorOperator):
"""
Checks sparkApplication obj... |
class SparkKubernetesSensor(BaseSensorOperator):
'''
Checks sparkApplication object in kubernetes cluster.
.. seealso::
For more detail about Spark Application Object have a look at the reference:
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/v1beta2-1.1.0-2.4.5/docs/api... | 6 | 1 | 19 | 1 | 18 | 0 | 4 | 0.18 | 1 | 7 | 2 | 0 | 4 | 7 | 4 | 25 | 103 | 11 | 78 | 38 | 61 | 14 | 50 | 25 | 45 | 7 | 3 | 2 | 14 |
8,937 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/job.py | kubernetes.triggers.job.KubernetesJobTrigger | from airflow.providers.cncf.kubernetes.hooks.kubernetes import AsyncKubernetesHook, KubernetesHook
from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults
from airflow.triggers.base import BaseTrigger, TriggerEvent
from typing import TYPE_CHECKING, Any
import asyncio
from airflow.providers.cncf.kub... |
class KubernetesJobTrigger(BaseTrigger):
'''
KubernetesJobTrigger run on the trigger worker to check the state of Job.
:param job_name: The name of the job.
:param job_namespace: The namespace of the job.
:param pod_name: The name of the Pod. Parameter is deprecated, please use pod_names instead.
... | 10 | 3 | 19 | 0 | 19 | 1 | 2 | 0.22 | 1 | 13 | 5 | 0 | 5 | 12 | 5 | 38 | 123 | 6 | 97 | 41 | 75 | 21 | 36 | 25 | 30 | 8 | 5 | 1 | 12 |
8,938 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py | kubernetes.triggers.pod.ContainerState | from enum import Enum
class ContainerState(str, Enum):
"""
Possible container states.
See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase.
"""
WAITING = 'waiting'
RUNNING = 'running'
TERMINATED = 'terminated'
FAILED = 'failed'
UNDEFINED = 'undefined' |
class ContainerState(str, Enum):
'''
Possible container states.
See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.67 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 12 | 2 | 6 | 6 | 5 | 4 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
8,939 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py | kubernetes.triggers.pod.KubernetesPodTrigger | from functools import cached_property
from airflow.providers.cncf.kubernetes.hooks.kubernetes import AsyncKubernetesHook
from airflow.triggers.base import BaseTrigger, TriggerEvent
import datetime
from typing import TYPE_CHECKING, Any, cast
from airflow.providers.cncf.kubernetes.utils.pod_manager import OnFinishAction,... |
class KubernetesPodTrigger(BaseTrigger):
'''
KubernetesPodTrigger run on the trigger worker to check the state of Pod.
:param pod_name: The name of the pod.
:param pod_namespace: The namespace of the pod.
:param kubernetes_conn_id: The :ref:`kubernetes connection id <howto/connection:kubernetes>`
... | 14 | 6 | 21 | 1 | 19 | 1 | 3 | 0.16 | 1 | 15 | 2 | 1 | 9 | 16 | 10 | 43 | 243 | 19 | 194 | 63 | 164 | 31 | 92 | 43 | 81 | 6 | 5 | 3 | 29 |
8,940 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/delete_from.py | kubernetes.utils.delete_from.FailToDeleteError | class FailToDeleteError(Exception):
"""For handling error if an error occurred when handling a yaml file during deletion of the resource."""
def __init__(self, api_exceptions: list):
self.api_exceptions = api_exceptions
def __str__(self):
msg = ''
for api_exception in self.api_exce... | class FailToDeleteError(Exception):
'''For handling error if an error occurred when handling a yaml file during deletion of the resource.'''
def __init__(self, api_exceptions: list):
pass
def __str__(self):
pass | 3 | 1 | 4 | 0 | 4 | 0 | 2 | 0.13 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 12 | 11 | 2 | 8 | 6 | 5 | 1 | 8 | 6 | 5 | 2 | 3 | 1 | 3 |
8,941 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.OnFinishAction | import enum
class OnFinishAction(str, enum.Enum):
"""Action to take when the pod finishes."""
KEEP_POD = 'keep_pod'
DELETE_POD = 'delete_pod'
DELETE_SUCCEEDED_POD = 'delete_succeeded_pod' |
class OnFinishAction(str, enum.Enum):
'''Action to take when the pod finishes.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
8,942 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodLaunchFailedException | from airflow.exceptions import AirflowException
class PodLaunchFailedException(AirflowException):
"""When pod launching fails in KubernetesPodOperator.""" |
class PodLaunchFailedException(AirflowException):
'''When pod launching fails in KubernetesPodOperator.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,943 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodLaunchTimeoutException | from airflow.exceptions import AirflowException
class PodLaunchTimeoutException(AirflowException):
"""When pod does not leave the ``Pending`` phase within specified timeout.""" |
class PodLaunchTimeoutException(AirflowException):
'''When pod does not leave the ``Pending`` phase within specified timeout.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,944 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodLoggingStatus | from dataclasses import dataclass
from pendulum import DateTime
@dataclass
class PodLoggingStatus:
"""Return the status of the pod and last log time when exiting from `fetch_container_logs`."""
running: bool
last_log_time: DateTime | None | @dataclass
class PodLoggingStatus:
'''Return the status of the pod and last log time when exiting from `fetch_container_logs`.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 1 | 2 | 1 | 3 | 1 | 2 | 0 | 0 | 0 | 0 |
8,945 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodLogsConsumer | from airflow.utils.timezone import utcnow
from datetime import timedelta
from collections.abc import Callable, Generator, Iterable
class PodLogsConsumer:
"""
Responsible for pulling pod logs from a stream with checking a container status before reading data.
This class is a workaround for the issue https:... |
class PodLogsConsumer:
'''
Responsible for pulling pod logs from a stream with checking a container status before reading data.
This class is a workaround for the issue https://github.com/apache/airflow/issues/23497.
:param response: HTTP response with logs
:param pod: Pod instance from Kubernetes ... | 9 | 2 | 10 | 0 | 10 | 0 | 3 | 0.23 | 0 | 8 | 1 | 0 | 4 | 8 | 6 | 6 | 84 | 9 | 61 | 35 | 44 | 14 | 47 | 25 | 40 | 6 | 0 | 3 | 19 |
8,946 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodManager | import pendulum
import math
from pendulum import DateTime
from airflow.providers.cncf.kubernetes.callbacks import ExecutionMode, KubernetesPodOperatorCallback
from collections.abc import Callable, Generator, Iterable
from airflow.exceptions import AirflowException
from contextlib import closing, suppress
from kubernete... |
class PodManager(LoggingMixin):
'''Create, monitor, and otherwise interact with Kubernetes pods for use with the KubernetesPodOperator.'''
def __init__(self, kube_client: client.CoreV1Api, callbacks: list[type[KubernetesPodOperatorCallback]] | None=None):
'''
Create the launcher.
:para... | 37 | 27 | 24 | 1 | 18 | 5 | 3 | 0.24 | 1 | 19 | 7 | 0 | 25 | 3 | 25 | 31 | 576 | 51 | 427 | 143 | 345 | 102 | 247 | 80 | 220 | 16 | 1 | 7 | 87 |
8,947 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodNotFoundException | from airflow.exceptions import AirflowException
class PodNotFoundException(AirflowException):
"""Expected pod does not exist in kube-api.""" |
class PodNotFoundException(AirflowException):
'''Expected pod does not exist in kube-api.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
8,948 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodOperatorHookProtocol | from typing import TYPE_CHECKING, Literal, Protocol, cast
from kubernetes import client, watch
class PodOperatorHookProtocol(Protocol):
"""
Protocol to define methods relied upon by KubernetesPodOperator.
Subclasses of KubernetesPodOperator, such as GKEStartPodOperator, may use
hooks that don't extend... |
class PodOperatorHookProtocol(Protocol):
'''
Protocol to define methods relied upon by KubernetesPodOperator.
Subclasses of KubernetesPodOperator, such as GKEStartPodOperator, may use
hooks that don't extend KubernetesHook. We use this protocol to document the
methods used by KPO and ensure that t... | 9 | 7 | 2 | 0 | 1 | 1 | 1 | 1.33 | 1 | 2 | 0 | 1 | 6 | 0 | 6 | 30 | 28 | 7 | 9 | 9 | 0 | 12 | 7 | 7 | 0 | 1 | 5 | 0 | 6 |
8,949 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py | kubernetes.utils.pod_manager.PodPhase | class PodPhase:
"""
Possible pod phases.
See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase.
"""
PENDING = 'Pending'
RUNNING = 'Running'
FAILED = 'Failed'
SUCCEEDED = 'Succeeded'
terminal_states = {FAILED, SUCCEEDED} | class PodPhase:
'''
Possible pod phases.
See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.67 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 6 | 6 | 5 | 4 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
8,950 | apache/airflow | apache_airflow/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/xcom_sidecar.py | kubernetes.utils.xcom_sidecar.PodDefaults | from kubernetes.client import models as k8s
class PodDefaults:
"""Static defaults for Pods."""
XCOM_MOUNT_PATH = '/airflow/xcom'
SIDECAR_CONTAINER_NAME = 'airflow-xcom-sidecar'
XCOM_CMD = 'trap "exit 0" INT; while true; do sleep 1; done;'
VOLUME_MOUNT = k8s.V1VolumeMount(name='xcom', mount_path=XCO... |
class PodDefaults:
'''Static defaults for Pods.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 1 | 18 | 7 | 17 | 1 | 7 | 7 | 6 | 0 | 0 | 0 | 0 |
8,951 | apache/airflow | apache_airflow/providers/apache/kylin/src/airflow/providers/apache/kylin/hooks/kylin.py | kylin.hooks.kylin.KylinHook | from kylinpy import exceptions, kylinpy
from airflow.exceptions import AirflowException
class KylinHook(BaseHook):
"""
Interact with Kylin to run CubeSource commands and get job status.
:param kylin_conn_id: The connection id as configured in Airflow administration.
:param project: project name
:p... |
class KylinHook(BaseHook):
'''
Interact with Kylin to run CubeSource commands and get job status.
:param kylin_conn_id: The connection id as configured in Airflow administration.
:param project: project name
:param dsn: dsn
'''
def __init__(self, kylin_conn_id: str=default_conn_name, proje... | 5 | 3 | 11 | 1 | 8 | 3 | 2 | 0.5 | 1 | 3 | 1 | 0 | 4 | 3 | 4 | 16 | 62 | 8 | 36 | 20 | 26 | 18 | 24 | 14 | 19 | 2 | 2 | 1 | 6 |
8,952 | apache/airflow | apache_airflow/providers/apache/kylin/src/airflow/providers/apache/kylin/operators/kylin_cube.py | kylin.operators.kylin_cube.KylinCubeOperator | from kylinpy import kylinpy
import time
from airflow.exceptions import AirflowException
from airflow.providers.apache.kylin.version_compat import BaseOperator
from collections.abc import Sequence
from datetime import datetime
from airflow.providers.apache.kylin.hooks.kylin import KylinHook
class KylinCubeOperator(Base... |
class KylinCubeOperator(BaseOperator):
'''
Submit request about Kylin build/refresh/merge and track job status.
For more detail information in
`Apache Kylin <http://kylin.apache.org/>`_
:param kylin_conn_id: The connection id as configured in Airflow administration.
:param project: kylin projec... | 3 | 1 | 37 | 3 | 35 | 0 | 7 | 0.43 | 1 | 7 | 2 | 0 | 2 | 15 | 2 | 2 | 141 | 10 | 92 | 47 | 71 | 40 | 48 | 29 | 45 | 13 | 1 | 3 | 14 |
8,953 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py | livy.hooks.livy.BatchState | from enum import Enum
class BatchState(Enum):
"""Batch session states."""
NOT_STARTED = 'not_started'
STARTING = 'starting'
RUNNING = 'running'
IDLE = 'idle'
BUSY = 'busy'
SHUTTING_DOWN = 'shutting_down'
ERROR = 'error'
DEAD = 'dead'
KILLED = 'killed'
SUCCESS = 'success' |
class BatchState(Enum):
'''Batch session states.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.09 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 13 | 1 | 11 | 11 | 10 | 1 | 11 | 11 | 10 | 0 | 4 | 0 | 0 |
8,954 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py | livy.hooks.livy.LivyAsyncHook | import asyncio
import re
import aiohttp
from asgiref.sync import sync_to_async
from aiohttp import ClientResponseError
from collections.abc import Sequence
from airflow.providers.http.hooks.http import HttpAsyncHook, HttpHook
from typing import TYPE_CHECKING, Any
class LivyAsyncHook(HttpAsyncHook):
"""
Hook fo... | null | 22 | 13 | 24 | 2 | 16 | 6 | 4 | 0.4 | 1 | 16 | 1 | 0 | 7 | 6 | 14 | 30 | 385 | 44 | 244 | 95 | 185 | 97 | 160 | 49 | 145 | 16 | 3 | 4 | 60 |
8,955 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py | livy.hooks.livy.LivyHook | from airflow.exceptions import AirflowException
import requests
from typing import TYPE_CHECKING, Any
from collections.abc import Sequence
from airflow.providers.http.hooks.http import HttpAsyncHook, HttpHook
import re
import json
class LivyHook(HttpHook):
"""
Hook for Apache Livy through the REST API.
:p... | null | 23 | 15 | 23 | 2 | 14 | 6 | 3 | 0.46 | 1 | 14 | 2 | 0 | 9 | 6 | 16 | 43 | 417 | 57 | 248 | 91 | 193 | 113 | 162 | 48 | 145 | 16 | 3 | 2 | 52 |
8,956 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/operators/livy.py | livy.operators.livy.LivyOperator | from airflow.providers.common.compat.openlineage.utils.spark import inject_parent_job_information_into_spark_properties, inject_transport_information_into_spark_properties
from airflow.providers.apache.livy.hooks.livy import BatchState, LivyHook
from airflow.providers.apache.livy.version_compat import BaseOperator
impo... |
class LivyOperator(BaseOperator):
'''
Wraps the Apache Livy batch REST API, allowing to submit a Spark application to the underlying cluster.
:param file: path of the file containing the application to execute (required). (templated)
:param class_name: name of the application Java/Spark main class. (te... | 9 | 5 | 22 | 2 | 18 | 2 | 3 | 0.33 | 1 | 12 | 4 | 0 | 7 | 11 | 7 | 7 | 196 | 20 | 132 | 55 | 95 | 44 | 63 | 25 | 55 | 5 | 1 | 2 | 18 |
8,957 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/sensors/livy.py | livy.sensors.livy.LivySensor | from typing import TYPE_CHECKING, Any
from collections.abc import Sequence
from airflow.providers.apache.livy.version_compat import BaseSensorOperator
from airflow.providers.apache.livy.hooks.livy import LivyHook
class LivySensor(BaseSensorOperator):
"""
Monitor a Livy sessions for termination.
:param liv... |
class LivySensor(BaseSensorOperator):
'''
Monitor a Livy sessions for termination.
:param livy_conn_id: reference to a pre-defined Livy connection
:param batch_id: identifier of the monitored batch
depends on the option that's being modified.
'''
def __init__(self, *, batch_id: int | s... | 4 | 2 | 12 | 1 | 10 | 1 | 1 | 0.31 | 1 | 7 | 1 | 0 | 3 | 6 | 3 | 24 | 49 | 7 | 32 | 22 | 19 | 10 | 18 | 13 | 14 | 2 | 3 | 1 | 4 |
8,958 | apache/airflow | apache_airflow/providers/apache/livy/src/airflow/providers/apache/livy/triggers/livy.py | livy.triggers.livy.LivyTrigger | from airflow.providers.apache.livy.hooks.livy import BatchState, LivyAsyncHook
from datetime import datetime, timedelta, timezone
from collections.abc import AsyncIterator
from airflow.triggers.base import BaseTrigger, TriggerEvent
import asyncio
from typing import Any
class LivyTrigger(BaseTrigger):
"""
Check... |
class LivyTrigger(BaseTrigger):
'''
Check for the state of a previously submitted job with batch_id.
:param batch_id: Batch job id
:param spark_params: Spark parameters; for example,
spark_params = {"file": "test/pi.py", "class_name": "org.apache.spark.examples.SparkPi",
"args":... | 6 | 4 | 25 | 0 | 22 | 2 | 3 | 0.23 | 1 | 14 | 3 | 0 | 5 | 9 | 5 | 38 | 147 | 8 | 113 | 33 | 96 | 26 | 50 | 21 | 44 | 6 | 5 | 2 | 13 |
8,959 | apache/airflow | apache_airflow/providers/mongo/src/airflow/providers/mongo/hooks/mongo.py | mongo.hooks.mongo.MongoHook | import pymongo
from pymongo import MongoClient, ReplaceOne
from airflow.exceptions import AirflowConfigException
from typing import TYPE_CHECKING, Any, overload
from urllib.parse import quote_plus, urlunsplit
from airflow.providers.mongo.version_compat import BaseHook
from collections.abc import Iterable
from pymongo.e... |
class MongoHook(BaseHook):
'''
PyMongo wrapper to interact with MongoDB.
Mongo Connection Documentation
https://docs.mongodb.com/manual/reference/connection-string/index.html
You can specify connection string options in extra field of your connection
https://docs.mongodb.com/manual/reference/co... | 30 | 20 | 16 | 2 | 9 | 5 | 2 | 0.63 | 1 | 11 | 1 | 1 | 20 | 7 | 23 | 35 | 445 | 81 | 223 | 140 | 118 | 141 | 113 | 59 | 87 | 5 | 2 | 2 | 39 |
8,960 | apache/airflow | apache_airflow/providers/mongo/src/airflow/providers/mongo/sensors/mongo.py | mongo.sensors.mongo.MongoSensor | from airflow.providers.mongo.version_compat import BaseSensorOperator
from collections.abc import Sequence
from airflow.providers.mongo.hooks.mongo import MongoHook
class MongoSensor(BaseSensorOperator):
"""
Checks for the existence of a document which matches the given query in MongoDB.
.. code-block:: p... |
class MongoSensor(BaseSensorOperator):
'''
Checks for the existence of a document which matches the given query in MongoDB.
.. code-block:: python
mongo_sensor = MongoSensor(
collection="coll",
query={"key": "value"},
mongo_conn_id="mongo_default",
mo... | 3 | 1 | 7 | 0 | 7 | 0 | 1 | 1 | 1 | 6 | 2 | 0 | 2 | 4 | 2 | 23 | 38 | 6 | 16 | 11 | 11 | 16 | 12 | 9 | 9 | 1 | 3 | 0 | 2 |
8,961 | apache/airflow | apache_airflow/providers/microsoft/mssql/src/airflow/providers/microsoft/mssql/dialects/mssql.py | mssql.dialects.mssql.MsSqlDialect | from airflow.providers.common.sql.dialects.dialect import Dialect
from methodtools import lru_cache
from airflow.providers.common.sql.hooks.handlers import fetch_all_handler
class MsSqlDialect(Dialect):
"""Microsoft SQL Server dialect implementation."""
@lru_cache(maxsize=None)
def get_primary_keys(self, ... |
class MsSqlDialect(Dialect):
'''Microsoft SQL Server dialect implementation.'''
@lru_cache(maxsize=None)
def get_primary_keys(self, table: str, schema: str | None=None) -> list[str] | None:
pass
def generate_replace_sql(self, table, values, target_fields, **kwargs) -> str:
pass | 4 | 1 | 20 | 2 | 18 | 1 | 2 | 0.08 | 1 | 4 | 0 | 0 | 2 | 0 | 2 | 28 | 45 | 6 | 38 | 8 | 34 | 3 | 15 | 7 | 12 | 2 | 2 | 1 | 4 |
8,962 | apache/airflow | apache_airflow/providers/microsoft/mssql/src/airflow/providers/microsoft/mssql/hooks/mssql.py | mssql.hooks.mssql.MsSqlHook | from typing import TYPE_CHECKING, Any
from airflow.providers.common.sql.hooks.sql import DbApiHook
from pymssql import Connection as PymssqlConnection
from airflow.providers.microsoft.mssql.dialects.mssql import MsSqlDialect
import pymssql
class MsSqlHook(DbApiHook):
"""
Interact with Microsoft SQL Server.
... |
class MsSqlHook(DbApiHook):
'''
Interact with Microsoft SQL Server.
:param args: passed to DBApiHook
:param sqlalchemy_scheme: Scheme sqlalchemy connection. Default is ``mssql+pymssql`` Only used for
``get_sqlalchemy_engine`` and ``get_sqlalchemy_connection`` methods.
:param kwargs: passed t... | 16 | 7 | 7 | 0 | 6 | 1 | 1 | 0.18 | 1 | 10 | 3 | 0 | 12 | 2 | 12 | 73 | 113 | 16 | 82 | 44 | 53 | 15 | 48 | 30 | 33 | 3 | 3 | 2 | 15 |
8,963 | apache/airflow | apache_airflow/providers/mysql/src/airflow/providers/mysql/hooks/mysql.py | mysql.hooks.mysql.MySqlHook | from urllib.parse import quote_plus, urlencode
from typing import TYPE_CHECKING, Any, Union
from airflow.exceptions import AirflowOptionalProviderFeatureException
import json
from airflow.providers.common.sql.hooks.sql import DbApiHook
class MySqlHook(DbApiHook):
"""
Interact with MySQL.
You can specify c... |
class MySqlHook(DbApiHook):
'''
Interact with MySQL.
You can specify charset in the extra field of your connection
as ``{"charset": "utf8"}``. Also you can choose cursor as
``{"cursor": "SSCursor"}``. Refer to the MySQLdb.cursors for more details.
Note: For AWS IAM authentication, use iam in th... | 17 | 13 | 19 | 2 | 12 | 5 | 3 | 0.49 | 1 | 15 | 3 | 2 | 13 | 3 | 14 | 75 | 303 | 50 | 173 | 51 | 150 | 85 | 118 | 48 | 98 | 14 | 3 | 2 | 39 |
8,964 | apache/airflow | apache_airflow/providers/mysql/src/airflow/providers/mysql/transfers/presto_to_mysql.py | mysql.transfers.presto_to_mysql.PrestoToMySqlOperator | from collections.abc import Sequence
from airflow.providers.mysql.version_compat import BaseOperator
from airflow.providers.mysql.hooks.mysql import MySqlHook
from airflow.providers.presto.hooks.presto import PrestoHook
class PrestoToMySqlOperator(BaseOperator):
"""
Moves data from Presto to MySQL.
Note t... |
class PrestoToMySqlOperator(BaseOperator):
'''
Moves data from Presto to MySQL.
Note that for now the data is loaded into memory before being pushed
to MySQL, so this operator should be used for smallish amount of data.
:param sql: SQL query to execute against Presto. (templated)
:param mysql_t... | 3 | 1 | 15 | 1 | 14 | 0 | 2 | 0.43 | 1 | 5 | 3 | 0 | 2 | 5 | 2 | 2 | 56 | 7 | 35 | 24 | 23 | 15 | 23 | 15 | 20 | 2 | 1 | 1 | 3 |
8,965 | apache/airflow | apache_airflow/providers/mysql/src/airflow/providers/mysql/transfers/s3_to_mysql.py | mysql.transfers.s3_to_mysql.S3ToMySqlOperator | from airflow.providers.amazon.aws.hooks.s3 import S3Hook
from airflow.providers.mysql.version_compat import BaseOperator
from collections.abc import Sequence
from airflow.providers.mysql.hooks.mysql import MySqlHook
import os
class S3ToMySqlOperator(BaseOperator):
"""
Loads a file from S3 into a MySQL table.
... |
class S3ToMySqlOperator(BaseOperator):
'''
Loads a file from S3 into a MySQL table.
:param s3_source_key: The path to the file (S3 key) that will be loaded into MySQL.
:param mysql_table: The MySQL table into where the data will be sent.
:param mysql_duplicate_key_handling: Specify what should happ... | 3 | 2 | 21 | 2 | 17 | 3 | 1 | 0.49 | 1 | 6 | 3 | 0 | 2 | 7 | 2 | 2 | 68 | 8 | 41 | 27 | 27 | 20 | 21 | 16 | 18 | 1 | 1 | 1 | 2 |
8,966 | apache/airflow | apache_airflow/providers/mysql/src/airflow/providers/mysql/transfers/trino_to_mysql.py | mysql.transfers.trino_to_mysql.TrinoToMySqlOperator | from collections.abc import Sequence
from airflow.providers.trino.hooks.trino import TrinoHook
from airflow.providers.mysql.version_compat import BaseOperator
from airflow.providers.mysql.hooks.mysql import MySqlHook
class TrinoToMySqlOperator(BaseOperator):
"""
Moves data from Trino to MySQL.
Note that f... |
class TrinoToMySqlOperator(BaseOperator):
'''
Moves data from Trino to MySQL.
Note that for now the data is loaded into memory before being pushed
to MySQL, so this operator should be used for smallish amount of data.
:param sql: SQL query to execute against Trino. (templated)
:param mysql_tabl... | 3 | 1 | 15 | 1 | 14 | 0 | 2 | 0.43 | 1 | 5 | 3 | 0 | 2 | 5 | 2 | 2 | 56 | 7 | 35 | 24 | 23 | 15 | 23 | 15 | 20 | 2 | 1 | 1 | 3 |
8,967 | apache/airflow | apache_airflow/providers/mysql/src/airflow/providers/mysql/transfers/vertica_to_mysql.py | mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator | from tempfile import NamedTemporaryFile
from airflow.providers.mysql.version_compat import BaseOperator
import csv
from collections.abc import Sequence
from contextlib import closing
from airflow.providers.mysql.hooks.mysql import MySqlHook
from airflow.providers.vertica.hooks.vertica import VerticaHook
class VerticaT... |
class VerticaToMySqlOperator(BaseOperator):
'''
Moves data from Vertica to MySQL.
:param sql: SQL query to execute against the Vertica database. (templated)
:param vertica_conn_id: source Vertica connection
:param mysql_table: target MySQL table, use dot notation to target a
specific databa... | 6 | 1 | 17 | 1 | 16 | 0 | 2 | 0.22 | 1 | 8 | 3 | 0 | 5 | 7 | 5 | 5 | 120 | 14 | 88 | 40 | 71 | 19 | 68 | 26 | 62 | 3 | 1 | 4 | 11 |
8,968 | apache/airflow | apache_airflow/providers/neo4j/src/airflow/providers/neo4j/hooks/neo4j.py | neo4j.hooks.neo4j.Neo4jHook | from typing import TYPE_CHECKING, Any
from urllib.parse import urlsplit
from neo4j import Driver, GraphDatabase
class Neo4jHook(BaseHook):
"""
Interact with Neo4j.
Performs a connection to Neo4j and runs the query.
:param neo4j_conn_id: Reference to :ref:`Neo4j connection id <howto/connection:neo4j>`... | null | 6 | 5 | 16 | 3 | 8 | 5 | 2 | 0.63 | 1 | 6 | 0 | 0 | 5 | 3 | 5 | 17 | 96 | 21 | 46 | 25 | 40 | 29 | 44 | 24 | 38 | 5 | 2 | 2 | 12 |
8,969 | apache/airflow | apache_airflow/providers/neo4j/src/airflow/providers/neo4j/operators/neo4j.py | neo4j.operators.neo4j.Neo4jOperator | from airflow.providers.neo4j.hooks.neo4j import Neo4jHook
from typing import TYPE_CHECKING, Any
from collections.abc import Sequence
from airflow.providers.neo4j.version_compat import BaseOperator
class Neo4jOperator(BaseOperator):
"""
Executes sql code in a specific Neo4j database.
.. seealso::
F... |
class Neo4jOperator(BaseOperator):
'''
Executes sql code in a specific Neo4j database.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:Neo4jOperator`
:param sql: the sql code to be executed. Can receive a str representing a
... | 3 | 1 | 8 | 0 | 8 | 0 | 1 | 0.5 | 1 | 7 | 2 | 0 | 2 | 3 | 2 | 2 | 32 | 5 | 18 | 15 | 8 | 9 | 11 | 8 | 8 | 1 | 1 | 0 | 2 |
8,970 | apache/airflow | apache_airflow/providers/odbc/src/airflow/providers/odbc/hooks/odbc.py | odbc.hooks.odbc.OdbcHook | from airflow.providers.common.sql.hooks.sql import DbApiHook
from collections.abc import Sequence
from pyodbc import Connection, Row, connect
from collections import namedtuple
from airflow.utils.helpers import merge_dicts
from typing import Any, cast
from urllib.parse import quote_plus
class OdbcHook(DbApiHook):
... |
class OdbcHook(DbApiHook):
'''
Interact with odbc data sources using pyodbc.
To configure driver, in addition to supplying as constructor arg, the following are also supported:
* set ``driver`` parameter in ``hook_params`` dictionary when instantiating hook by SQL operators.
* set ``driver`... | 19 | 12 | 12 | 1 | 9 | 3 | 3 | 0.4 | 1 | 10 | 0 | 0 | 12 | 7 | 12 | 73 | 198 | 27 | 124 | 63 | 93 | 49 | 97 | 46 | 83 | 10 | 3 | 2 | 31 |
8,971 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/exceptions.py | openai.exceptions.OpenAIBatchJobException | from airflow.exceptions import AirflowException
class OpenAIBatchJobException(AirflowException):
"""Raise when OpenAI Batch Job fails to start AFTER processing the request.""" |
class OpenAIBatchJobException(AirflowException):
'''Raise when OpenAI Batch Job fails to start AFTER processing the request.'''
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,972 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/exceptions.py | openai.exceptions.OpenAIBatchTimeout | from airflow.exceptions import AirflowException
class OpenAIBatchTimeout(AirflowException):
"""Raise when OpenAI Batch Job times out.""" |
class OpenAIBatchTimeout(AirflowException):
'''Raise when OpenAI Batch Job times out.'''
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,973 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/hooks/openai.py | openai.hooks.openai.BatchStatus | from enum import Enum
class BatchStatus(str, Enum):
"""Enum for the status of a batch."""
VALIDATING = 'validating'
FAILED = 'failed'
IN_PROGRESS = 'in_progress'
FINALIZING = 'finalizing'
COMPLETED = 'completed'
EXPIRED = 'expired'
CANCELLING = 'cancelling'
CANCELLED = 'cancelled'
... |
class BatchStatus(str, Enum):
'''Enum for the status of a batch.'''
def __str__(self) -> str:
pass
@classmethod
def is_in_progress(cls, status: str) -> bool:
'''Check if the batch status is in progress.'''
pass | 4 | 2 | 3 | 0 | 2 | 1 | 1 | 0.14 | 2 | 1 | 0 | 0 | 1 | 0 | 2 | 117 | 19 | 3 | 14 | 12 | 10 | 2 | 13 | 11 | 10 | 1 | 4 | 0 | 2 |
8,974 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/hooks/openai.py | openai.hooks.openai.OpenAIHook | from typing import TYPE_CHECKING, Any, BinaryIO, Literal
from openai import OpenAI
from airflow.providers.openai.exceptions import OpenAIBatchJobException, OpenAIBatchTimeout
from airflow.providers.openai.version_compat import BaseHook
import time
from functools import cached_property
class OpenAIHook(BaseHook):
"... |
class OpenAIHook(BaseHook):
'''
Use OpenAI SDK to interact with OpenAI APIs.
.. seealso:: https://platform.openai.com/docs/introduction/overview
:param conn_id: :ref:`OpenAI connection id <howto/connection:openai>`
'''
def __init__(self, conn_id: str=default_conn_name, *args: Any, **kwargs: An... | 42 | 38 | 9 | 1 | 5 | 4 | 1 | 0.78 | 1 | 16 | 3 | 0 | 38 | 1 | 39 | 51 | 420 | 73 | 195 | 116 | 127 | 152 | 143 | 86 | 103 | 8 | 2 | 2 | 47 |
8,975 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/operators/openai.py | openai.operators.openai.OpenAIEmbeddingOperator | from functools import cached_property
from typing import TYPE_CHECKING, Any, Literal
from airflow.providers.openai.version_compat import BaseOperator
from collections.abc import Sequence
from airflow.providers.openai.hooks.openai import OpenAIHook
class OpenAIEmbeddingOperator(BaseOperator):
"""
Operator that ... |
class OpenAIEmbeddingOperator(BaseOperator):
'''
Operator that accepts input text to generate OpenAI embeddings using the specified model.
:param conn_id: The OpenAI connection ID to use.
:param input_text: The text to generate OpenAI embeddings for. This can be a string, a list of strings,
... | 5 | 2 | 8 | 0 | 8 | 0 | 1 | 0.52 | 1 | 10 | 2 | 0 | 3 | 4 | 3 | 3 | 47 | 6 | 27 | 18 | 15 | 14 | 17 | 10 | 13 | 2 | 1 | 1 | 4 |
8,976 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/operators/openai.py | openai.operators.openai.OpenAITriggerBatchOperator | from airflow.configuration import conf
from typing import TYPE_CHECKING, Any, Literal
from collections.abc import Sequence
from airflow.providers.openai.version_compat import BaseOperator
from functools import cached_property
from airflow.providers.openai.triggers.openai import OpenAIBatchTrigger
from airflow.providers... |
class OpenAITriggerBatchOperator(BaseOperator):
'''
Operator that triggers an OpenAI Batch API endpoint and waits for the batch to complete.
:param file_id: Required. The ID of the batch file to trigger.
:param endpoint: Required. The OpenAI Batch API endpoint to trigger.
:param conn_id: Optional. ... | 7 | 4 | 12 | 0 | 10 | 1 | 2 | 0.43 | 1 | 9 | 4 | 0 | 5 | 9 | 5 | 5 | 86 | 10 | 53 | 28 | 36 | 23 | 32 | 16 | 26 | 3 | 1 | 2 | 9 |
8,977 | apache/airflow | apache_airflow/providers/openai/src/airflow/providers/openai/triggers/openai.py | openai.triggers.openai.OpenAIBatchTrigger | from typing import Any
import asyncio
from airflow.providers.openai.hooks.openai import BatchStatus, OpenAIHook
from airflow.triggers.base import BaseTrigger, TriggerEvent
import time
from collections.abc import AsyncIterator
class OpenAIBatchTrigger(BaseTrigger):
"""Triggers OpenAI Batch API."""
def __init__... |
class OpenAIBatchTrigger(BaseTrigger):
'''Triggers OpenAI Batch API.'''
def __init__(self, conn_id: str, batch_id: str, poll_interval: float, end_time: float) -> None:
pass
def serialize(self) -> tuple[str, dict[str, Any]]:
'''Serialize OpenAIBatchTrigger arguments and class path.'''
... | 4 | 3 | 27 | 0 | 26 | 1 | 3 | 0.04 | 1 | 11 | 3 | 0 | 3 | 4 | 3 | 36 | 86 | 4 | 79 | 17 | 69 | 3 | 25 | 9 | 21 | 8 | 5 | 3 | 10 |
8,978 | apache/airflow | apache_airflow/providers/openfaas/src/airflow/providers/openfaas/hooks/openfaas.py | openfaas.hooks.openfaas.OpenFaasHook | import requests
from typing import Any
from airflow.providers.openfaas.version_compat import BaseHook
from airflow.exceptions import AirflowException
class OpenFaasHook(BaseHook):
"""
Interact with OpenFaaS to query, deploy, invoke and update function.
:param function_name: Name of the function, Defaults ... |
class OpenFaasHook(BaseHook):
'''
Interact with OpenFaaS to query, deploy, invoke and update function.
:param function_name: Name of the function, Defaults to None
:param conn_id: openfaas connection to use, Defaults to open_faas_default
for example host : http://openfaas.faas.com, Connection T... | 8 | 6 | 9 | 0 | 8 | 1 | 2 | 0.17 | 1 | 6 | 1 | 0 | 7 | 2 | 7 | 19 | 86 | 10 | 65 | 26 | 57 | 11 | 59 | 26 | 51 | 3 | 2 | 2 | 13 |
8,979 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/base.py | openlineage.extractors.base.BaseExtractor | from abc import ABC, abstractmethod
from airflow.utils.log.logging_mixin import LoggingMixin
class BaseExtractor(ABC, LoggingMixin):
"""
Abstract base extractor class.
This is used mostly to maintain support for custom extractors.
"""
_allowed_query_params: list[str] = []
def __init__(self, o... |
class BaseExtractor(ABC, LoggingMixin):
'''
Abstract base extractor class.
This is used mostly to maintain support for custom extractors.
'''
def __init__(self, operator):
pass
@classmethod
@abstractmethod
def get_operator_classnames(cls) -> list[str]:
'''
Get a... | 10 | 2 | 3 | 0 | 2 | 1 | 1 | 0.67 | 2 | 5 | 1 | 4 | 4 | 1 | 5 | 31 | 32 | 8 | 15 | 10 | 7 | 10 | 13 | 8 | 7 | 1 | 4 | 0 | 5 |
8,980 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/base.py | openlineage.extractors.base.DefaultExtractor | class DefaultExtractor(BaseExtractor):
"""Extractor that uses `get_openlineage_facets_on_start/complete/failure` methods."""
@classmethod
def get_operator_classnames(cls) -> list[str]:
"""
Assign this extractor to *no* operators.
Default extractor is chosen not on the classname bas... | class DefaultExtractor(BaseExtractor):
'''Extractor that uses `get_openlineage_facets_on_start/complete/failure` methods.'''
@classmethod
def get_operator_classnames(cls) -> list[str]:
'''
Assign this extractor to *no* operators.
Default extractor is chosen not on the classname basis... | 7 | 2 | 17 | 1 | 13 | 3 | 3 | 0.25 | 1 | 7 | 2 | 0 | 3 | 0 | 4 | 35 | 73 | 6 | 55 | 10 | 49 | 14 | 36 | 9 | 31 | 5 | 5 | 2 | 12 |
8,981 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/base.py | openlineage.extractors.base.OperatorLineage | from typing import Generic, TypeVar
from attrs import Factory, define
@define
class OperatorLineage(Generic[DatasetSubclass, BaseFacetSubclass]):
"""Structure returned from lineage extraction."""
inputs: list[DatasetSubclass] = Factory(list)
outputs: list[DatasetSubclass] = Factory(list)
run_facets: di... | @define
class OperatorLineage(Generic[DatasetSubclass, BaseFacetSubclass]):
'''Structure returned from lineage extraction.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
8,982 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/bash.py | openlineage.extractors.bash.BashExtractor | from openlineage.client.facet_v2 import source_code_job
from airflow.providers.openlineage.extractors.base import BaseExtractor, OperatorLineage
from airflow.providers.openlineage import conf
from airflow.providers.openlineage.utils.utils import get_unknown_source_attribute_run_facet
class BashExtractor(BaseExtractor)... |
class BashExtractor(BaseExtractor):
'''
Extract executed bash command and put it into SourceCodeJobFacet.
This extractor provides visibility on what bash task does by extracting
executed bash command and putting it into SourceCodeJobFacet. It does
not extract datasets.
:meta private:
'''
... | 5 | 1 | 8 | 0 | 7 | 1 | 1 | 0.43 | 1 | 5 | 1 | 0 | 2 | 1 | 3 | 34 | 39 | 6 | 23 | 7 | 18 | 10 | 11 | 5 | 7 | 2 | 5 | 1 | 4 |
8,983 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/manager.py | openlineage.extractors.manager.ExtractorManager | from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.state import TaskInstanceState
from airflow.providers.openlineage.extractors import BaseExtractor, OperatorLineage
from airflow.providers.openlineage.utils.utils import get_unknown_source_attribute_run_facet, try_import_from_string
from airflow... |
class ExtractorManager(LoggingMixin):
'''Class abstracting management of custom extractors.'''
def __init__(self):
pass
def add_extractor(self, operator_class: str, extractor: type[BaseExtractor]):
pass
def extract_metadata(self, dagrun, task, task_instance_state: TaskInstanceState, ... | 16 | 1 | 21 | 1 | 19 | 1 | 4 | 0.03 | 1 | 15 | 5 | 0 | 8 | 2 | 11 | 17 | 267 | 27 | 232 | 58 | 197 | 8 | 127 | 40 | 107 | 8 | 1 | 5 | 50 |
8,984 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/extractors/python.py | openlineage.extractors.python.PythonExtractor | from airflow.providers.openlineage import conf
import inspect
from airflow.providers.openlineage.utils.utils import get_unknown_source_attribute_run_facet
from openlineage.client.facet_v2 import source_code_job
from airflow.providers.openlineage.extractors.base import BaseExtractor, OperatorLineage
from collections.abc... |
class PythonExtractor(BaseExtractor):
'''
Extract executed source code and put it into SourceCodeJobFacet.
This extractor provides visibility on what particular task does by extracting
executed source code and putting it into SourceCodeJobFacet. It does not extract
datasets yet.
:meta private:
... | 6 | 1 | 10 | 0 | 8 | 1 | 2 | 0.31 | 1 | 7 | 1 | 0 | 3 | 1 | 4 | 35 | 53 | 7 | 35 | 9 | 29 | 11 | 20 | 7 | 15 | 3 | 5 | 1 | 7 |
8,985 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py | openlineage.plugins.adapter.OpenLineageAdapter | from openlineage.client.uuid import generate_static_uuid
import traceback
from airflow.providers.openlineage import __version__ as OPENLINEAGE_PROVIDER_VERSION, conf
import os
from typing import TYPE_CHECKING, Literal
from openlineage.client.event_v2 import Job, Run, RunEvent, RunState
from openlineage.client.facet_v2 ... |
class OpenLineageAdapter(LoggingMixin):
'''Translate Airflow metadata to OpenLineage events instead of creating them from Airflow code.'''
def __init__(self, client: OpenLineageClient | None=None, secrets_masker: SecretsMasker | None=None):
pass
def get_or_create_openlineage_client(self) -> OpenL... | 21 | 5 | 29 | 1 | 24 | 4 | 3 | 0.17 | 1 | 15 | 5 | 0 | 10 | 2 | 15 | 21 | 450 | 30 | 363 | 130 | 254 | 63 | 118 | 36 | 101 | 5 | 1 | 2 | 41 |
8,986 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowDagRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowDagRunFacet(RunFacet):
"""Composite Airflow DAG run facet."""
dag: dict
dagRun: dict | @define
class AirflowDagRunFacet(RunFacet):
'''Composite Airflow DAG run facet.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 1 | 2 | 1 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
8,987 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowDebugRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowDebugRunFacet(RunFacet):
"""Airflow Debug run facet."""
packages: dict | @define
class AirflowDebugRunFacet(RunFacet):
'''Airflow Debug run facet.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
8,988 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowJobFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowJobFacet(JobFacet):
"""
Composite Airflow job facet.
This facet encapsulates all the necessary information to re-create full scope of an Airflow DAG logic,
enabling reconstruction, visualization, a... | @define
class AirflowJobFacet(JobFacet):
'''
Composite Airflow job facet.
This facet encapsulates all the necessary information to re-create full scope of an Airflow DAG logic,
enabling reconstruction, visualization, and analysis of DAGs in a comprehensive manner.
It includes detailed representation... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 3.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 3 | 4 | 1 | 3 | 13 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
8,989 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowMappedTaskRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowMappedTaskRunFacet(RunFacet):
"""Run facet containing information about mapped tasks."""
mapIndex: int
operatorClass: str
_additional_skip_redact = ['operatorClass']
@classmethod
def from_t... | @define
class AirflowMappedTaskRunFacet(RunFacet):
'''Run facet containing information about mapped tasks.'''
@classmethod
def from_task_instance(cls, task_instance):
pass | 4 | 1 | 7 | 1 | 6 | 0 | 1 | 0.09 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 16 | 4 | 11 | 5 | 7 | 1 | 7 | 4 | 4 | 1 | 1 | 0 | 1 |
8,990 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowRunFacet(RunFacet):
"""Composite Airflow run facet."""
dag: dict
dagRun: dict
task: dict
taskInstance: dict
taskUuid: str | @define
class AirflowRunFacet(RunFacet):
'''Composite Airflow run facet.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 1 | 6 | 1 | 5 | 1 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
8,991 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.AirflowStateRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class AirflowStateRunFacet(RunFacet):
"""
Airflow facet providing state information.
This facet is designed to be sent at a completion event, offering state information about
the DAG run and each individual tas... | @define
class AirflowStateRunFacet(RunFacet):
'''
Airflow facet providing state information.
This facet is designed to be sent at a completion event, offering state information about
the DAG run and each individual task. This information is crucial for understanding
the execution flow and comprehens... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 3.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 3 | 3 | 1 | 2 | 10 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
8,992 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.UnknownOperatorAttributeRunFacet | from attrs import define
from openlineage.client.facet_v2 import JobFacet, RunFacet
@define
class UnknownOperatorAttributeRunFacet(RunFacet):
"""RunFacet that describes unknown operators in an Airflow DAG."""
unknownItems: list[UnknownOperatorInstance] | @define
class UnknownOperatorAttributeRunFacet(RunFacet):
'''RunFacet that describes unknown operators in an Airflow DAG.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
8,993 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/facets.py | openlineage.plugins.facets.UnknownOperatorInstance | from openlineage.client.utils import RedactMixin
from attrs import define
@define
class UnknownOperatorInstance(RedactMixin):
"""
Describes an unknown operator.
This specifies the (class) name of the operator and its properties.
"""
name: str
properties: dict[str, object]
type: str = 'oper... | @define
class UnknownOperatorInstance(RedactMixin):
'''
Describes an unknown operator.
This specifies the (class) name of the operator and its properties.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 5 | 3 | 4 | 4 | 5 | 3 | 4 | 0 | 1 | 0 | 0 |
8,994 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py | openlineage.plugins.listener.OpenLineageListener | from concurrent.futures import ProcessPoolExecutor
from airflow.settings import configure_orm
from airflow.models import DagRun, TaskInstance
import logging
import psutil
from airflow.listeners import hookimpl
from airflow.providers.openlineage.utils.utils import AIRFLOW_V_3_0_PLUS, get_airflow_dag_run_facet, get_airfl... |
class OpenLineageListener:
'''OpenLineage listener sends events on task instance and dag run starts, completes and failures.'''
def __init__(self):
pass
@hookimpl
def on_task_instance_running(self, previous_state: TaskInstanceState, task_instance: RuntimeTaskInstance):
... | 43 | 1 | 30 | 3 | 27 | 1 | 3 | 0.02 | 0 | 9 | 4 | 0 | 17 | 4 | 17 | 17 | 482 | 58 | 415 | 106 | 360 | 10 | 193 | 69 | 172 | 8 | 0 | 2 | 64 |
8,995 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/plugins/openlineage.py | openlineage.plugins.openlineage.OpenLineageProviderPlugin | from airflow.providers.openlineage import conf
from airflow.plugins_manager import AirflowPlugin
from airflow.providers.openlineage.plugins.listener import get_openlineage_listener
from airflow.providers.openlineage.plugins.macros import lineage_job_name, lineage_job_namespace, lineage_parent_id, lineage_root_job_name,... |
class OpenLineageProviderPlugin(AirflowPlugin):
'''
Listener that emits numerous Events.
OpenLineage Plugin provides listener that emits OL events on DAG start,
complete and failure and TaskInstances start, complete and failure.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.45 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 19 | 3 | 11 | 6 | 9 | 5 | 10 | 6 | 8 | 0 | 1 | 2 | 0 |
8,996 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/sqlparser.py | openlineage.sqlparser.DatabaseInfo | from attrs import define
from collections.abc import Callable
@define
class DatabaseInfo:
"""
Contains database specific information needed to process SQL statement parse result.
:param scheme: Scheme part of URI in OpenLineage namespace.
:param authority: Authority part of URI in OpenLineage namespac... | @define
class DatabaseInfo:
'''
Contains database specific information needed to process SQL statement parse result.
:param scheme: Scheme part of URI in OpenLineage namespace.
:param authority: Authority part of URI in OpenLineage namespace.
For most cases it should return `{host}:{port}` part ... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 6.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 12 | 10 | 9 | 9 | 64 | 10 | 9 | 9 | 0 | 0 | 0 | 0 |
8,997 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/sqlparser.py | openlineage.sqlparser.GetTableSchemasParams | from collections.abc import Callable
from typing import TYPE_CHECKING, TypedDict
class GetTableSchemasParams(TypedDict):
"""get_table_schemas params."""
normalize_name: Callable[[str], str]
is_cross_db: bool
information_schema_columns: list[str]
information_schema_table: str
use_flat_cross_db_q... |
class GetTableSchemasParams(TypedDict):
'''get_table_schemas params.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 8 | 1 | 7 | 1 | 8 | 1 | 7 | 0 | 1 | 0 | 0 |
8,998 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/sqlparser.py | openlineage.sqlparser.SQLParser | from airflow.providers.openlineage.utils.sql import TablesHierarchy, create_information_schema_query, get_table_schemas
from airflow.providers.openlineage.extractors.base import OperatorLineage
from airflow.utils.log.logging_mixin import LoggingMixin
import sqlparse
from openlineage.client.facet_v2 import column_lineag... | null | 17 | 9 | 23 | 1 | 19 | 3 | 2 | 0.19 | 1 | 14 | 5 | 0 | 7 | 2 | 11 | 17 | 287 | 24 | 221 | 76 | 161 | 42 | 62 | 29 | 48 | 5 | 1 | 2 | 29 |
8,999 | apache/airflow | apache_airflow/providers/openlineage/src/airflow/providers/openlineage/utils/sql.py | openlineage.utils.sql.ColumnIndex | from enum import IntEnum
class ColumnIndex(IntEnum):
"""Enumerates the indices of columns in information schema view."""
SCHEMA = 0
TABLE_NAME = 1
COLUMN_NAME = 2
ORDINAL_POSITION = 3
UDT_NAME = 4
DATABASE = 5 |
class ColumnIndex(IntEnum):
'''Enumerates the indices of columns in information schema view.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.43 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 11 | 1 | 7 | 7 | 6 | 3 | 7 | 7 | 6 | 0 | 3 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.