Yes it is better to push columns to the view so that users can filter on them.

Alternatively you can use hpl/sql on Hive.

I think there are very few (if any) use cases to support parametrized views .

> On 2. Oct 2017, at 16:12, Elliot West <tea...@gmail.com> wrote:
> 
> Hello,
> 
> Does any version of Hive support parameterized views. I'm thinking of 
> something like the following contrived example:
> 
> CREATE VIEW x AS
>   SELECT a
>   FROM y
>   WHERE date = ${mydate}
> 
> I've not been able to get this to work in Hive 1.2.1 or 2.1.0 and wonder if 
> this is the intended behavior, or I'm not constructing the view correctly.
> 
> Is it perhaps better instead to push up the filter columns to the view so 
> that they are accessible to the caller there?:
> 
> CREATE VIEW x AS
>   SELECT a, date
>   FROM y
> 
> Would this have any limitations in comparison with the variable substitution 
> approach?
> 
> Thanks,
> 
> Elliot.
> 

Reply via email to