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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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