Query Data & Use Data Preview in SQL Editor in Fabric | Microsoft Fabric Tutorial For Data Engineers

Query Data & Use Data Preview in SQL Editor in Fabric | Microsoft Fabric Tutorial

Query Data & Use Data Preview in SQL Editor in Fabric | Microsoft Fabric Tutorial For Data Engineers

Microsoft Fabric offers a powerful and intuitive SQL Editor for data engineers to query, preview, and analyze data in real time. In this tutorial, you’ll learn how to effectively use the SQL Editor and Data Preview features to work with warehouse tables.

✅ How to Open the SQL Editor

  1. Navigate to your Warehouse or Lakehouse in Microsoft Fabric
  2. Click on the SQL Editor tab from the top menu
  3. You can also open an existing SQL script or create a new one

✍️ Writing and Running SQL Queries

Use the editor to write T-SQL queries just like in SSMS or Azure Data Studio. Example:

SELECT TOP 100 * FROM dbo.Orders
WHERE OrderAmount > 500
ORDER BY OrderDate DESC;

Click Run (▶️) or press Ctrl + Enter to execute.

🔍 Using Data Preview

  • Right-click any table from the object explorer
  • Select Preview data
  • Fabric shows the first 100 rows with basic metadata
  • You can use this to validate structure and sample content

🎛️ Filter, Sort & Explore Result Sets

  • Click column headers to sort ascending or descending
  • Use the filter icon to apply basic text or numeric filters
  • Pin important columns for easier analysis

💡 Tips for Efficient Querying

  • Use TOP or LIMIT to avoid large result sets during testing
  • Alias long table names for cleaner syntax
  • Click on “Format SQL” for auto-formatting queries
  • Use INFORMATION_SCHEMA.TABLES to find all tables:
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbo';

🎬 Watch the Full Tutorial

Blog post written with the help of ChatGPT.