Skip to content

CompilerConfig

relationalai.config.config_fields

Configure compiler behavior for query translation.

This controls client-side compilation defaults such as strictness, output formatting, and a few experimental optimization flags.

Minimal YAML (in raiconfig.yaml):

default_connection: sf
connections:
sf:
type: snowflake
# ...
compiler:
strict: true
soft_type_errors: true

Configure compiler settings using a dict:

>>> from relationalai.config import Config
>>> cfg = Config(
... compiler={"dry_run": True, "strict": True, "soft_type_errors": True},
... )

Configure compiler settings using an explicit CompilerConfig instance:

>>> from relationalai.config import CompilerConfig, Config
>>> cfg = Config(
... compiler=CompilerConfig(dry_run=True, strict=True, soft_type_errors=True),
... )
CompilerConfig.dry_run: bool

Run compilation in dry-run mode.

CompilerConfig.strict: bool

Enable strict validation mode.

CompilerConfig.soft_type_errors: bool

Treat type errors as warnings instead of failures.

CompilerConfigpydantic.BaseModel
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure execution behavior
            ├──  Enable or disable strict mode
            └──  Enable or disable soft error mode