Skip to content

Commit ee3dfd6

Browse files
committed
Recognize in-place audit as optional catalog relation
1 parent 5ed2ce6 commit ee3dfd6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/openstatspec/sql/wide.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,17 @@ def _registered_physical_relations(
13031303
physical_tables.add(name)
13041304
elif workflow_tables & existing_tables:
13051305
return static_tables, declared_tables, physical_tables, physical_views, "foreign"
1306+
1307+
# The compact in-place apply audit is optional but catalog-owned. Import
1308+
# locally because inplace_transform depends on this module at load time.
1309+
from .inplace_transform import ( # pylint: disable=import-outside-toplevel
1310+
apply_audit_catalog,
1311+
)
1312+
apply_audit = apply_audit_catalog(MetaData())
1313+
if apply_audit.name in existing_tables:
1314+
declared_tables += (apply_audit,)
1315+
static_tables.add(apply_audit.name)
1316+
13061317
return static_tables, declared_tables, physical_tables, physical_views, "valid"
13071318

13081319

0 commit comments

Comments
 (0)