metricsign
Start free
Medium severityschema

Power BI Refresh Error:
207

What does this error mean?

A query references a column that does not exist in the specified table or view.

Common causes

  • 1A column was renamed or dropped in the table but the query was not updated
  • 2ADF column mapping references a source column that no longer exists
  • 3dbt model references a column that was removed from the upstream source

How to fix it

  1. 1Step 1: Check the current columns: SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'YourTable' ORDER BY ORDINAL_POSITION;
  2. 2Step 2: Update the query to use the new column name, or add the missing column to the table if it was dropped accidentally.
  3. 3Step 3: In ADF, refresh the schema in the dataset settings and update the column mappings in the copy activity.

Frequently asked questions

How do I get notified when a column is dropped from a SQL Server table?

Use DDL triggers: CREATE TRIGGER TrackDDL ON DATABASE FOR ALTER_TABLE AS INSERT INTO DDLLog SELECT EVENTDATA().value('(/EVENT_INSTANCE/SQLStatement)[1]','NVARCHAR(MAX)'), GETDATE();

Can Power BI DirectQuery fail with error 207?

Yes — if a DirectQuery dataset has a custom SQL query referencing a column that was dropped, all report visuals using that dataset fail with a connection error.

How do I find all queries that reference a specific column?

Check cached query plans: SELECT qs.sql_handle, st.text FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st WHERE st.text LIKE '%column_name%';

Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-207-database-engine-error

Other schema errors