Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

default values in hive table

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..?

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

1 Reply
Anonymous
Not applicable
Author

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