Linear Interpolation

Five Stars

Linear Interpolation

Is there a way to do a linear interpolation using a database feed and a lookup table? We receive continuous data from our onsite monitoring, and we need to lookup a reference table(see below) to get an output. The value of the continuous data references the first column and then interpolated output based on the second column is produced.

  For example, if we receive a value of 590.10ft, we would like to get an answer of ~13.4cfs.  We currently have excel spreadsheets and some old Python code that can produce this but is this possible using TOS?

 

[ft][cfs]
00
5900
590.027
590.0965
590.13112
590.18183
590.2215
590.25300
590.28356

 

 

Community Manager

Re: Linear Interpolation

Yes. Just translate your Python code into Java and apply it in a Job.

Five Stars

Re: Linear Interpolation

Unfortunately, re-purposing the old python code isn't an option for us.

Community Manager

Re: Linear Interpolation

OK, well this may work for you.....

http://www.java2s.com/Code/Java/Collections-Data-Structure/LinearInterpolation.htm

 

You can plug that code into a Talend routine and use to carry out your calculation

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch