gooddatacloud-connect

Using Input Port in File List Component


I'm trying to pass a parameter into the File List component through input port 0. All of my attempts thus far have been met with an error,

Input edge has no effect. Disconnect edge or use metadata fields as parameters in Target URL, Source path or Target path.

Ideally, I would like the Target URL to be something along the lines of http://${S3_ACCESS_KEY}:${S3_SECRET_KEY}@${MY_BUCKET}.s3.amazonaws.com/reports/${port:0.value}/*_interestingReport.csv where ${port:0.value} is the value passed in from the input port.

What is the correct way to use data coming in on input port 0?


Solution

  • The way how passing parameters from input edge for File List (but other file components as well) works, is that you use the name of the metadata column from an input edge and enclose it between ${ and }.

    So if the metadata on the edge have a field called directory, which contains the dir you want to use, this is the way how to do it.

    
    http://${S3_ACCESS_KEY}:${S3_SECRET_KEY}@${MY_BUCKET}.s3.amazonaws.com/reports/${directory}/*_interestingReport.csv