cancel
Showing results for 
Search instead for 
Did you mean: 

How to read file property (modified date, created date)

David_Wang
New Contributor II

Hi, I’m building a pipeline to load excel file, looks like the file reader snap can read file property (especially last modified date), but I’m not able to find a solution which can let me save the modified date for later process.
If I try to using excel parser snap in next step, it can change binary data to excel stream, but it will also lose file property which belong to the original file. Has anyone encounter same issue and resolve it without using script snap?

Thanks,
David

7 REPLIES 7

It’s great!!! never thought I have anyway to keep re-usability or avoid script.
Your guys light my day.

tstack
Former Employee

If you need to make a value available to different snaps of a pipeline, you can use a child pipeline and pass in pipeline parameters with the values of interest. In this case, you can use a DirectoryBrowser snap to get the file metadata and then use a PipelineExecute snap to start the child pipeline and pass it the relevant metadata.

The following is a screenshot of the parent pipeline showing the PipelineExecute snap that is calling the child and passing in the file path and last update time:

image

In the child pipeline, we have a file reader that will read the file passed in by the parent. (I didn’t do anything with the _lastModifiedTime variable)

image

Here are the exports of those pipelines:

FileMetadataParent_2018_10_11.slp (3.9 KB)
FileMetadataChild_2018_10_11.slp (3.9 KB)

David_Wang
New Contributor II

Hey, your guys are amazing! I just tried same idea right before read your reply. Thanks a ton.