Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have 5 hive tables and I m trying to union them. The schema of the 5 tables is same. but i need to add a static field in each table i.e. region code. For first table, this static field will contain value = MN, second table region code = AB etc.
All the 5 schemas are built-in so i added a field"region_cd" in the end and set default value for each.
now when i tunite them and output them, region_code field doesnt get populated for any file.
Can u pls let me know why..? or any other way to do it..?
Hi,
You can pass the output of each hive table to a tmap. In the tmap, you can add the static column as an additional column in the output schema. After this stage, you can do tunite to merge all the tables.
If the reply has helped you, could you please mark the topic as resolved? Kudos are also welcome.
Warm Regards,
Nikhil Thampi
Hi,
You can pass the output of each hive table to a tmap. In the tmap, you can add the static column as an additional column in the output schema. After this stage, you can do tunite to merge all the tables.
If the reply has helped you, could you please mark the topic as resolved? Kudos are also welcome.
Warm Regards,
Nikhil Thampi