Flow to write to a file

Six Stars

Flow to write to a file

I have a job that reads a csv file, retrieves some values and stores them into global variables, then uploads a file to S3.  When that it's done, I'd like to write the global variables and the outcome of S3 upload to another file.  How do I go from tS3Put to tFileOutputDelimited?

 

Screen Shot 2018-06-01 at 6.47.21 AM.png


Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

Because tMap expect a flow you cannot use an event trigger to connect it.
Be more explicit about what you expect (maybe with sample).

TRF

All Replies
Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

OnSubjobOK after tSetGlobalVar_1 or tFileInputDelimited_2 should work.


TRF
Six Stars

Re: Flow to write to a file

I need this to happen after tS3Put, so I can get whether the upload completed or not.



 

Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

In this case use OnComponentOK/OnComponentError after tS3Put

TRF
Six Stars

Re: Flow to write to a file

It won't let me go from tS3put to tmap.  


@TRF wrote:
In this case use OnComponentOK/OnComponentError after tS3Put

 

Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

Because tMap expect a flow you cannot use an event trigger to connect it.
Be more explicit about what you expect (maybe with sample).

TRF
Six Stars

Re: Flow to write to a file

loop--> call a python script using tsystem (which generates a log file with value1 and value2) and an output file-->tFileInputDelimiter2 reads the log file-->tjavaRow stores value1 and value2 into global variables-->tS3put uploads the file to S3.  That works so far.

 

Now, if the upload was sucessful (I can use onSubjectOK), I want to write value1, value2 and the message ("OK") to another text file.  

 

Hope that clears it out.

Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

Right.

So you can replace your tMap by a tFixedFlowInput component with the same schema expected for the output file.

Then you populate each field with the desired values issued from the 2 global variables + "OK" for the message field.


TRF
Six Stars

Re: Flow to write to a file

Bingo.  That's what I was looking for.  Thank you.

 

 

Forteen Stars TRF
Forteen Stars

Re: Flow to write to a file

You're welcome

TRF