How to create a Fabric Pipeline to copy files to OneLake in Microsoft Fabric
This tutorial shows how to create a Fabric Pipeline to copy files from an external storage (for example, an Azure Blob) to OneLake in Microsoft Fabric, with a simple transformation. It is useful to automate ingestion, preserve history and prepare data for a Lakehouse or Warehouse.
Prerequisites
- Account with access to a workspace in Microsoft Fabric and permissions to create Pipelines.
- Data source (e.g., Azure Blob Storage) with CSV or Parquet files and SAS/connection string credentials.
- OneLake with a destination folder (container) or permission to create one.
- Basic knowledge of T-SQL and JSON to configure activities.
Step 1: Create a Linked Service for the source storage
A Linked Service describes how the Pipeline accesses the data source. In the Fabric Pipeline, create a Linked Service for Azure Blob (or S3) using the connection string or SAS.
// Exemplo de JSON esquemático para Linked Service (Azure Blob Storage)
{
"type": "AzureBlobStorage",
"typeProperties": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net"
}
}
Step 2: Create a Linked Service for OneLake (destination)
Create a Linked Service that points to OneLake. In Fabric, you can use the native OneLake connector or point to the Lakehouse path. This step ensures the Pipeline writes to the correct location.
// Exemplo esquemático para OneLake (pseudoconfig)
{
"type": "OneLake",
"typeProperties": {
"rootPath": "/OneLake/YourTenant/Namespace/Area/DestinationFolder"
}
}
Step 3: Create source and destination datasets
Datasets describe the files we want to copy. Create a dataset for the CSVs in the blob and another for the destination in OneLake (can be Parquet or Delta).
// Dataset de origem (CSV)
{
"name": "SourceCsv",
"properties": {
"linkedServiceName": "AzureBlobLinkedService",
"type": "DelimitedText",
"typeProperties": {
"location": { "container": "input", "folderPath": "daily" },
"columnDelimiter": ",",
"firstRowAsHeader": true
}
}
}
// Dataset de destino (Parquet em OneLake)
{
"name": "DestParquet",
"properties": {
"linkedServiceName": "OneLakeLinkedService",
"type": "Parquet",
"typeProperties": {
"location": { "folderPath": "processed/2026-10-01" }
}
}
}
Step 4: Create a Pipeline with a Copy activity
The Pipeline uses a Copy activity to move the files from the blob to OneLake. You can configure column mapping and data transformation (for example, select columns or convert types).
{
"name": "CopyBlobToOneLake",
"properties": {
"activities": [
{
"name": "CopyCSVToParquet",
"type": "Copy",
"inputs": [{ "referenceName": "SourceCsv" }],
"outputs": [{ "referenceName": "DestParquet" }],
"typeProperties": {
"enableStaging": false,
"translator": {
"type": "TabularTranslator",
"mappings": [
{ "source": { "name": "id" }, "sink": { "name": "id", "type": "Int64" } },
{ "source": { "name": "value" }, "sink": { "name": "value", "type": "Double" } }
]
}
}
}
]
}
}
Step 5: Add triggers to automate (scheduling)
To run automatically, add a schedule trigger to the Pipeline. It can be daily, hourly or event-based. Here we show a daily schedule.
{
"name": "DailyTrigger",
"properties": {
"type": "ScheduleTrigger",
"typeProperties": { "recurrence": { "frequency": "Day", "interval": 1 } }
}
}
Step 6: Test and handle common errors
Run the Pipeline manually to validate. Common errors: incorrect credentials (401/403), non-existent destination path and type mapping issues. Check the logs in the Pipeline run history and enable retry/backoff on activities.
// Exemplo de retry simples na activity
"policy": { "retry": 3, "intervalInSeconds": 30 }
Verify the result
Confirm that the files appeared in OneLake in the destination folder and that the format (Parquet/Delta) is correct. Open a Lakehouse or use a Notebook/Spark SQL to read some records and validate columns and types:
-- Exemplo T-SQL em Warehouse ou Spark SQL
SELECT TOP 10 *
FROM parquet.`/OneLake/.../processed/2026-10-01/`;
Conclusion
After automating the copy to OneLake, you can add more complex transformations (Spark Jobs, Dataflow), manage versions with Delta and integrate with Power BI. Try adding quality validations before the copy. What will be the next transformation you want to automate?