Skip to main content

Module overlay_transformer

Module overlay_transformer 

Source
Expand description

Name transformation for mz-deploy dev overlay compilation.

This module provides OverlayTransformer, which implements the two-step reference resolution rule for schema-level overlays:

  1. External references — if the database is not in in_project_databases, emit the name verbatim.
  2. Overlaid objects — if the fully qualified object is in overlay_objects, rewrite the database component to <database>__<profile_name>. Otherwise emit <database>.<schema>.<object> (production reference). Routing by object, not by schema, keeps a non-overlaid object that happens to share a schema with an overlaid one pointing at production, where it actually exists.

Unqualified / partially qualified names are fully qualified using the transformer’s fqn context before the rule is applied.

The project planner has already applied any configured profile_suffix to database and cluster names before dev invokes the transformer, so no suffix handling is required here.

Structs§

OverlayTransformer 🔒
Transforms references for mz-deploy dev overlay compilation.