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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31,200 | fishtown-analytics/dbt | core/dbt/config/selectors.py | dbt.config.selectors.SelectorConfig | from dbt_common.exceptions import DbtRuntimeError
from dbt.exceptions import DbtSelectorsError
from dbt_common.clients.system import load_file_contents, path_exists, resolve_path_from_base
from pathlib import Path
from typing import Any, Dict, Optional, Union
from dbt.clients.yaml_helper import Dumper, Loader, load_yam... |
class SelectorConfig(Dict[str, Dict[str, Union[SelectionSpec, bool]]]):
@classmethod
def selectors_from_dict(cls, data: Dict[str, Any]) -> 'SelectorConfig':
pass
@classmethod
def render_from_dict(cls, data: Dict[str, Any], renderer: BaseRenderer) -> 'SelectorConfig':
pass
@classmet... | 7 | 0 | 18 | 1 | 18 | 0 | 3 | 0 | 1 | 6 | 3 | 0 | 0 | 0 | 3 | 3 | 61 | 4 | 57 | 23 | 42 | 0 | 29 | 9 | 25 | 3 | 1 | 1 | 8 |
31,201 | fishtown-analytics/dbt | core/dbt/config/selectors.py | dbt.config.selectors.SelectorDict | from dbt.exceptions import DbtSelectorsError
from dbt.graph.selector_spec import SelectionCriteria
from copy import deepcopy
class SelectorDict:
@classmethod
def parse_dict_definition(cls, definition, selector_dict={}):
key = list(definition)[0]
value = definition[key]
if isinstance(va... |
class SelectorDict:
@classmethod
def parse_dict_definition(cls, definition, selector_dict={}):
pass
@classmethod
def parse_a_definition(cls, def_type, definition, selector_dict={}):
pass
@classmethod
def parse_from_definition(cls, definition, selector_dict={}):
pass
... | 9 | 0 | 14 | 0 | 13 | 0 | 5 | 0.05 | 0 | 5 | 2 | 0 | 0 | 0 | 4 | 4 | 64 | 3 | 58 | 20 | 49 | 3 | 43 | 16 | 38 | 7 | 0 | 2 | 18 |
31,202 | fishtown-analytics/dbt | core/dbt/context/base.py | dbt.context.base.BaseContext | from dbt.clients.yaml_helper import Dumper, Loader, SafeLoader, safe_load, yaml
from dbt import tracking, utils
from typing import Any, Callable, Dict, Iterable, List, Mapping, NoReturn, Optional, Set
from dbt.version import __version__ as dbt_version
from dbt.flags import get_flags
from dbt_common.events.types import ... |
class BaseContext(metaclass=ContextMeta):
def __init__(self, cli_vars: Dict[str, Any]) -> None:
pass
def generate_builtins(self) -> Dict[str, Any]:
pass
def to_dict(self) -> Dict[str, Any]:
pass
@contextproperty()
def dbt_version(self) -> str:
'''The `dbt_version`... | 62 | 22 | 19 | 3 | 5 | 10 | 2 | 1.53 | 1 | 16 | 7 | 2 | 11 | 3 | 25 | 39 | 545 | 104 | 175 | 71 | 107 | 267 | 127 | 43 | 99 | 6 | 3 | 4 | 50 |
31,203 | fishtown-analytics/dbt | core/dbt/context/base.py | dbt.context.base.ContextMember | from typing import Any, Callable, Dict, Iterable, List, Mapping, NoReturn, Optional, Set
class ContextMember:
def __init__(self, value: Any, name: Optional[str]=None) -> None:
self.name = name
self.inner = value
def key(self, default: str) -> str:
if self.name is None:
ret... |
class ContextMember:
def __init__(self, value: Any, name: Optional[str]=None) -> None:
pass
def key(self, default: str) -> str:
pass | 3 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 0 | 2 | 0 | 0 | 2 | 2 | 2 | 2 | 9 | 1 | 8 | 5 | 5 | 0 | 8 | 5 | 5 | 2 | 0 | 1 | 3 |
31,204 | fishtown-analytics/dbt | core/dbt/context/base.py | dbt.context.base.ContextMeta | from typing import Any, Callable, Dict, Iterable, List, Mapping, NoReturn, Optional, Set
class ContextMeta(type):
def __new__(mcls, name, bases, dct: Dict[str, Any]) -> ContextMeta:
context_members: Dict[str, Any] = {}
context_attrs: Dict[str, Any] = {}
new_dct: Dict[str, Any] = {}
... |
class ContextMeta(type):
def __new__(mcls, name, bases, dct: Dict[str, Any]) -> ContextMeta:
pass | 2 | 0 | 19 | 2 | 17 | 0 | 4 | 0 | 1 | 3 | 1 | 1 | 1 | 0 | 1 | 14 | 20 | 2 | 18 | 8 | 16 | 0 | 18 | 8 | 16 | 4 | 2 | 2 | 4 |
31,205 | fishtown-analytics/dbt | core/dbt/context/base.py | dbt.context.base.Var | from dbt.contracts.graph.nodes import Resource
from dbt.exceptions import EnvVarMissingError, RequiredVarNotFoundError, SecretEnvVarLocationError, SetStrictWrongTypeError, ZipStrictWrongTypeError
from dbt.clients.jinja import get_rendered
from typing import Any, Callable, Dict, Iterable, List, Mapping, NoReturn, Option... |
class Var:
def __init__(self, context: Mapping[str, Any], cli_vars: Mapping[str, Any], node: Optional[Resource]=None) -> None:
pass
def _generate_merged(self) -> Mapping[str, Any]:
pass
@property
def node_name(self) -> str:
pass
def get_missing_var(self, var_name: str) ->... | 9 | 0 | 5 | 0 | 5 | 0 | 2 | 0.06 | 0 | 5 | 1 | 2 | 7 | 4 | 7 | 7 | 46 | 8 | 36 | 20 | 22 | 2 | 27 | 14 | 19 | 3 | 0 | 1 | 11 |
31,206 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.ConfiguredContext | from dbt.adapters.contracts.connection import AdapterRequiredConfig
from dbt.context.target import TargetContext
from dbt.context.base import Var, contextmember, contextproperty
class ConfiguredContext(TargetContext):
config: AdapterRequiredConfig
def __init__(self, config: AdapterRequiredConfig) -> None:
... |
class ConfiguredContext(TargetContext):
def __init__(self, config: AdapterRequiredConfig) -> None:
pass
@contextproperty()
def project_name(self) -> str:
pass | 4 | 0 | 3 | 0 | 3 | 0 | 1 | 0.13 | 1 | 2 | 0 | 3 | 2 | 0 | 2 | 43 | 11 | 2 | 8 | 4 | 4 | 1 | 7 | 3 | 4 | 1 | 5 | 0 | 2 |
31,207 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.ConfiguredVar | from dbt.adapters.contracts.connection import AdapterRequiredConfig
from typing import Any, Dict, Optional
from dbt.utils import MultiDict
from dbt.context.base import Var, contextmember, contextproperty
class ConfiguredVar(Var):
def __init__(self, context: Dict[str, Any], config: AdapterRequiredConfig, project_n... |
class ConfiguredVar(Var):
def __init__(self, context: Dict[str, Any], config: AdapterRequiredConfig, project_name: str):
pass
def __call__(self, var_name, default=Var._VAR_NOTSET):
pass | 3 | 0 | 16 | 3 | 13 | 1 | 3 | 0.04 | 1 | 5 | 2 | 0 | 2 | 2 | 2 | 9 | 34 | 7 | 26 | 15 | 18 | 1 | 21 | 10 | 18 | 5 | 1 | 1 | 6 |
31,208 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.FQNLookup | from dbt.node_types import NodeType
class FQNLookup:
def __init__(self, package_name: str):
self.package_name = package_name
self.fqn = [package_name]
self.resource_type = NodeType.Model |
class FQNLookup:
def __init__(self, package_name: str):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 3 | 1 | 1 | 5 | 0 | 5 | 5 | 3 | 0 | 5 | 5 | 3 | 1 | 0 | 0 | 1 |
31,209 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.MacroResolvingContext | from dbt.context.base import Var, contextmember, contextproperty
class MacroResolvingContext(ConfiguredContext):
def __init__(self, config):
super().__init__(config)
@contextproperty()
def var(self) -> ConfiguredVar:
return ConfiguredVar(self._ctx, self.config, self.config.project_name) |
class MacroResolvingContext(ConfiguredContext):
def __init__(self, config):
pass
@contextproperty()
def var(self) -> ConfiguredVar:
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 45 | 7 | 1 | 6 | 4 | 2 | 0 | 5 | 3 | 2 | 1 | 6 | 0 | 2 |
31,210 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.SchemaYamlContext | from dbt.context.base import Var, contextmember, contextproperty
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.exceptions import EnvVarMissingError, SecretEnvVarLocationError
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from typing import Any, Dict, Optional
from dbt_common.context import get_invocat... |
class SchemaYamlContext(ConfiguredContext):
def __init__(self, config, project_name: str, schema_yaml_vars: Optional[SchemaYamlVars]):
pass
@contextproperty()
def var(self) -> ConfiguredVar:
pass
@contextmember()
def env_var(self, var: str, default: Optional[str]=None) -> str:
... | 6 | 0 | 10 | 1 | 8 | 1 | 3 | 0.19 | 1 | 6 | 4 | 1 | 3 | 2 | 3 | 46 | 35 | 4 | 26 | 10 | 20 | 5 | 20 | 8 | 16 | 7 | 6 | 2 | 9 |
31,211 | fishtown-analytics/dbt | core/dbt/context/configured.py | dbt.context.configured.SchemaYamlVars | class SchemaYamlVars:
def __init__(self):
self.env_vars = {}
self.vars = {} | class SchemaYamlVars:
def __init__(self):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 1 | 4 | 0 | 4 | 4 | 2 | 0 | 4 | 4 | 2 | 1 | 0 | 0 | 1 |
31,212 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.BaseContextConfigGenerator | from copy import deepcopy
from dbt_common.exceptions import DbtInternalError
from abc import abstractmethod
from dbt.config import IsFQNResource, Project, RuntimeConfig
from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt_common.contracts.config.base import BaseConfig, merge_config_dicts
fr... |
class BaseContextConfigGenerator(Generic[T]):
def __init__(self, active_project: RuntimeConfig):
pass
def get_config_source(self, project: Project) -> ConfigSource:
pass
def get_node_project(self, project_name: str):
pass
def _project_configs(self, project: Project, fqn: Lis... | 13 | 0 | 9 | 1 | 7 | 1 | 2 | 0.12 | 1 | 10 | 5 | 2 | 9 | 1 | 9 | 11 | 91 | 15 | 69 | 46 | 37 | 8 | 43 | 21 | 33 | 5 | 1 | 3 | 19 |
31,213 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.ConfigSource | from dbt.node_types import NodeType
class ConfigSource:
def __init__(self, project):
self.project = project
def get_config_dict(self, resource_type: NodeType):
... |
class ConfigSource:
def __init__(self, project):
pass
def get_config_dict(self, resource_type: NodeType):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 1 | 2 | 2 | 1 | 2 | 2 | 5 | 1 | 4 | 4 | 2 | 0 | 5 | 4 | 2 | 1 | 0 | 0 | 2 |
31,214 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.ContextConfig | from dbt.flags import get_flags
from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt.config import IsFQNResource, Project, RuntimeConfig
from dbt.node_types import NodeType
from dbt_common.contracts.config.base import BaseConfig, merge_config_dicts
class ContextConfig:
def __init__(se... |
class ContextConfig:
def __init__(self, active_project: RuntimeConfig, fqn: List[str], resource_type: NodeType, project_name: str) -> None:
pass
def add_config_call(self, opts: Dict[str, Any]) -> None:
pass
def add_unrendered_config_call(self, opts: Dict[str, Any]) -> None:
pass
... | 5 | 0 | 13 | 1 | 11 | 2 | 2 | 0.17 | 0 | 8 | 4 | 0 | 4 | 6 | 4 | 4 | 57 | 5 | 46 | 26 | 29 | 8 | 24 | 14 | 19 | 4 | 0 | 3 | 7 |
31,215 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.ContextConfigGenerator | from dbt.node_types import NodeType
from dbt.config import IsFQNResource, Project, RuntimeConfig
from dbt.contracts.graph.model_config import get_config_for
from dbt.exceptions import SchemaConfigError
from dbt_common.dataclass_schema import ValidationError
from dbt.adapters.factory import get_config_class_by_name
from... |
class ContextConfigGenerator(BaseContextConfigGenerator[C]):
def __init__(self, active_project: RuntimeConfig):
pass
def get_config_source(self, project: Project) -> ConfigSource:
pass
def initial_result(self, resource_type: NodeType, base: bool) -> C:
pass
def _update_from_... | 7 | 0 | 9 | 0 | 7 | 1 | 2 | 0.18 | 1 | 10 | 6 | 0 | 6 | 1 | 6 | 17 | 59 | 7 | 44 | 25 | 29 | 8 | 29 | 16 | 22 | 3 | 2 | 1 | 9 |
31,216 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.ModelParts | from dataclasses import dataclass
from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt.config import IsFQNResource, Project, RuntimeConfig
from dbt.node_types import NodeType
@dataclass
class ModelParts(IsFQNResource):
fqn: List[str]
resource_type: NodeType
package_name: str | @dataclass
class ModelParts(IsFQNResource):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 5 | 0 | 0 |
31,217 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.RenderedConfig | from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt.config import IsFQNResource, Project, RuntimeConfig
from dbt.node_types import NodeType
class RenderedConfig(ConfigSource):
def __init__(self, project: Project):
self.project = project
def get_config_dict(self, resource... |
class RenderedConfig(ConfigSource):
def __init__(self, project: Project):
pass
def get_config_dict(self, resource_type: NodeType) -> Dict[str, Any]:
pass | 3 | 0 | 12 | 0 | 12 | 0 | 6 | 0 | 1 | 4 | 2 | 0 | 2 | 1 | 2 | 4 | 26 | 1 | 25 | 5 | 22 | 0 | 16 | 5 | 13 | 10 | 1 | 1 | 11 |
31,218 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.UnrenderedConfig | from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt.node_types import NodeType
from dbt.config import IsFQNResource, Project, RuntimeConfig
class UnrenderedConfig(ConfigSource):
def __init__(self, project: Project):
self.project = project
def get_config_dict(self, resour... |
class UnrenderedConfig(ConfigSource):
def __init__(self, project: Project):
pass
def get_config_dict(self, resource_type: NodeType) -> Dict[str, Any]:
pass | 3 | 0 | 14 | 0 | 14 | 0 | 6 | 0 | 1 | 4 | 2 | 0 | 2 | 1 | 2 | 4 | 30 | 1 | 29 | 6 | 26 | 0 | 19 | 6 | 16 | 11 | 1 | 1 | 12 |
31,219 | fishtown-analytics/dbt | core/dbt/context/context_config.py | dbt.context.context_config.UnrenderedConfigGenerator | from typing import Any, Dict, Generic, Iterator, List, Optional, TypeVar
from dbt.node_types import NodeType
from dbt.config import IsFQNResource, Project, RuntimeConfig
class UnrenderedConfigGenerator(BaseContextConfigGenerator[Dict[str, Any]]):
def get_config_source(self, project: Project) -> ConfigSource:
... |
class UnrenderedConfigGenerator(BaseContextConfigGenerator[Dict[str, Any]]):
def get_config_source(self, project: Project) -> ConfigSource:
pass
def calculate_node_config_dict(self, config_call_dict: Dict[str, Any], fqn: List[str], resource_type: NodeType, project_name: str, base: bool, patch_config_... | 5 | 0 | 8 | 0 | 8 | 1 | 1 | 0.06 | 1 | 8 | 4 | 0 | 4 | 0 | 4 | 15 | 35 | 3 | 31 | 19 | 13 | 2 | 11 | 6 | 6 | 1 | 2 | 0 | 4 |
31,220 | fishtown-analytics/dbt | core/dbt/context/docs.py | dbt.context.docs.DocsRuntimeContext | from typing import Any, Dict, Union
from dbt.exceptions import DocArgsError, DocTargetNotFoundError
from dbt.context.base import contextmember
from dbt.contracts.graph.nodes import Macro, ResultNode
from dbt.contracts.graph.manifest import Manifest
from dbt.config.runtime import RuntimeConfig
from dbt.context.configure... |
class DocsRuntimeContext(SchemaYamlContext):
def __init__(self, config: RuntimeConfig, node: Union[Macro, ResultNode], manifest: Manifest, current_project: str) -> None:
pass
@contextmember()
def doc(self, *args: str) -> str:
'''The `doc` function is used to reference docs blocks in schema... | 4 | 1 | 29 | 3 | 17 | 10 | 3 | 0.53 | 1 | 7 | 5 | 0 | 2 | 2 | 2 | 48 | 61 | 7 | 36 | 17 | 26 | 19 | 19 | 10 | 16 | 5 | 7 | 2 | 6 |
31,221 | fishtown-analytics/dbt | core/dbt/context/macro_resolver.py | dbt.context.macro_resolver.MacroResolver | from dbt.contracts.graph.nodes import Macro
from typing import Dict, MutableMapping, Optional
from dbt.exceptions import DuplicateMacroNameError, PackageNotFoundForMacroError
class MacroResolver:
def __init__(self, macros: MutableMapping[str, Macro], root_project_name: str, internal_package_names) -> None:
... |
class MacroResolver:
def __init__(self, macros: MutableMapping[str, Macro], root_project_name: str, internal_package_names) -> None:
pass
def _build_internal_packages_namespace(self) -> None:
pass
def _build_macros_by_name(self) -> None:
pass
def _add_macro_to(self, package_... | 9 | 0 | 12 | 1 | 9 | 2 | 3 | 0.36 | 0 | 3 | 1 | 0 | 8 | 8 | 8 | 8 | 113 | 15 | 72 | 35 | 54 | 26 | 60 | 26 | 51 | 5 | 0 | 2 | 24 |
31,222 | fishtown-analytics/dbt | core/dbt/context/macro_resolver.py | dbt.context.macro_resolver.TestMacroNamespace | from dbt.clients.jinja import MacroGenerator
from dbt.exceptions import DuplicateMacroNameError, PackageNotFoundForMacroError
from typing import Dict, MutableMapping, Optional
from dbt.include.global_project import PROJECT_NAME as GLOBAL_PROJECT_NAME
class TestMacroNamespace:
def __init__(self, macro_resolver, ct... |
class TestMacroNamespace:
def __init__(self, macro_resolver, ctx, node, thread_ctx, depends_on_macros):
pass
def recursively_get_depends_on_macros(self, depends_on_macros, dep_macros):
pass
def get_from_package(self, package_name: Optional[str], name: str) -> Optional[MacroGenerator]:
... | 4 | 0 | 17 | 0 | 16 | 1 | 5 | 0.08 | 0 | 3 | 2 | 0 | 3 | 6 | 3 | 3 | 53 | 2 | 48 | 19 | 44 | 4 | 40 | 19 | 36 | 5 | 0 | 4 | 15 |
31,223 | fishtown-analytics/dbt | core/dbt/context/macros.py | dbt.context.macros.MacroNamespace | from dbt.clients.jinja import MacroGenerator, MacroStack
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Set, Union
from dbt.include.global_project import PROJECT_NAME as GLOBAL_PROJECT_NAME
from dbt.exceptions import DuplicateMacroNameError, PackageNotFoundForMacroError
class MacroNamespace... |
class MacroNamespace(Mapping):
def __init__(self, global_namespace: FlatNamespace, local_namespace: FlatNamespace, global_project_namespace: FlatNamespace, packages: Dict[str, FlatNamespace]):
pass
def _search_order(self) -> Iterable[Union[FullNamespace, FlatNamespace]]:
pass
def _keys(s... | 8 | 0 | 6 | 0 | 6 | 2 | 2 | 0.34 | 1 | 5 | 2 | 0 | 7 | 4 | 7 | 7 | 56 | 6 | 44 | 22 | 30 | 15 | 33 | 16 | 25 | 4 | 1 | 2 | 14 |
31,224 | fishtown-analytics/dbt | core/dbt/context/macros.py | dbt.context.macros.MacroNamespaceBuilder | from dbt.clients.jinja import MacroGenerator, MacroStack
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Set, Union
from dbt.contracts.graph.nodes import Macro
from dbt.exceptions import DuplicateMacroNameError, PackageNotFoundForMacroError
class MacroNamespaceBuilder:
def __init__(self... |
class MacroNamespaceBuilder:
def __init__(self, root_package: str, search_package: str, thread_ctx: MacroStack, internal_packages: List[str], node: Optional[Any]=None) -> None:
pass
def _add_macro_to(self, hierarchy: Dict[str, FlatNamespace], macro: Macro, macro_func: MacroGenerator):
pass
... | 6 | 0 | 17 | 1 | 12 | 4 | 3 | 0.35 | 0 | 8 | 4 | 0 | 5 | 10 | 5 | 5 | 89 | 9 | 62 | 37 | 42 | 22 | 40 | 23 | 34 | 4 | 0 | 2 | 14 |
31,225 | fishtown-analytics/dbt | core/dbt/context/manifest.py | dbt.context.manifest.ManifestContext | from dbt.clients.jinja import MacroStack
from .base import contextproperty
from dbt.contracts.graph.manifest import Manifest
from .macros import MacroNamespace, MacroNamespaceBuilder
from dbt.context.macro_resolver import TestMacroNamespace
from typing import List
from dbt.adapters.contracts.connection import AdapterRe... |
class ManifestContext(ConfiguredContext):
'''The Macro context has everything in the target context, plus the macros
in the manifest.
The given macros can override any previous context values, which will be
available as if they were accessed relative to the package name.
'''
def __init__(self,... | 7 | 1 | 9 | 0 | 7 | 2 | 1 | 0.44 | 1 | 7 | 5 | 2 | 5 | 4 | 5 | 48 | 60 | 8 | 36 | 20 | 23 | 16 | 23 | 14 | 16 | 2 | 6 | 1 | 6 |
31,226 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.BaseDatabaseWrapper | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from dbt.context.macros import MacroNamespace, MacroNamespaceBuilder
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigErro... |
class BaseDatabaseWrapper:
'''
Wrapper for runtime database interaction. Applies the runtime quote policy
via a relation proxy.
'''
def __init__(self, adapter, namespace: MacroNamespace):
pass
def __getattr__(self, name):
pass
@property
def config(self):
pass
... | 10 | 1 | 11 | 1 | 8 | 1 | 2 | 0.17 | 0 | 7 | 4 | 2 | 8 | 3 | 8 | 8 | 98 | 18 | 69 | 29 | 54 | 12 | 51 | 23 | 42 | 8 | 0 | 3 | 19 |
31,227 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.BaseMetricResolver | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
import abc
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, M... |
class BaseMetricResolver(BaseResolver):
@abc.abstractmethod
def resolve(self, name: str, package: Optional[str]=None) -> MetricReference:
pass
def _repack_args(self, name: str, package: Optional[str]) -> List[str]:
pass
def validate_args(self, name: str, package: Optional[str]):
... | 6 | 0 | 7 | 1 | 7 | 0 | 2 | 0 | 1 | 3 | 2 | 2 | 4 | 1 | 4 | 30 | 33 | 5 | 28 | 8 | 23 | 0 | 21 | 6 | 16 | 3 | 4 | 1 | 9 |
31,228 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.BaseRefResolver | from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
import abc
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, M... |
class BaseRefResolver(BaseResolver):
@abc.abstractmethod
def resolve(self, name: str, package: Optional[str]=None, version: Optional[NodeVersion]=None) -> RelationProxy:
pass
def _repack_args(self, name: str, package: Optional[str], version: Optional[NodeVersion]) -> RefArgs:
pass
de... | 6 | 0 | 9 | 1 | 8 | 0 | 2 | 0 | 1 | 6 | 3 | 2 | 4 | 1 | 4 | 30 | 42 | 7 | 35 | 13 | 26 | 0 | 23 | 7 | 18 | 4 | 4 | 1 | 9 |
31,229 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.BaseResolver | from dbt.contracts.graph.nodes import AccessType, Exposure, Macro, ManifestNode, ModelNode, Resource, SeedNode, SemanticModel, SnapshotNode, SourceDefinition, UnitTestNode
from dbt.adapters.base.relation import EventTimeFilter
from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfi... |
class BaseResolver(metaclass=abc.ABCMeta):
def __init__(self, db_wrapper, model, config, manifest):
pass
@property
def current_project(self):
pass
@property
def Relation(self):
pass
@property
def resolve_limit(self) -> Optional[int]:
pass
def _resolve_e... | 12 | 1 | 12 | 1 | 10 | 1 | 2 | 0.11 | 1 | 7 | 4 | 8 | 6 | 4 | 6 | 26 | 83 | 11 | 65 | 19 | 54 | 7 | 26 | 15 | 19 | 7 | 3 | 3 | 13 |
31,230 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.BaseSourceResolver | import abc
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, NumberSourceArgsError, OperationsCannotRefEpheme... |
class BaseSourceResolver(BaseResolver):
@abc.abstractmethod
def resolve(self, source_name: str, table_name: str):
pass
def validate_args(self, source_name: str, table_name: str):
pass
def __call__(self, *args: str) -> RelationProxy:
pass | 5 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 3 | 2 | 3 | 3 | 0 | 3 | 29 | 22 | 2 | 20 | 5 | 15 | 0 | 13 | 4 | 9 | 3 | 4 | 1 | 6 |
31,231 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.Config | from typing_extensions import Protocol
from dbt.context.context_config import ContextConfig
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
class Config(Protocol):
def __init__(self, model, context_config: Optional[ContextConfig]):
... |
class Config(Protocol):
def __init__(self, model, context_config: Optional[ContextConfig]):
pass | 2 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 2 | 1 | 0 | 1 | 23 | 2 | 0 | 2 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
31,232 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ExposureMetricResolver | from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, NumberSourceArgsError, OperationsCannotRefEphemeralNodesErr... |
class ExposureMetricResolver(BaseResolver):
def __call__(self, *args) -> str:
pass | 2 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 3 | 1 | 0 | 1 | 1 | 1 | 27 | 6 | 0 | 6 | 3 | 4 | 0 | 6 | 2 | 4 | 2 | 4 | 1 | 2 |
31,233 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ExposureRefResolver | from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, NumberSourceArgsError, OperationsCannotRefEphemeralNodesErr... |
class ExposureRefResolver(BaseResolver):
def __call__(self, *args, **kwargs) -> str:
pass | 2 | 0 | 13 | 2 | 11 | 0 | 3 | 0 | 1 | 3 | 2 | 0 | 1 | 1 | 1 | 27 | 14 | 2 | 12 | 6 | 10 | 0 | 10 | 5 | 8 | 3 | 4 | 1 | 3 |
31,234 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ExposureSourceResolver | from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, NumberSourceArgsError, OperationsCannotRefEphemeralNodesErr... |
class ExposureSourceResolver(BaseResolver):
def __call__(self, *args) -> str:
pass | 2 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 3 | 1 | 0 | 1 | 0 | 1 | 27 | 6 | 0 | 6 | 2 | 4 | 0 | 6 | 2 | 4 | 2 | 4 | 1 | 2 |
31,235 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.GenerateNameProvider | from dbt.context.base import Var, contextmember, contextproperty
class GenerateNameProvider(Provider):
execute = False
Config = RuntimeConfigObject
DatabaseWrapper = ParseDatabaseWrapper
Var = RuntimeVar
ref = ParseRefResolver
source = ParseSourceResolver
metric = ParseMetricResolver |
class GenerateNameProvider(Provider):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 5 | 0 | 0 |
31,236 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.MacroContext | from dbt_common.clients.jinja import MacroProtocol
from dbt.contracts.graph.manifest import Disabled, Manifest
from dbt.config import IsFQNResource, Project, RuntimeConfig
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
class MacroContext(ProviderCo... |
class MacroContext(ProviderContext):
'''Internally, macros can be executed like nodes, with some restrictions:
- they don't have all values available that nodes do:
- 'this', 'pre_hooks', 'post_hooks', and 'sql' are missing
- 'schema' does not use any 'model' information
- they can't be confi... | 2 | 1 | 15 | 0 | 13 | 2 | 2 | 0.57 | 1 | 5 | 3 | 0 | 1 | 1 | 1 | 85 | 24 | 2 | 14 | 10 | 5 | 8 | 6 | 3 | 4 | 2 | 8 | 1 | 2 |
31,237 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ModelConfiguredVar | from dbt.config import IsFQNResource, Project, RuntimeConfig
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from dbt.context.configured import FQNLookup
from dbt.utils import MultiDict, args_to_dict
from dbt.context.base import Var, contextmember, c... |
class ModelConfiguredVar(Var):
def __init__(self, context: Dict[str, Any], config: RuntimeConfig, node: Resource) -> None:
pass
def packages_for_node(self) -> Iterable[Project]:
pass
def _generate_merged(self) -> Mapping[str, Any]:
pass | 4 | 0 | 10 | 1 | 9 | 0 | 2 | 0 | 1 | 8 | 5 | 2 | 3 | 1 | 3 | 10 | 34 | 5 | 29 | 15 | 20 | 0 | 23 | 10 | 19 | 3 | 1 | 2 | 7 |
31,238 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ModelContext | from dbt.node_types import ModelLanguage, NodeType
from dbt.contracts.graph.nodes import AccessType, Exposure, Macro, ManifestNode, ModelNode, Resource, SeedNode, SemanticModel, SnapshotNode, SourceDefinition, UnitTestNode
from dbt.context.base import Var, contextmember, contextproperty
from typing import TYPE_CHECKING... |
class ModelContext(ProviderContext):
@contextproperty()
def pre_hooks(self) -> List[Dict[str, Any]]:
pass
@contextproperty()
def post_hooks(self) -> List[Dict[str, Any]]:
pass
@contextproperty()
def compiled_code(self) -> Optional[str]:
pass
@contextproperty()
d... | 17 | 2 | 10 | 1 | 5 | 5 | 2 | 0.86 | 1 | 5 | 3 | 1 | 8 | 0 | 8 | 92 | 97 | 12 | 49 | 17 | 32 | 42 | 31 | 9 | 22 | 3 | 8 | 1 | 15 |
31,239 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.OperationProvider | class OperationProvider(RuntimeProvider):
ref = OperationRefResolver | class OperationProvider(RuntimeProvider):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
31,240 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.OperationRefResolver | from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultA... |
class OperationRefResolver(RuntimeRefResolver):
def validate(self, resolved: ManifestNode, target_name: str, target_package: Optional[str], target_version: Optional[NodeVersion]) -> None:
pass
def create_relation(self, target_model: ManifestNode) -> RelationProxy:
pass | 3 | 0 | 8 | 0 | 7 | 1 | 2 | 0.14 | 1 | 4 | 2 | 0 | 2 | 0 | 2 | 35 | 17 | 1 | 14 | 9 | 5 | 2 | 7 | 3 | 4 | 2 | 6 | 1 | 3 |
31,241 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseConfigObject | from dbt.context.context_config import ContextConfig
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, Number... |
class ParseConfigObject(Config):
def __init__(self, model, context_config: Optional[ContextConfig]):
pass
def _transform_config(self, config):
pass
def __call__(self, *args, **kwargs):
pass
def set(self, name, value):
pass
def require(self, name, validator=None)... | 9 | 0 | 6 | 1 | 5 | 1 | 2 | 0.11 | 1 | 4 | 3 | 0 | 8 | 2 | 8 | 31 | 53 | 11 | 38 | 15 | 29 | 4 | 36 | 15 | 27 | 6 | 5 | 3 | 16 |
31,242 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseDatabaseWrapper | class ParseDatabaseWrapper(BaseDatabaseWrapper):
"""The parser subclass of the database wrapper applies any explicit
parse-time overrides.
"""
def __getattr__(self, name):
override = name in self._adapter._available_ and name in self._adapter._parse_replacements_
if override:
... | class ParseDatabaseWrapper(BaseDatabaseWrapper):
'''The parser subclass of the database wrapper applies any explicit
parse-time overrides.
'''
def __getattr__(self, name):
pass | 2 | 1 | 11 | 1 | 10 | 0 | 3 | 0.27 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 9 | 16 | 2 | 11 | 3 | 9 | 3 | 7 | 3 | 5 | 3 | 1 | 1 | 3 |
31,243 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseMetricResolver | from dbt.contracts.graph.metrics import MetricReference, ResolvedMetricReference
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
class ParseMetricResolver(BaseMetricResolver):
def resolve(self, name: str, package: Optional[str]=None) -> MetricR... |
class ParseMetricResolver(BaseMetricResolver):
def resolve(self, name: str, package: Optional[str]=None) -> MetricReference:
pass | 2 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 31 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
31,244 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseProvider | from dbt.context.base import Var, contextmember, contextproperty
class ParseProvider(Provider):
execute = False
Config = ParseConfigObject
DatabaseWrapper = ParseDatabaseWrapper
Var = ParseVar
ref = ParseRefResolver
source = ParseSourceResolver
metric = ParseMetricResolver |
class ParseProvider(Provider):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 5 | 0 | 0 |
31,245 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseRefResolver | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
class ParseRefResolver(BaseRefResolver):
def resolve(self, name: str, package: Optional[str]=None, ve... |
class ParseRefResolver(BaseRefResolver):
def resolve(self, name: str, package: Optional[str]=None, version: Optional[NodeVersion]=None) -> RelationProxy:
pass | 2 | 0 | 7 | 1 | 5 | 1 | 1 | 0.17 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 31 | 8 | 1 | 6 | 4 | 2 | 1 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
31,246 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseSourceResolver | class ParseSourceResolver(BaseSourceResolver):
def resolve(self, source_name: str, table_name: str):
self.model.sources.append([source_name, table_name])
return self.Relation.create_from(self.config, self.model) | class ParseSourceResolver(BaseSourceResolver):
def resolve(self, source_name: str, table_name: str):
pass | 2 | 0 | 4 | 0 | 3 | 1 | 1 | 0.25 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 30 | 5 | 0 | 4 | 2 | 2 | 1 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
31,247 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ParseVar | class ParseVar(ModelConfiguredVar):
def get_missing_var(self, var_name):
return None | class ParseVar(ModelConfiguredVar):
def get_missing_var(self, var_name):
pass | 2 | 0 | 3 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 11 | 4 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 2 | 0 | 1 |
31,248 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.Provider | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from typing_extensions import Protocol
from dbt.context.base import Var, contextmember, contextproperty
class Provider(Protocol):
execute: bool
Config: Type[Config]
DatabaseWrapper: Type[Ba... |
class Provider(Protocol):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 | 0 | 0 | 0 | 22 | 8 | 0 | 8 | 1 | 7 | 0 | 8 | 1 | 7 | 0 | 4 | 0 | 0 |
31,249 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.ProviderContext | from dbt.context.manifest import ManifestContext
from dbt.adapters.contracts.connection import AdapterResponse
from dbt.context.macros import MacroNamespace, MacroNamespaceBuilder
from dbt.adapters.base.column import Column
from dbt import selected_resources
from dbt.context.exceptions_jinja import wrapped_exports
from... |
class ProviderContext(ManifestContext):
def __init__(self, model, config: RuntimeConfig, manifest: Manifest, provider: Provider, context_config: Optional[ContextConfig]) -> None:
pass
def _get_namespace_builder(self):
pass
@contextproperty()
def dbt_metadata_envs(self) -> Dict[str, st... | 73 | 9 | 16 | 2 | 7 | 7 | 2 | 0.96 | 1 | 21 | 14 | 4 | 36 | 8 | 36 | 84 | 651 | 117 | 274 | 121 | 181 | 262 | 156 | 66 | 115 | 10 | 7 | 4 | 67 |
31,250 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RelationProxy | from dbt_common.utils import AttrDict, cast_to_str, merge
class RelationProxy:
def __init__(self, adapter):
self._quoting_config = adapter.config.quoting
self._relation_type = adapter.Relation
def __getattr__(self, key):
return getattr(self._relation_type, key)
def create(self, *... |
class RelationProxy:
def __init__(self, adapter):
pass
def __getattr__(self, key):
pass
def create(self, *args, **kwargs):
pass | 4 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 2 | 3 | 3 | 11 | 2 | 9 | 6 | 5 | 0 | 9 | 6 | 5 | 1 | 0 | 0 | 3 |
31,251 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeConfigObject | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from dbt.adapters.exceptions import MissingConfigError
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTa... |
class RuntimeConfigObject(Config):
def __init__(self, model, context_config: Optional[ContextConfig]=None):
pass
def __call__(self, *args, **kwargs):
pass
def set(self, name, value):
pass
def _validate(self, validator, value):
pass
def _lookup(self, name, defaul... | 10 | 0 | 5 | 1 | 4 | 0 | 2 | 0.05 | 1 | 4 | 2 | 0 | 9 | 1 | 9 | 32 | 53 | 14 | 37 | 16 | 27 | 2 | 36 | 16 | 26 | 3 | 5 | 1 | 15 |
31,252 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeDatabaseWrapper | class RuntimeDatabaseWrapper(BaseDatabaseWrapper):
"""The runtime database wrapper exposes everything the adapter marks
available.
"""
def __getattr__(self, name):
if name in self._adapter._available_:
return getattr(self._adapter, name)
else:
raise AttributeErro... | class RuntimeDatabaseWrapper(BaseDatabaseWrapper):
'''The runtime database wrapper exposes everything the adapter marks
available.
'''
def __getattr__(self, name):
pass | 2 | 1 | 7 | 0 | 7 | 0 | 2 | 0.38 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 9 | 12 | 1 | 8 | 2 | 6 | 3 | 5 | 2 | 3 | 2 | 1 | 1 | 2 |
31,253 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeMetricResolver | from dbt.contracts.graph.metrics import MetricReference, ResolvedMetricReference
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedEr... |
class RuntimeMetricResolver(BaseMetricResolver):
def resolve(self, target_name: str, target_package: Optional[str]=None) -> MetricReference:
pass | 2 | 0 | 17 | 2 | 15 | 0 | 2 | 0 | 1 | 5 | 4 | 0 | 1 | 1 | 1 | 31 | 18 | 2 | 16 | 4 | 14 | 0 | 6 | 3 | 4 | 2 | 5 | 1 | 2 |
31,254 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeProvider | from dbt.context.base import Var, contextmember, contextproperty
class RuntimeProvider(Provider):
execute = True
Config = RuntimeConfigObject
DatabaseWrapper = RuntimeDatabaseWrapper
Var = RuntimeVar
ref = RuntimeRefResolver
source = RuntimeSourceResolver
metric = RuntimeMetricResolver |
class RuntimeProvider(Provider):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 22 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 5 | 0 | 0 |
31,255 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeRefResolver | from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
from dbt.contracts.graph.manifest import Disabled, Manifest
from dbt import selected_resources
from dbt.adapters.factory import get_adapter, get_adapter_package_names, get_adapter_type_names
from dbt.contracts.graph.nodes imp... |
class RuntimeRefResolver(BaseRefResolver):
def resolve(self, target_name: str, target_package: Optional[str]=None, target_version: Optional[NodeVersion]=None) -> RelationProxy:
pass
def create_relation(self, target_model: ManifestNode) -> RelationProxy:
pass
def validate(self, resolved: ... | 4 | 0 | 32 | 1 | 29 | 2 | 3 | 0.06 | 1 | 6 | 5 | 2 | 3 | 3 | 3 | 33 | 98 | 4 | 89 | 20 | 74 | 5 | 19 | 6 | 15 | 4 | 5 | 1 | 9 |
31,256 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeSourceResolver | from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultAlreadyLoadedError, MetricArgsError, NumberSourceArgsError, OperationsCannotRefEphemeralNodesErr... |
class RuntimeSourceResolver(BaseSourceResolver):
def resolve(self, source_name: str, table_name: str):
pass
class SourceQuotingBaseConfig:
pass | 3 | 0 | 28 | 3 | 22 | 3 | 2 | 0.13 | 1 | 4 | 3 | 0 | 1 | 2 | 1 | 30 | 29 | 3 | 23 | 7 | 20 | 3 | 8 | 5 | 5 | 2 | 5 | 1 | 2 |
31,257 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeUnitTestProvider | from dbt.context.base import Var, contextmember, contextproperty
class RuntimeUnitTestProvider(Provider):
execute = True
Config = RuntimeConfigObject
DatabaseWrapper = RuntimeDatabaseWrapper
Var = UnitTestVar
ref = RuntimeUnitTestRefResolver
source = RuntimeUnitTestSourceResolver
metric = R... |
class RuntimeUnitTestProvider(Provider):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 5 | 0 | 0 |
31,258 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeUnitTestRefResolver | from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
class RuntimeUnitTestRefResolver(RuntimeRefResolver):
@property
def resolve_limit(self) -> Option... |
class RuntimeUnitTestRefResolver(RuntimeRefResolver):
@property
def resolve_limit(self) -> Optional[int]:
pass
def resolve_limit(self) -> Optional[int]:
pass | 4 | 0 | 5 | 0 | 5 | 1 | 1 | 0.09 | 1 | 4 | 1 | 0 | 2 | 0 | 2 | 35 | 13 | 1 | 11 | 9 | 2 | 1 | 5 | 3 | 2 | 1 | 6 | 0 | 2 |
31,259 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeUnitTestSourceResolver | from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
from dbt.contracts.graph.manifest import Disabled, Manifest
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAg... |
class RuntimeUnitTestSourceResolver(BaseSourceResolver):
@property
def resolve_limit(self) -> Optional[int]:
pass
def resolve_limit(self) -> Optional[int]:
pass | 4 | 0 | 12 | 0 | 9 | 3 | 2 | 0.25 | 1 | 4 | 2 | 0 | 2 | 1 | 2 | 31 | 26 | 1 | 20 | 6 | 16 | 5 | 9 | 4 | 6 | 2 | 5 | 1 | 3 |
31,260 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.RuntimeVar | class RuntimeVar(ModelConfiguredVar):
pass | class RuntimeVar(ModelConfiguredVar):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
31,261 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.SemanticModelRefResolver | from dbt.artifacts.resources import NodeConfig, NodeVersion, RefArgs, SeedConfig, SourceConfig
from dbt.exceptions import CompilationError, ConflictingConfigKeysError, DbtReferenceError, EnvVarMissingError, InlineModelConfigError, LoadAgateTableNotSeedError, LoadAgateTableValueError, MacroDispatchArgError, MacroResultA... |
class SemanticModelRefResolver(BaseResolver):
def __call__(self, *args, **kwargs) -> str:
pass
def validate_args(self, name, package, version):
pass | 3 | 0 | 11 | 1 | 9 | 1 | 3 | 0.05 | 1 | 4 | 3 | 0 | 2 | 1 | 2 | 28 | 23 | 3 | 19 | 7 | 16 | 1 | 14 | 6 | 11 | 3 | 4 | 1 | 5 |
31,262 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.SourceContext | from dbt.contracts.graph.nodes import AccessType, Exposure, Macro, ManifestNode, ModelNode, Resource, SeedNode, SemanticModel, SnapshotNode, SourceDefinition, UnitTestNode
from dbt.context.base import Var, contextmember, contextproperty
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Opt... |
class SourceContext(ProviderContext):
@contextproperty()
def this(self) -> Optional[RelationProxy]:
pass
@contextproperty()
def source_node(self) -> SourceDefinition:
pass | 5 | 0 | 2 | 0 | 2 | 0 | 1 | 0.25 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 86 | 12 | 2 | 8 | 5 | 3 | 2 | 6 | 3 | 3 | 1 | 8 | 0 | 2 |
31,263 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.TestContext | from dbt.context.base import Var, contextmember, contextproperty
from dbt.context.macro_resolver import MacroResolver, TestMacroNamespace
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.clients.jinja import MacroGenerator, MacroStack, UnitTestMacroGenerator, get_rendered
from dbt_common.context import get_in... |
class TestContext(ProviderContext):
def __init__(self, model, config: RuntimeConfig, manifest: Manifest, provider: Provider, context_config: Optional[ContextConfig], macro_resolver: MacroResolver) -> None:
pass
def _build_namespace(self):
pass
def _build_test_namespace(self):
pas... | 6 | 0 | 18 | 1 | 13 | 5 | 4 | 0.4 | 1 | 12 | 10 | 0 | 4 | 4 | 4 | 88 | 80 | 6 | 55 | 28 | 41 | 22 | 40 | 19 | 35 | 8 | 8 | 3 | 15 |
31,264 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.UnitTestContext | from dbt.context.base import Var, contextmember, contextproperty
from dbt.contracts.graph.nodes import AccessType, Exposure, Macro, ManifestNode, ModelNode, Resource, SeedNode, SemanticModel, SnapshotNode, SourceDefinition, UnitTestNode
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Opt... |
class UnitTestContext(ModelContext):
@contextmember()
def env_var(self, var: str, default: Optional[str]=None) -> str:
'''The env_var() function. Return the overriden unit test environment variable named 'var'.
If there is no unit test override, return the environment variable named 'var'.
... | 5 | 1 | 10 | 2 | 6 | 4 | 2 | 0.47 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 94 | 25 | 5 | 15 | 6 | 10 | 7 | 12 | 4 | 9 | 2 | 9 | 1 | 4 |
31,265 | fishtown-analytics/dbt | core/dbt/context/providers.py | dbt.context.providers.UnitTestVar | from dbt.contracts.graph.nodes import AccessType, Exposure, Macro, ManifestNode, ModelNode, Resource, SeedNode, SemanticModel, SnapshotNode, SourceDefinition, UnitTestNode
from copy import deepcopy
from dbt.config import IsFQNResource, Project, RuntimeConfig
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterab... |
class UnitTestVar(RuntimeVar):
def __init__(self, context: Dict[str, Any], config: RuntimeConfig, node: Resource) -> None:
pass | 2 | 0 | 13 | 1 | 12 | 0 | 2 | 0 | 1 | 4 | 1 | 0 | 1 | 0 | 1 | 11 | 14 | 1 | 13 | 8 | 6 | 0 | 8 | 3 | 6 | 2 | 3 | 1 | 2 |
31,266 | fishtown-analytics/dbt | core/dbt/context/query_header.py | dbt.context.query_header.QueryHeaderContext | from dbt.adapters.contracts.connection import AdapterRequiredConfig
from dbt.context.manifest import ManifestContext
from dbt.contracts.graph.manifest import Manifest
class QueryHeaderContext(ManifestContext):
def __init__(self, config: AdapterRequiredConfig, manifest: Manifest) -> None:
super().__init__(... |
class QueryHeaderContext(ManifestContext):
def __init__(self, config: AdapterRequiredConfig, manifest: Manifest) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 49 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
31,267 | fishtown-analytics/dbt | core/dbt/context/secret.py | dbt.context.secret.SecretContext | from .base import BaseContext, contextmember
from dbt_common.context import get_invocation_context
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER, SECRET_PLACEHOLDER
from typing import Any, Dict, Optional
from dbt.exceptions import EnvVarMissingError
class SecretCo... |
class SecretContext(BaseContext):
'''This context is used in profiles.yml + packages.yml. It can render secret
env vars that aren't usable elsewhere'''
@contextmember()
def env_var(self, var: str, default: Optional[str]=None) -> str:
'''The env_var() function. Return the environment variable na... | 3 | 2 | 37 | 5 | 15 | 17 | 7 | 1.12 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 40 | 42 | 6 | 17 | 5 | 14 | 19 | 14 | 4 | 12 | 7 | 4 | 2 | 7 |
31,268 | fishtown-analytics/dbt | core/dbt/context/target.py | dbt.context.target.TargetContext | from typing import Any, Dict
from dbt.context.base import BaseContext, contextproperty
class TargetContext(BaseContext):
def __init__(self, target_dict: Dict[str, Any], cli_vars: Dict[str, Any]):
super().__init__(cli_vars=cli_vars)
self.target_dict = target_dict
@contextproperty()
def tar... |
class TargetContext(BaseContext):
def __init__(self, target_dict: Dict[str, Any], cli_vars: Dict[str, Any]):
pass
@contextproperty()
def target(self) -> Dict[str, Any]:
'''`target` contains information about your connection to the warehouse
(specified in profiles.yml). Some configs... | 4 | 1 | 33 | 5 | 3 | 26 | 1 | 7.43 | 1 | 3 | 0 | 1 | 2 | 1 | 2 | 41 | 69 | 10 | 7 | 5 | 3 | 52 | 6 | 4 | 3 | 1 | 4 | 0 | 2 |
31,269 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.BaseSourceFile | from mashumaro.types import SerializableType
from typing import Any, Dict, List, Optional, Union
from dataclasses import dataclass, field
from dbt.artifacts.resources.base import FileHash
from dbt_common.dataclass_schema import StrEnum, dbtClassMixin
@dataclass
class BaseSourceFile(dbtClassMixin, SerializableType):
... | @dataclass
class BaseSourceFile(dbtClassMixin, SerializableType):
'''Define a source file in dbt'''
@property
def file_id(self):
pass
@property
def original_file_path(self):
pass
def _serialize(self):
pass
@classmethod
def _deserialize(cls, dct: Dict[str, int]):
... | 10 | 1 | 6 | 0 | 5 | 1 | 2 | 0.23 | 2 | 8 | 4 | 3 | 4 | 0 | 5 | 5 | 48 | 6 | 35 | 16 | 26 | 8 | 30 | 13 | 24 | 4 | 1 | 2 | 11 |
31,270 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.FilePath | import os
from dataclasses import dataclass, field
from dbt_common.dataclass_schema import StrEnum, dbtClassMixin
from dbt.constants import MAXIMUM_SEED_SIZE
@dataclass
class FilePath(dbtClassMixin):
searched_path: str
relative_path: str
modification_time: float
project_root: str
@property
def... | @dataclass
class FilePath(dbtClassMixin):
@property
def search_key(self) -> str:
pass
@property
def full_path(self) -> str:
pass
@property
def absolute_path(self) -> str:
pass
@property
def original_file_path(self) -> str:
pass
def seed_too_large(sel... | 11 | 1 | 3 | 0 | 2 | 1 | 1 | 0.16 | 1 | 2 | 0 | 0 | 5 | 0 | 5 | 5 | 27 | 5 | 19 | 10 | 9 | 3 | 15 | 6 | 9 | 1 | 1 | 0 | 5 |
31,271 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.FixtureSourceFile | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
@dataclass
class FixtureSourceFile(BaseSourceFile):
fixture: Optional[str] = None
unit_tests: List[str] = field(default_factory=list)
def add_unit_test(self, value):
if value not in self.unit_tests:
... | @dataclass
class FixtureSourceFile(BaseSourceFile):
def add_unit_test(self, value):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 6 | 7 | 1 | 6 | 4 | 4 | 0 | 6 | 4 | 4 | 2 | 2 | 1 | 2 |
31,272 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.ParseFileType | from dbt_common.dataclass_schema import StrEnum, dbtClassMixin
class ParseFileType(StrEnum):
Macro = 'macro'
Model = 'model'
Snapshot = 'snapshot'
Analysis = 'analysis'
SingularTest = 'singular_test'
GenericTest = 'generic_test'
Seed = 'seed'
Documentation = 'docs'
Schema = 'schema'... |
class ParseFileType(StrEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0 | 12 | 12 | 11 | 1 | 12 | 12 | 11 | 0 | 1 | 0 | 0 |
31,273 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.RemoteFile | from dataclasses import dataclass, field
from dbt_common.dataclass_schema import StrEnum, dbtClassMixin
@dataclass
class RemoteFile(dbtClassMixin):
def __init__(self, language) -> None:
if language == 'sql':
self.path_end = '.sql'
elif language == 'python':
self.path_end = ... | @dataclass
class RemoteFile(dbtClassMixin):
def __init__(self, language) -> None:
pass
@property
def searched_path(self) -> str:
pass
@property
def relative_path(self) -> str:
pass
@property
def absolute_path(self) -> str:
pass
@property
def original_... | 13 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 6 | 2 | 6 | 6 | 29 | 5 | 24 | 14 | 12 | 0 | 17 | 9 | 10 | 3 | 1 | 1 | 8 |
31,274 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.SchemaSourceFile | from typing import Any, Dict, List, Optional, Union
from .util import SourceKey
from dataclasses import dataclass, field
@dataclass
class SchemaSourceFile(BaseSourceFile):
dfy: Dict[str, Any] = field(default_factory=dict)
data_tests: Dict[str, Any] = field(default_factory=dict)
sources: List[str] = field(d... | @dataclass
class SchemaSourceFile(BaseSourceFile):
@property
def dict_from_yaml(self):
pass
@property
def node_patches(self):
pass
@property
def macro_patches(self):
pass
@property
def source_patches(self):
pass
def __post_serialize__(self, dct: Dict... | 28 | 0 | 7 | 0 | 6 | 1 | 3 | 0.22 | 1 | 3 | 0 | 0 | 22 | 0 | 22 | 27 | 210 | 31 | 147 | 70 | 120 | 33 | 143 | 66 | 120 | 7 | 2 | 6 | 64 |
31,275 | fishtown-analytics/dbt | core/dbt/contracts/files.py | dbt.contracts.files.SourceFile | from typing import Any, Dict, List, Optional, Union
from dataclasses import dataclass, field
from dbt.artifacts.resources.base import FileHash
@dataclass
class SourceFile(BaseSourceFile):
nodes: List[str] = field(default_factory=list)
docs: List[str] = field(default_factory=list)
macros: List[str] = field(... | @dataclass
class SourceFile(BaseSourceFile):
@classmethod
def big_seed(cls, path: FilePath) -> 'SourceFile':
'''Parse seeds over the size limit with just the path'''
pass
def add_node(self, value):
pass
@classmethod
def remote(cls, contents: str, project_name: str, language... | 7 | 1 | 5 | 0 | 5 | 0 | 1 | 0.14 | 1 | 4 | 3 | 0 | 1 | 0 | 3 | 8 | 28 | 3 | 22 | 12 | 16 | 3 | 15 | 10 | 11 | 2 | 2 | 1 | 4 |
31,276 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.AnalysisLookup | from dbt.node_types import REFABLE_NODE_TYPES, VERSIONED_NODE_TYPES, AccessType, NodeType
from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
class AnalysisLookup(RefableLookup):
_lookup_types: ClassVar[set] = set([NodeType.Ana... |
class AnalysisLookup(RefableLookup):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 2 | 0 | 0 |
31,277 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.CandidateList | from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNo... |
class CandidateList(List[M]):
def last_candidate(self, valid_localities: Optional[List[Locality]]=None) -> Optional[MacroCandidate]:
'''
Obtain the last (highest precedence) MacroCandidate from the CandidateList of any locality in valid_localities.
If valid_localities is not specified, ret... | 3 | 1 | 11 | 2 | 8 | 2 | 4 | 0.25 | 1 | 3 | 2 | 0 | 2 | 0 | 2 | 2 | 24 | 4 | 16 | 7 | 11 | 4 | 14 | 5 | 11 | 5 | 1 | 2 | 7 |
31,278 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.Disabled | from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
from dataclasses import dataclass, field, replace
@dataclass
class Disabled(Generic[D]):
target: D | @dataclass
class Disabled(Generic[D]):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
31,279 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.DisabledLookup | from dbt.node_types import REFABLE_NODE_TYPES, VERSIONED_NODE_TYPES, AccessType, NodeType
from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
from dbt.artifacts.resources import BaseResource, DeferRelation, NodeConfig, NodeVersion, ... |
class DisabledLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def populate(self, manifest: 'Manifest'):
pass
def add_node(self, node: GraphMemberNode) -> None:
pass
def find(self, search_name, package: Optional[PackageName], version: Optional[No... | 5 | 0 | 12 | 1 | 11 | 0 | 4 | 0.04 | 1 | 5 | 1 | 0 | 4 | 1 | 4 | 4 | 55 | 7 | 46 | 17 | 35 | 2 | 35 | 11 | 30 | 10 | 1 | 3 | 16 |
31,280 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.DocLookup | from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefinition, UnitTestDefinition, UnitTestFileFixture, Unpatche... |
class DocLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, key, package: Optional[PackageName]):
pass
def find(self, key, package: Optional[PackageName], manifest: 'Manifest'):
pass
def add_doc(self, doc: Documentation):
... | 7 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 6 | 1 | 6 | 6 | 29 | 5 | 24 | 10 | 17 | 0 | 22 | 10 | 15 | 2 | 1 | 1 | 10 |
31,281 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.Locality | import enum
class Locality(enum.IntEnum):
Core = 1
Imported = 2
Root = 3 |
class Locality(enum.IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 3 | 0 | 0 |
31,282 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.MacroCandidate | from dataclasses import dataclass, field, replace
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefinition,... | @dataclass
class MacroCandidate:
def __eq__(self, other: object) -> bool:
pass
def __lt__(self, other: object) -> bool:
pass | 4 | 0 | 6 | 0 | 6 | 0 | 3 | 0 | 0 | 2 | 0 | 1 | 2 | 0 | 2 | 2 | 17 | 2 | 15 | 3 | 12 | 0 | 15 | 3 | 12 | 4 | 0 | 1 | 6 |
31,283 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.MacroManifest | from dbt.artifacts.schemas.manifest import ManifestMetadata, UniqueID, WritableManifest
from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
from dbt import deprecations, tracking
from dbt.flags import get_flags
from dbt.contracts.gr... |
class MacroManifest(MacroMethods):
def __init__(self, macros) -> None:
pass | 2 | 0 | 13 | 0 | 11 | 2 | 3 | 0.17 | 1 | 3 | 1 | 0 | 1 | 5 | 1 | 10 | 14 | 0 | 12 | 7 | 10 | 2 | 7 | 7 | 5 | 3 | 1 | 0 | 3 |
31,284 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.MacroMethods | from dbt.adapters.factory import get_adapter_package_names
from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, G... |
class MacroMethods:
def __init__(self):
pass
def find_macro_candidate_by_name(self, name: str, root_project_name: str, package: Optional[str]) -> Optional[MacroCandidate]:
'''Find a MacroCandidate in the graph by its name and package name, or None for
any package. The root project nam... | 14 | 3 | 12 | 1 | 9 | 3 | 2 | 0.33 | 0 | 6 | 3 | 2 | 7 | 4 | 9 | 9 | 138 | 22 | 87 | 42 | 62 | 29 | 57 | 29 | 45 | 4 | 0 | 2 | 23 |
31,285 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.Manifest | from dbt.exceptions import AmbiguousResourceNameRefError, CompilationError, DuplicateResourceNameError
from dataclasses import dataclass, field, replace
from dbt.events.types import ArtifactWritten, UnpinnedRefNewVersionAvailable
from dbt.contracts.util import SourceKey
from dbt.artifacts.resources import BaseResource,... | @dataclass
class Manifest(MacroMethods, dbtClassMixin):
'''The manifest for the full graph, after parsing and during compilation.'''
def __pre_serialize__(self, context: Optional[Dict]=None):
pass
@classmethod
def __post_deserialize__(cls, obj):
pass
def build_flat_graph(self):
... | 81 | 8 | 11 | 1 | 10 | 1 | 2 | 0.11 | 2 | 34 | 24 | 0 | 61 | 3 | 65 | 74 | 908 | 112 | 723 | 236 | 584 | 78 | 387 | 164 | 320 | 9 | 1 | 3 | 148 |
31,286 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.MaterializationCandidate | from dataclasses import dataclass, field, replace
from dbt.adapters.exceptions import DuplicateMacroInPackageError, DuplicateMaterializationNameError
@dataclass
class MaterializationCandidate(MacroCandidate):
specificity: int
@classmethod
def from_macro(cls, candidate: MacroCandidate, specificity: int) ->... | @dataclass
class MaterializationCandidate(MacroCandidate):
@classmethod
def from_macro(cls, candidate: MacroCandidate, specificity: int) -> 'MaterializationCandidate':
pass
def __eq__(self, other: object) -> bool:
pass
def __lt__(self, other: object) -> bool:
pass | 6 | 0 | 9 | 0 | 8 | 0 | 3 | 0.14 | 1 | 3 | 0 | 0 | 2 | 0 | 3 | 5 | 36 | 4 | 28 | 6 | 23 | 4 | 23 | 5 | 19 | 6 | 1 | 1 | 10 |
31,287 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.MetricLookup | import dbt_common.exceptions
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefinition, UnitTestDefinition, ... |
class MetricLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, search_name, package: Optional[PackageName]):
pass
def find(self, search_name, package: Optional[PackageName], manifest: 'Manifest'):
pass
def add_metric(self, m... | 7 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 6 | 1 | 6 | 6 | 31 | 6 | 25 | 10 | 18 | 0 | 23 | 10 | 16 | 3 | 1 | 2 | 11 |
31,288 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.ParsingInfo | from dataclasses import dataclass, field, replace
@dataclass
class ParsingInfo:
static_analysis_parsed_path_count: int = 0
static_analysis_path_count: int = 0 | @dataclass
class ParsingInfo:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 0 | 0 | 0 |
31,289 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.RefableLookup | import dbt_common.utils
from dbt.artifacts.resources import BaseResource, DeferRelation, NodeConfig, NodeVersion, RefArgs
from dbt_common.events.contextvars import get_node_info
import dbt_common.exceptions
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTes... |
class RefableLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, key: str, package: Optional[PackageName], version: Optional[NodeVersion], node: Optional[GraphMemberNode]=None):
pass
def find(self, key: str, package: Optional[PackageName]... | 8 | 0 | 15 | 1 | 13 | 1 | 3 | 0.08 | 1 | 5 | 3 | 1 | 7 | 1 | 7 | 7 | 113 | 12 | 95 | 31 | 74 | 8 | 53 | 18 | 45 | 6 | 1 | 3 | 24 |
31,290 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.SavedQueryLookup | import dbt_common.utils
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefinition, UnitTestDefinition, UnitT... |
class SavedQueryLookup(dbtClassMixin):
'''Lookup utility for finding SavedQuery nodes'''
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, search_name, package: Optional[PackageName]):
pass
def find(self, search_name, package: Optional[PackageName], manif... | 7 | 1 | 4 | 0 | 4 | 0 | 2 | 0.04 | 1 | 1 | 0 | 0 | 6 | 1 | 6 | 6 | 33 | 7 | 25 | 10 | 18 | 1 | 23 | 10 | 16 | 3 | 1 | 2 | 11 |
31,291 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.Searchable | from dbt.node_types import REFABLE_NODE_TYPES, VERSIONED_NODE_TYPES, AccessType, NodeType
from typing_extensions import Protocol
class Searchable(Protocol):
resource_type: NodeType
package_name: str
@property
def search_name(self) -> str:
raise NotImplementedError('search_name not implemented'... |
class Searchable(Protocol):
@property
def search_name(self) -> str:
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 23 | 7 | 1 | 6 | 3 | 3 | 0 | 5 | 2 | 3 | 1 | 4 | 0 | 1 |
31,292 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.SemanticModelByMeasureLookup | import dbt_common.utils
import dbt_common.exceptions
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefiniti... |
class SemanticModelByMeasureLookup(dbtClassMixin):
'''Lookup utility for finding SemanticModel by measure
This is possible because measure names are supposed to be unique across
the semantic models in a manifest.
'''
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_uniqu... | 7 | 5 | 7 | 0 | 6 | 1 | 2 | 0.22 | 1 | 2 | 0 | 0 | 6 | 1 | 6 | 6 | 52 | 8 | 36 | 17 | 27 | 8 | 28 | 15 | 21 | 5 | 1 | 3 | 14 |
31,293 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.SingularTestLookup | import dbt_common.utils
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, ManifestNode, Metric, ModelNode, SavedQuery, SeedNode, SemanticModel, SingularTestNode, SnapshotNode, SourceDefinition, UnitTestDefinition, UnitT... |
class SingularTestLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, search_name, package: Optional[PackageName]) -> Optional[UniqueID]:
pass
def find(self, search_name, package: Optional[PackageName], manifest: 'Manifest') -> Optional[S... | 7 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 6 | 1 | 6 | 6 | 35 | 6 | 29 | 13 | 20 | 0 | 25 | 11 | 18 | 3 | 1 | 2 | 11 |
31,294 | fishtown-analytics/dbt | core/dbt/contracts/graph/manifest.py | dbt.contracts.graph.manifest.SourceLookup | from typing import Any, Callable, ClassVar, DefaultDict, Dict, Generic, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
import dbt_common.utils
from dbt.contracts.graph.nodes import RESOURCE_CLASS_TO_NODE_CLASS, BaseNode, Documentation, Exposure, GenericTestNode, GraphMemberNode, Group, Macro, Manif... |
class SourceLookup(dbtClassMixin):
def __init__(self, manifest: 'Manifest') -> None:
pass
def get_unique_id(self, search_name, package: Optional[PackageName]):
pass
def find(self, search_name, package: Optional[PackageName], manifest: 'Manifest'):
pass
def add_source(self, s... | 7 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 6 | 1 | 6 | 6 | 31 | 6 | 25 | 10 | 18 | 0 | 23 | 10 | 16 | 3 | 1 | 2 | 11 |
31,295 | fishtown-analytics/dbt | core/dbt/contracts/graph/metrics.py | dbt.contracts.graph.metrics.MetricReference | class MetricReference(object):
def __init__(self, metric_name, package_name=None) -> None:
self.metric_name = metric_name
self.package_name = package_name
def __str__(self):
return f'{self.metric_name}' | class MetricReference(object):
def __init__(self, metric_name, package_name=None) -> None:
pass
def __str__(self):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 2 | 2 | 2 | 2 | 7 | 1 | 6 | 5 | 3 | 0 | 6 | 5 | 3 | 1 | 1 | 0 | 2 |
31,296 | fishtown-analytics/dbt | core/dbt/contracts/graph/metrics.py | dbt.contracts.graph.metrics.ResolvedMetricReference | from dbt.contracts.graph.manifest import Manifest, Metric
from typing import Any, Dict, Iterator, List
class ResolvedMetricReference(MetricReference):
"""
Simple proxy over a Metric which delegates property
lookups to the underlying node. Also adds helper functions
for working with metrics (ie. __str__... |
class ResolvedMetricReference(MetricReference):
'''
Simple proxy over a Metric which delegates property
lookups to the underlying node. Also adds helper functions
for working with metrics (ie. __str__ and templating functions)
'''
def __init__(self, node: Metric, manifest: Manifest) -> None:
... | 14 | 8 | 6 | 1 | 5 | 1 | 2 | 0.29 | 1 | 7 | 1 | 0 | 7 | 2 | 10 | 12 | 79 | 16 | 49 | 30 | 33 | 14 | 40 | 25 | 29 | 4 | 2 | 3 | 16 |
31,297 | fishtown-analytics/dbt | core/dbt/contracts/graph/model_config.py | dbt.contracts.graph.model_config.UnitTestNodeConfig | from dbt.artifacts.resources import ExposureConfig, GroupConfig, MetricConfig, ModelConfig, NodeConfig, SavedQueryConfig, SeedConfig, SemanticModelConfig, SnapshotConfig, SourceConfig, TestConfig, UnitTestConfig
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Type
@dataclass
clas... | @dataclass
class UnitTestNodeConfig(NodeConfig):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 3 | 0 | 0 |
31,298 | fishtown-analytics/dbt | core/dbt/contracts/graph/node_args.py | dbt.contracts.graph.node_args.ModelNodeArgs | from dbt.node_types import AccessType, NodeType
from typing import List, Optional
from datetime import datetime, timezone
from dataclasses import dataclass, field
from dbt.artifacts.resources import NodeVersion
@dataclass
class ModelNodeArgs:
name: str
package_name: str
identifier: str
schema: str
... | @dataclass
class ModelNodeArgs:
@property
def unique_id(self) -> str:
pass
@property
def fqn(self) -> List[str]:
pass | 6 | 0 | 7 | 1 | 5 | 1 | 2 | 0.04 | 0 | 2 | 1 | 0 | 2 | 0 | 2 | 2 | 31 | 4 | 26 | 16 | 21 | 1 | 24 | 14 | 21 | 2 | 0 | 1 | 4 |
31,299 | fishtown-analytics/dbt | core/dbt/contracts/graph/nodes.py | dbt.contracts.graph.nodes.AnalysisNode | from typing import Any, Dict, Iterator, List, Literal, Optional, Sequence, Tuple, Type, Union, get_args
from dbt.artifacts.resources import Analysis as AnalysisResource
from dataclasses import dataclass, field
@dataclass
class AnalysisNode(AnalysisResource, CompiledNode):
@classmethod
def resource_class(cls) ... | @dataclass
class AnalysisNode(AnalysisResource, CompiledNode):
@classmethod
def resource_class(cls) -> Type[AnalysisResource]:
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 43 | 4 | 0 | 4 | 3 | 1 | 0 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.