Skip to main content

Hello,

I need to process a number of text files holding differing numbers of data rows.

The first 7 lines are fixed - they are the loggerid / siteid / channelref / units / totals / startdate / enddate.

After that there could be a different number of rows with a datetime and a value.

I need to process these files into a sql table with the fixed 7 lines data added to the datetime and value rows. The data in the first 7 lines will change so I need FME to process the files once at a time into the writer rather than all at once.

Any idea how I do this?

Cheers

N

The transformers you want to use for storing the first 7 rows of information are VariableSetter and VariableRetriever.

Hope this helps.

 


Hi erik_jan,

 

Thanks for your reply. I'm successfully using both those transformers but are having issues reading the data below the 7 fixed lines. I'm trying to use a Modulo counter to add line numbers to the input file, but that transformer requires an end count of rows, and I'm not sure how to calculate this. I thought a text-line count might do it, but it's not working.

 

Any ideas would be gratefully received!

 

Thanks

N


Reply