Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rbk_tal
Contributor
Contributor

tHiveInput - Extracting Empty Strings as NULL

Hi all,

I currently have a simple job extracting data from Hive and load into target database.

I am currently using a tHiveInput component to extract from Hive and load using a tDbOutput component.

We have several fields having empty strings which I expect to get loaded into the target as NULLs.

Currently I am using a tmap to check if they are empty and then load them as NULL. But considering the number of columns involved the development process is becoming difficult. Is there any settings we can set to get the expected result ? Maybe something in the Hadoop Settings or Hive Settings in the Advanced Tab of the tHiveInput component ?

Thanks in advance for all the help.

Cheers,

RBK

Labels (4)
3 Replies
manodwhb
Champion II
Champion II

@rbk_tal ,Write some routine code and call the same for all the columns to empty to null.

 

rbk_tal
Contributor
Contributor
Author

Thank you so much for your response....We will give that a try....But that would still mean I need to create separate jobs for each tables right since the structure is different for each table...Any setting that we can provide on the Hive or Hadoop properties that would be applicable to all such columns ?

 

Goal is to have a single job - extracting from source and loading into target using Dynamic schema for all the tables we have in Hive.

rbk_tal
Contributor
Contributor
Author

The values are loaded in Hive as NULL, meaning if I query the hive table checking for the condition where a specific column is NULL, I am able to get results. I merely want the output as NULL from the tHiveInput component. Would be great if there is any setting I can set so that I get this value as NULL instead of empty strings.