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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
CheenuSing
Community Champion
Community Champion

Operation on target ForEach1 failed: The function 'length' expects its parameter to be an array

Hi,

I am using Fabric trial licence.


I created a pipeline with Lookup as startting point to retrieve SchemaName and TableName from on prem sql database.
It wotks fine and gives me the desired output.

CheenuSing_0-1751285874441.png

Then I created a For Each activiy to copy data from each table to a landing areas in the lakehouse

settings for ForEach

CheenuSing_1-1751285996772.png

Then I set up the copy activity within for each

CheenuSing_2-1751286180795.png

I get the error 
Operation on target ForEach1 failed: The function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object' .

If I change the setting for For Each to @activity('Lookup1).output.firstRow

still get the same error.
How to fix this error ?

Cheers
CheenuSing


 



Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
1 REPLY 1
nilendraFabric
Community Champion
Community Champion

Hi @CheenuSing 

 

try Modify the ForEach `Items` property to reference the full array from the Lookup output:

 

@activity('Lookup1').output.value

 

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.