denodo

Denodo Json Source and Base View: how to make VQL more traditional SQL syntax


I have a web service api

In Denodo, I have virtualized the following api:

https://delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501,201601,201701

as

https://delphi.cmu.edu/epidata/fluview/?regions=@{regions}&epiweeks=@{epiweeks}

This allows us, in Denodo, to write the following:

Select * from bv_fluview where epiweeks = '201501,201601,201701' and regions = 'nat'

Is there any way where the query could be written in a more traditional way such as:

   Select * from bv_fluview where epiweeks in ('201501','201601','201701') and regions = 'nat'

I am relatively new to Denodo.

Thanks, Dan


Solution

  • In Denodo, you can use the IN clause to check if a value is present in a list

    SELECT * 
    FROM bv_fluview 
    WHERE epiweeks IN ('201501','201601','201701') 
    AND regions = 'nat'
    

    This would return the same result as your original query but with a more conventional syntax for the IN operator.