Forum Discussion
Query Parameter - Different columns between sources results in a failed refresh
- 8 months ago
Hi Foxxon28
What you’re seeing is expected behavior: in the Power BI Service the dataset refresh is schema-validated, so if a column referenced anywhere in the model (Power Query, relationships, measures, or visuals) does not exist in the current source, the entire refresh fails, unlike Desktop which is more forgiving at design time. Query parameters only swap the connection — they do not abstract schema differences — so Dev/Test/Prod must be structurally identical if you want pipelines to work reliably. The only safe workaround is to standardize the schema by exposing views in each environment that always return the same columns (add NULL or default values for missing columns in Prod), or use Power Query to add missing columns with nulls before loading. If the schemas aren’t aligned, deployment pipelines + parameters will keep breaking in the Service.
For semantic model refresh in the Service, your “switched” sources must end up with the same schema (same column names + types for anything that gets loaded into the model). If your PROD source doesn’t have a column that exists in TEST, the refresh will fail because the model metadata still expects that column. For example, if TEST has extra columns, you need to add them as NULL in PROD so both environments return identical columns.
As an another alternative you could directly work on PROD in which I assuma you have all the columns here, and then publish it on DEV after changing the server to DEV. Then you can work with a proper CI/CD environment.