prefect_dbt.cli.configs.base
Module containing models for base configs
Classes
DbtConfigs
Abstract class for other dbt Configs.
Attributes:
extras: Extra target configs’ keywords, not yet exposed in prefect-dbt, but available in dbt; if there are duplicate keys between extras and TargetConfigs, an error will be raised.
get_configs
- A configs JSON.
BaseTargetConfigs
Methods:
get_configs
- A configs JSON.
handle_target_configs
TargetConfigs
Target configs contain credentials and
settings, specific to the warehouse you’re connecting to.
To find valid keys, head to the Available adapters page and
click the desired adapter’s “Profile Setup” hyperlink.
Attributes:
type: The name of the database warehouse.schema: The schema that dbt will build objects into; in BigQuery, a schema is actually a dataset.threads: The number of threads representing the max number of paths through the graph dbt may work on at once.
from_profiles_yml
profile_name: Name of the profile to use from profiles.yml. If None, uses the first profile.target_name: Name of the target to use from the profile. If None, uses the default target in the selected profile.profiles_dir: Path to the directory containing profiles.yml. If None, uses the default profiles directory.allow_field_overrides: If enabled, fields from dbt target configs will override fields provided in extras and credentials.
- A TargetConfigs instance populated from the profiles.yml target.
ValueError: If profiles.yml is not found or if profile/target is invalid
handle_target_configs
GlobalConfigs
Global configs control things like the visual output
of logs, the manner in which dbt parses your project,
and what to do when dbt finds a version mismatch
or a failing model. Docs can be found here.
Attributes:
send_anonymous_usage_stats: Whether usage stats are sent to dbt.use_colors: Colorize the output it prints in your terminal.partial_parse: When partial parsing is enabled, dbt will use an stored internal manifest to determine which files have been changed (if any) since it last parsed the project.printer_width: Length of characters before starting a new line.write_json: Determines whether dbt writes JSON artifacts to the target/ directory.warn_error: Whether to convert dbt warnings into errors.log_format: The LOG_FORMAT config specifies how dbt’s logs should be formatted. If the value of this config is json, dbt will output fully structured logs in JSON format.debug: Whether to redirect dbt’s debug logs to standard out.version_check: Whether to raise an error if a project’s version is used with an incompatible dbt version.fail_fast: Make dbt exit immediately if a single resource fails to build.use_experimental_parser: Opt into the latest experimental version of the static parser.static_parser: Whether to use the static parser.
get_configs
- A configs JSON.