Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Add Support for OUTPUT Statement in Fabric Data Warehouse

The OUTPUT statement is a commonly-used function in the world of databases and T-SQL and is integral to a variety of data operations. Not being able to return the OUTPUT of a script severely hampers the ability to perform numerous data operations that have dependencies on consuming newly created keys and adds a barrier to Fabric adoption.


EXAMPLE:

You are loading multiple files from multiple clients. You want to ensure data quality and be able to clean up the data warehouse if bad data gets loaded. You use a standard DB practice of creating a logging table and inserting a record so you have a unique ID that you can then assign to all upserted records. Your normal process would be:

  1. Insert log record.
  2. Output new log record key.
  3. Include log record key in upsert scripts for tables.


Without an OUTPUT statement in Fabric, you can't perform item #2 as there could be numerous jobs inserting to the same table concurrently.


MS Document Link: https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql?view=sql-server-ver16

Status: New
Comments
paul_dibenedett
New Member

I have the same use case for our medallion architecture. Would love to have OUTPUT to record a simple CDC log.

fbcideas_migusr
New Member
Status changed to: New
 
prom
Frequent Visitor
Looks like Daverse's connector for Fabric WH tables is using OUTPUT clouse. So +1 "message": "BadGateway", "innerError": { "status": 502, "message": "OUTPUT is not supported.\r\nclientRequestId: 2ce46abc-0038-4004-87bb-2dbe4dbbbb65-self", "error": { "message": "OUTPUT is not supported." },
TimOnCloud
New Member
Also necessary for the MERGE Statement when building type 2 SCD