Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Migrating table with PutDatabaseRecord with different column name at the target table

Highlighted

Migrating table with PutDatabaseRecord with different column name at the target table

New Contributor

I need to migrate the data from a db2 table to a mssql table but one column has a different name, but the same datatype.

Db2 table: NROCTA,NUMRUT,DIASMORA2

MSSQL table: NROCTA,NUMRUT,DIAMORAS

As you see DIAMORAS is different.

Im using the following flow:

ExecuteSQL -> SplitAvro -> PutDatabaseRecord

In PutDataBaseRecord I have as RecordReader an AvroReader configured in this way:

Schema Acesss Strategy: Use Embedded Avro Schema. Schema Text: ${avro.schema}

The flow just insert the two first columns.¿How I can do the mapping between DIASMORA2 and DIAMORAS columns ?

Thanks in advance!