Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this topic

Add a dynamic variable to a Hive view

avatar
Explorer

I would like to create a Hive view that would would include a dynamic variable that would give different output depending on what was done using the set command

 

The following doesn't work.

 

create view default.view_mikeg_test as
select * from prod_integration.dim_company where company_code = ${hiveconf:company_code};

 

This produces an error and will only work if I set the variable company_code first (i.e. set company_code = '7777') and then that value gets imbedded into the view.  That's not what I want.  I have tried to use single and double quotes around ${hiveconf:company_code} as suggested in other forums.  There has to be a simple solution to this.

 

Who agreed with this topic