flytekitplugins.dbt.BaseDBTInput#

class flytekitplugins.dbt.BaseDBTInput(project_dir, profiles_dir, profile, target=None, output_path='target', ignore_handled_error=False, flags=None)[source]#

Base class for DBT Task Input.

Parameters
  • project_dir (str) –

  • profiles_dir (str) –

  • profile (str) –

  • target (str) –

  • output_path (str) –

  • ignore_handled_error (bool) –

  • flags (dict) –

Return type

None

project_dir#

Path to directory containing the DBT dbt_project.yml.

Type

str

profiles_dir#

Path to directory containing the DBT profiles.yml.

Type

str

profile#

Profile name to be used for the DBT task. It will override value in dbt_project.yml.

Type

str

target#

Target to load for the given profile (default=None).

Type

str

output_path#

Path to directory where compiled files (e.g. models) will be written when running the task (default=target).

Type

str

ignore_handled_error#

Ignore handled error (exit code = 1) returned by DBT, see https://docs.getdbt.com/reference/exit-codes (default=False).

Type

bool

flags#

Dictionary containing CLI flags to be added to the dbt run command (default=False).

Type

dict

Methods

classmethod from_dict(kvs, *, infer_missing=False)#
Parameters

kvs (Optional[Union[dict, list, str, int, float, bool]]) –

Return type

dataclasses_json.api.A

classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)#
Parameters

s (Union[str, bytes, bytearray]) –

Return type

dataclasses_json.api.A

classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)#
Parameters
  • infer_missing (bool) –

  • many (bool) –

  • partial (bool) –

Return type

dataclasses_json.mm.SchemaF[dataclasses_json.mm.A]

to_args()[source]#

Convert the instance of BaseDBTInput into list of arguments.

Returns

List of arguments.

Return type

List[str]

to_dict(encode_json=False)#
Return type

Dict[str, Optional[Union[dict, list, str, int, float, bool]]]

to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)#
Parameters
Return type

str

Attributes

flags: dict = None#
ignore_handled_error: bool = False#
output_path: str = 'target'#
target: str = None#
project_dir: str#
profiles_dir: str#
profile: str#