Fabric lets you transform data in three main ways: Dataflow Gen2 (Power Query, low code), Spark notebooks (code, PySpark or Spark SQL), and T-SQL in a warehouse. All three can produce correct results, so the question is which one fits the people, the data and the destination. A pipeline is not a transformation engine; it orchestrates and copies, and it can call any of the three.
Dataflow Gen2
A dataflow is a visual, Power Query based tool. It connects to more than 150 sources, offers over 300 transformation functions, and can write to several destinations (a lakehouse, a warehouse, Azure SQL Database, Azure Data Explorer and others). Developers who know Power Query from Excel or Power BI, and business analysts, usually pick it. Use it when:
- the team prefers no-code or low-code,
- data volume is low to medium,
- you need profiling and wrangling of messy data with many ready-made steps.
Dataflows also support incremental refresh and scheduling. For large file or database sources, fast copy can switch ingestion to the pipeline copy backend once the data passes a size threshold (files of at least 100 MB in ADLS Gen2 or blob storage, or databases with 5 million rows or more). "Require fast copy" makes the refresh stop instead of silently falling back, which helps debugging.
Spark notebook
A notebook runs distributed code. It is the right tool when transformation logic is complex, when data is large, semi-structured or unstructured, or when you want open-source libraries, unit-testable code, or machine learning in the same flow. The cost is that you need Spark skills and you manage code. The primary target is the lakehouse, where results are Delta tables.
from pyspark.sql import functions as F
orders = spark.read.table("bronze_orders")
clean = (orders.filter(F.col("amount") > 0)
.withColumn("order_date", F.to_date("order_ts")))
clean.write.mode("overwrite").saveAsTable("silver_orders")
T-SQL in a warehouse
If the destination is a warehouse and the team lives in SQL, transform with T-SQL where the data already is. The warehouse offers four ingestion and transformation statements:
CREATE TABLE AS SELECT(CTAS) creates a new table from a query.SELECT ... INTOalso creates a new table.INSERT ... SELECTappends to an existing table.MERGEinserts, updates or deletes to synchronize a destination with a source; make sure the source gives at most one row per key.
The source can be a warehouse table, a lakehouse table (by three-part name lakehouse.schema.table in the same workspace), or CSV, Parquet or JSONL files in Azure storage through OPENROWSET. For raw file loading at highest throughput use COPY INTO, then transform with SQL.
CREATE TABLE dbo.SalesByRegion AS
SELECT Region, SUM(Amount) AS Total
FROM MyLakehouse.dbo.Sales
GROUP BY Region;
How to decide
Ask in this order:
- Who builds and maintains it? Power Query people: dataflow. Python or Spark people: notebook. SQL people: T-SQL.
- Where does the result live? Warehouse tables favor T-SQL; lakehouse Delta tables favor Spark; multiple destinations favor a dataflow.
- How complex and how big? Heavy logic, very large or unstructured data: notebook. Moderate volume with rich built-in steps: dataflow.
- Is a transformation needed at all? For a straight copy, use a Copy activity or Copy job instead.
Combining them is normal: a pipeline copies raw data into a lakehouse, a notebook builds the silver layer, and T-SQL shapes the gold star schema in the warehouse.
Common mistakes
- Using a dataflow for a very large, complex transformation that needs custom code.
- Writing a notebook only to run a join and aggregation that T-SQL does in place in the warehouse.
- Running
MERGEwith duplicate keys in the source. - Expecting to run data-modifying T-SQL against a lakehouse SQL analytics endpoint, which is read-only.
For the exam
- Dataflow Gen2: low code, Power Query, 300+ transformations, multiple destinations.
- Notebook: code, complex or large-scale transformation, lakehouse-centric.
- T-SQL: CTAS, SELECT INTO, INSERT ... SELECT, MERGE inside a warehouse; cross-item reads by three-part name.
- Match the tool to team skills and destination first.
- A pipeline orchestrates; it is not the transformation engine.