Microsoft Fabric query guide
After every extract, the job writes a SQL script to ADLS:
abfss://archive@<storage>.dfs.core.windows.net/<job_id>/_catalog/fabric.sql
Two ways to use it in Fabric:
Path A: Lakehouse SQL endpoint (fastest)
The SQL is the same OPENROWSET dialect that Synapse Serverless uses.
1. Create or open a Lakehouse
In Fabric → your Workspace → + New → Lakehouse.
2. Connect the Lakehouse to your ADLS
In the Lakehouse → + New → Shortcut → ADLS Gen2. Provide:
- URL:
https://<storage>.dfs.core.windows.net/archive - Authentication: Organizational account (your Entra ID), or OAuth with a service principal.
This creates a shortcut named archive under your Lakehouse’s Files/ area.
3. Open the SQL endpoint
Top-right of the Lakehouse → SQL endpoint dropdown.
4. Download fabric.sql from ADLS and paste
az storage blob download \
--account-name <storage> \
--container-name archive \
--name '<job_id>/_catalog/fabric.sql' \
--file fabric.sql \
--auth-mode login
Paste into the SQL endpoint editor. The script:
- Creates an external data source pointing at your storage
- Creates schemas (one per Oracle schema)
- Creates a view per table using OPENROWSET
5. Query
SELECT TOP 100 * FROM HR.EMPLOYEES;
SELECT COUNT(*) FROM HR.EMPLOYEES;
-- Cross-schema join works the same as Oracle
SELECT e.name, d.dept_name
FROM HR.EMPLOYEES e
JOIN HR.DEPARTMENTS d ON e.dept_id = d.id;
Path B: Promote to native Delta tables (recommended for repeated queries)
For tables you’ll query repeatedly, convert from view-over-Parquet to a native Delta table:
-- In the Lakehouse SQL endpoint:
CREATE TABLE HR.EMPLOYEES_DELTA AS
SELECT * FROM HR.EMPLOYEES;
Or use a Fabric Notebook:
# PySpark notebook in your Fabric workspace
df = spark.read.parquet(
"abfss://<workspace-id>@onelake.dfs.fabric.microsoft.com/<lakehouse-id>/Files/archive/<job_id>/HR/EMPLOYEES/"
)
df.write.format("delta").mode("overwrite").saveAsTable("HR_EMPLOYEES")
Delta tables give you:
- Faster queries (data co-located with compute)
- ACID transactions for incremental updates
- Time-travel queries
- Native integration with Power BI / DirectLake
Cost / performance notes
| Pattern | Best for | Cost |
|---|---|---|
| OPENROWSET views over Parquet (Path A) | Ad-hoc queries, occasional access, compliance reporting | Per-query Capacity Units; very low for column-filtered queries |
| Delta tables in Lakehouse (Path B) | Recurring analytics, BI dashboards, real-time joins | Storage + compute Capacity Units; predictable |
| Direct PySpark over the Parquet | Heavy transformations, ML pipelines | Compute Capacity Units only |
For most archive use cases, Path A is enough — you’re querying old data infrequently and don’t want to duplicate storage. Promote to Delta only for the hot tables that get repeated access.
Compared to Oracle restore
| Workflow | When to use |
|---|---|
| Query via Fabric (this guide) | “I just need to look at the old data” — compliance audit, analytics, occasional ad-hoc |
| Restore to Oracle | ”I need to run my application against this data” — DR, full reload, transactional access |
Most customers use Fabric/Synapse query for 95% of access and only restore to Oracle when an application needs the data back.