Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
ritvik4BI
Partner - Contributor III
Partner - Contributor III

Looping over all fields in a table to pick the ones stored in Variable

Hi All,

I have a variable vTagNames defined as Alpha,Beta,Gamma all three of which happen to the columns of a table I am about to load. Now what I want to do is fetch the Timestamp field and only fields defined in the variable i.e Alpha,Beta,Gamma in this case  from my table and not x,y and z or any other fields which might come in future. 

I am thinking about using for loop and iterating over all the fields and comparing them with the ones stored in my variable.

Is this correct? If yes, How to implement? If not, what is the right approach?

Below attached is an excel sheet containing the table...

Thanks.

 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

LOAD
  Timestamp,
   $(vTagNames)
FROM ....

-Rob

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

LOAD
  Timestamp,
   $(vTagNames)
FROM ....

-Rob