Heard about Ab Initio? It is an ETL tool for Data Warehousing Projects, or probably much more than that. To know more about the software, please refer the official website – http://www.abinitio.com/
Recently, while coding an XFR, i.e. business transformation logic for some project, I was asked that there’s a field in the input record format, which contains words separated by single space. However, only the second word holds significance. So, how can one extract the exact information?
As I have been dealing with vectors in writing XFR’s for sometime now, I proposed following solution;
out.fld_name :: string_split(in.fld_name_having_space_separated_words, " ");
As the string_split() returns the result in form of a vector, which one can relate to arrays in many programming languages. Thus, this trick makes use of implicit vectors, and assigns second element denoted by .
Hope this trick works for you as well. If not, explore more to know more.