Asign data from historian to a variable

Asign data from historian to a variable

Hi, as the tittle says I'm tring to figure out if it's posible to read data from a lot that has already been saved to historian and asign it to a variable. 

For example:
I got 3 lots, lot1, lot2 and lot3; with this structure: lot_name, lot_type, lot_description.
I want to select lot2 and extract lot_type into a variable.

Is it posible? If so, how could I do it?