Append salesforce Table name to output column names

Hello All,

 

Is there a way to automatically append the source table name to the output name of the column so that each table would look like tablename_columnname?

 

I have a transformation job where I'm joining two salesforce tables. I can probaby use variables and then manually change each column name but I'm just wondering if there is a beter way to do this.

 

Thanks!!

I'm not sure if there is a built in component, but my first thought would be to take advantage of the python script component. The steps i imagine would go like this

  1. Create a grid variable with two columns: field_name, field_name_appended
  2. metadata to grid component which queries the desired table, and pulls the "name" metadata value and saves the output to each of the columns above. They would essentially contain the same data
  3. use the python component, read in the grid variable, then iterate over the grid variable, updating the values in the field_name_appened column, with a concatenation of the field_name column and the table name