Edit

Share via


Create and manage a warehouse snapshot (preview)

This article includes steps to create and manage warehouse snapshots using the Fabric portal, T-SQL queries, or the Fabric API.

Note

Warehouse snapshots are currently a preview feature.

Prerequisites

  • A Fabric workspace with an active capacity or trial capacity.
  • A Fabric warehouse.
  • Verify the necessary user permissions.

Create

Multiple snapshots can be created for the same parent warehouse. Once warehouse snapshots are created, they appear as child items of the parent warehouse in the workspace view.

Warehouse snapshots can be created via the Fabric portal. In the ribbon, under Management, select New warehouse snapshot.

Query a snapshot

Once created, warehouse snapshots appear as child items in the workspace.

Screenshot from the Fabric portal showing the warehouse snapshot in the item list.

Connect to the snapshot just like a warehouse. In the settings of your warehouse snapshot, visit SQL endpoint to view and copy the SQL connection string. The connection string looks like this: <server-name>.datawarehouse.fabric.microsoft.com. Users with appropriate permissions (Admin, Member, Contributor, or Viewer) can query a snapshot just like a warehouse. For more information, see Warehouse connectivity in Microsoft Fabric.

View the snapshot timestamp

When a T-SQL query is run, information about the current version of the data being accessed is included. For example, you can see the timestamp in the Messages of the Fabric portal query editor:

Screenshot from the Fabric portal query editor showing the Messages output of a query on a warehouse snapshot.

To see a warehouse's snapshots and their current timestamps, use the following T-SQL query on sys.databases and the extended property of TIMESTAMP to render attributes:

SELECT snapshot_name = v.name
, source_warehouse_name = s.name
, snapshot_timestamp = DATABASEPROPERTYEX(v.name,'TIMESTAMP')
FROM sys.databases AS v 
INNER JOIN sys.databases AS s ON v.source_database_id=s.database_id;

Update snapshot timestamp

You can update the timestamp of an existing warehouse snapshot at any time.

You can accomplish this with T-SQL commands in the context of the parent warehouse, or via the Fabric portal. For more information, see Update snapshot timestamp.

In the Fabric portal, select Capture new state from the context menu, then select a timestamp for the snapshot. You can select Current or any point within the retention period (within the last 30 days).

The ALTER DATABASE SQL statement uses the system time of the warehouse as the new point in time in which the source warehouse data will be reflected in the snapshot.

  • To update the snapshot to the current state of the warehouse, use CURRENT_TIMESTAMP.

    ALTER DATABASE [<snapshot name>]
    SET TIMESTAMP = CURRENT_TIMESTAMP; 
    
  • The timestamp can also be set to any point within the retention period (within the last 30 days). The format of the TIMESTAMP argument is YYYY-MM-DDTHH:MM:SS.SS. For example, to set the timestamp to April 27, 2025 at 18:10 UTC:

    ALTER DATABASE [<snapshot name>]
    SET TIMESTAMP = '2025-04-27T18:10:00.00';
    

Rename

You can rename a warehouse snapshot item via REST API and in the Fabric portal.

Warehouse snapshots can be renamed via the Fabric portal. Open your warehouse snapshot. Select the settings button, provide a new Name.

Delete

You can delete a warehouse snapshot in the Fabric portal or with the REST API.

Warehouse snapshots can be deleted via the Fabric portal. In the workspace item list, select the context menu for the warehouse snapshot item, and select Delete.