Skip to main content

I need to standardize volume data in ml . 

 

I have data in galons,liters and mililiters . Can anyone please help me in this .

 

Sample Volume Data 

450ml

2L

5galon

2.8L

 

 

Thanks in advance 

 

 

Hi @Kundan, assuming you're working on ONE Desktop to achieve this, I would suggest the following approach:

  1. Parse the source value to have the numbers and the units of measure in two separate columns. The Strip Titles step can do this nicely - you'll just need to build a lookup file that contains the list of known units, and then configure the Strip Step, something like this:
    1. Add a column that will store the standardized value, say std_volume_value, and use an expression to calculate it from the src_volume_value, something like this:

case(units is "L",toInteger(src_volume_value)*1000,

    units is "ml", toInteger(src_volume_value),

    units is "Galons",toInteger(src_volume_value)*3785.41,

    null) 

Hope this helps - let us know if you have any other questions!


Hi @Kundan, let me just add what is not exactly solution to your question however it might help.

You can find an open solution as part of ONE Desktop -  Cleanse and Convert Weight Unit and Value - which is similar use case and you might get some inspiration out of it or it may be even possible to customize the component to your specific needs. 

Hope this could help.

 

 


Reply