Using FilterBy LastModified Data Factory Data Flow

Jogalekar, Mandar 56 Reputation points
2021-06-07T14:01:47.367+00:00

I am setting a pipeline variable of in string type and passing it as a parameter to data flow.I want to use this to filter files using LastModified Option.My source of files is azure data lake.

My pipeline variable is produced in this format.

"name": "lastModified",  
"value": "2021-06-07T12:31:20Z"  

}

It is passed to data flow and used in LastModified option using following expression.
toTimestamp(left($lastModified, 23), 'yyyy-MM-dd\'T\'HH:mm:ss.SSS')

and

toTimestamp($lastModified, 'yyyy-MM-ddTHH:mm:ss')

I have tried another option without left string function as well. However I am getting following error.

"StatusCode":"DF-Executor-ParseError","Message":"Job failed due to reason: Expression cannot be parsed","Details":"Parameter stream has parsing errors\nLine 3 Position 26: missing '=' at ':'\nLine 3 Position 27: mismatched input '31' expecting {'parameters', 'functions', 'as', 'input', 'output', 'constant', 'expression', 'integer', 'short', 'long', 'double', 'float', 'decimal', 'boolean', 'timestamp', 'date', 'byte', 'binary', 'integral', 'number', 'fractional', 'any', IDENTIFIER, ANY_IDENTIFIER}\nLine 5 Position 0: mismatched input '[<' expecting '='"}

What is the right way to pass LastModified Parameter to data flow?
103056-image.png

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,376 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,774 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 80,251 Reputation points Microsoft Employee
    2021-06-08T10:26:12.737+00:00

    Hello @Jogalekar, Mandar ,

    Welcome to Microsoft Q&A Platform.

    There is syntax error in the expression. Please use below expression to resolve the issue.

    toTimestamp($lastModified,'yyyy-MM-dd\'T\'HH:mm:ss')  
    

    Hope this helps. Do let us know if you any further queries.

    ---------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.