Skip to main content
Solved

 standardization of volume data


Forum|alt.badge.img+3
  • Data Pioneer L2
  • 11 replies

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 

 

 

Best answer by Lisa Kovalskaia

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!

View original
Did this topic help you find an answer to your question?

2 replies

Lisa Kovalskaia
Ataccamer
Forum|alt.badge.img+3

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!


Ales
Ataccamer
Forum|alt.badge.img+2
  • Ataccamer
  • 27 replies
  • November 27, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings