Skip to content

Testing module not accessing gateway variables #4068

@asos-davidstafford

Description

@asos-davidstafford

It appears that the test cannot access the variable defined in the gateway. I have followed the jinja documentation define here
testing, however the SCHEMA name in this case is ignored.

MODEL (
  name @SILVER_SCHEMA.mytable,
  kind FULL,
  cron '@daily',
....
....
)

SELECT * FROM `@EXTERNAL_CATALOG.bronze.sourcetable
test:
  description: "Test"
  model: {{ var('SILVER_SCHEMA') }}.mytable
  inputs: 
    mysourcedb.bronze.sourcetable:

When trying to run the test i get

[WARNING] Model '"sandbox_dev"."none"."mytable"' was not found at 
C:\git\POVs\sqlmesh-pov\technology\tests\test_ref_country_region_v2.yaml

If this should be supported by inputs, then this is also broken in the same way

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions