Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
arpost
Post Prodigy
Post Prodigy

Can you skip rows in Copy activity like you can in Azure Data Factory?

Greetings, all. I have a scenario where I need to skip a few rows of a file in a Copy activity in order to get to the file's column headers. However, I don't see the Skip Line Count option like in Azure Data Factory. Is there something I'm overlooking? Or is the idea that we'd have to do something like pre-process the file or do it after loading?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @arpost ,

 

In Fabric Data Factory, there are several ways to solve this problem:
1. Before loading a file into Fabric Data Factory, you can use a script or other tool to preprocess the file, removing the first few lines of unneeded data. For example, use a Python script to read the file and save a new file.
2. After the file is fully loaded into the data store, you can remove unwanted lines in subsequent processing steps. For example, use the following sql statement to remove the first few rows of data:

row result:

vkongfanfmsft_1-1721873958592.png

after query:

SELECT *
FROM (
    SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS RowNum, *
    FROM HR.Employees
) AS TempTable
WHERE RowNum > 1

vkongfanfmsft_0-1721873916313.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @arpost ,

 

In Fabric Data Factory, there are several ways to solve this problem:
1. Before loading a file into Fabric Data Factory, you can use a script or other tool to preprocess the file, removing the first few lines of unneeded data. For example, use a Python script to read the file and save a new file.
2. After the file is fully loaded into the data store, you can remove unwanted lines in subsequent processing steps. For example, use the following sql statement to remove the first few rows of data:

row result:

vkongfanfmsft_1-1721873958592.png

after query:

SELECT *
FROM (
    SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS RowNum, *
    FROM HR.Employees
) AS TempTable
WHERE RowNum > 1

vkongfanfmsft_0-1721873916313.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.