Skip to main content
November 20, 2024

Fetch Metadata values from Text file in Transformation Event Handler

  • November 20, 2024
  • 3 replies
  • 1 view

Hi Experts,

I am working on TransformationEventHandler rule in which we need to read the first 4 columns of a text file that is being uploaded to Workflow Import so I can do some sanity checks and error out if they are not correct. 

Does anyone have sample code that reads the values of file? I checked everywhere but not much documentation on this.

Also, I placed this code in "ParseSourceData" BREventOperationType.  Not sure if this is correct or need to put under "ParseTransformationRules"?

Thanks in advance,

PM

 

3 replies

Employee
November 21, 2024

Hey Mikki

Not directly answering your question but just wanted to check if you'd seen whether using a Connector Rule on a file data source would better suit your requirement? I mention it because many don't know about the functionality, allowing you to read a file straight into a BR before handing it to the data source.


DanielWillis_0-1732152706354.png

You can find an example @ https://community.onestreamsoftware.com/t5/Community-Blog/Beyond-Flat-and-Delimited-Files-How-to-Load-XML-or-JSON-Data/ba-p/28185

- Daniel

Employee
November 21, 2024

Hi Mikki

Not directly answering your question, but I wanted to check if you'd considered / knew about being able to user a connector BR on a file based import. It basically sends the file straight to a BR and then you process it and send a data table back to the data source. If it quite an under the radar feature which I feel not many people know about which is why i mention it.


DanielWillis_0-1732153199310.png

Some info @ https://community.onestreamsoftware.com/t5/Community-Blog/Beyond-Flat-and-Delimited-Files-How-to-Load-XML-or-JSON-Data/ba-p/28185

- Daniel

 

Employee
November 21, 2024

Tried to offer some assistance twice but my posts keep getting moderated / rejected. Not sure if its automatic or not so trying again with this post without any detail. MG?

November 21, 2024

I’ll take a look to see if I can see your original post and why it’s being filtered. 

November 25, 2024

Hi DanielWillis, Your post should be visible now.