1

I need to modify columns based on business rules using RCP. For example, all source columns that end with '_ID' must be changed to '_KEY' to meet the target.

An example: Test_ID in source becomes Test_KEY in target

I have multiple tables, some with 2 "ID" columns, and some with 20. Is there a way to configure the modify stage to bulk rename columns based on wildcard?

If not, is there another way?

Thanks.

arcee123
  • 101
  • 9
  • 41
  • 118

1 Answers1

1

I doubt that there is an option using modify stage with wildcards for this.

One alternative could be a schema file which can be used with any of following stages: Sequential File, File Set, External Source, External Target, Column Import, Column Export

This schema file could also be generated or modified to adjust the column names as needed.

Another way could be to generate the appropriate SQL statement if the data resides in a database or is written to one.

MichaelTiefenbacher
  • 3,805
  • 2
  • 11
  • 17
  • I guess I asked a bad questions. The tables are already deplyed. What I want to do is run via RCP to send data from source to target. However, the schemas in the target have the column names changed based on those business rules. – arcee123 Feb 24 '16 at 21:58
  • understood - but generating the SELECT with SELECT TEST_ID as TEST_KEY,... and feeding ot to that job as a parameter (#SQL#) could be an option I think. – MichaelTiefenbacher Feb 24 '16 at 22:01