简体   繁体   中英

Read the last line of a CSV file and extract one value in Knime

I am working in a workflow on Knime, and I have an excel writer node as a final node of my workflow. I need to read this file and get and store the last value of one specific column (time). And with this data, I need to input in another time node, to update my API link to get a new request.

To summarize I need to extract specific information from the last line of my excel file in knime.

My question is: How can I read this file and get this value from my sheet? And then, how can update a time loop to refresh the data for inserting the current day in my API link? 在此处输入图像描述

UDDATE-> My question is how can I Filter always the last 90 days in my concatenate database. I have two columns in this file with dates. And I need to maintain just the last 90 days since the current day.

To read an Excel file, use the Excel Reader node.

The simplest way to get the last row of a table (assuming your date column has a value for every row of this table?) is probably to use a Rule-based Row Filter with the expression

$$ROWINDEX$$ = $$ROWCOUNT$$ => TRUE

Now you have a one-row table with the values from the last line of the Excel sheet. To help further we need to understand what you mean by update a time loop to refresh the date for inserting the current day in my API link . Can you update your question with a screenshot of your current KNIME code?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM