TobikoData / sqlmesh

Efficient data transformation and modeling framework that is backwards compatible with dbt.
https://sqlmesh.com
Apache License 2.0
1.8k stars 159 forks source link

target.schema should return the schema for the environment being evaluated #998

Open crericha opened 1 year ago

crericha commented 1 year ago

dbt users expect target.schema to point to the schema for their active environment (aka target). sqlmesh should match that behavior to support run-time adapter queries that dynamically fetch tables.

tobymao commented 1 year ago

@crericha is this still an issue?

crericha commented 1 year ago

Yes, still an issue. target.schema will point to prod. It's unclear to me what schema should be provided as the snapshot may be shared by multiple environments. We'll need to talk through this one.