Denodo Json Source and Base View: 如何使 VQL 更接近传统 SQL 语法

huangapple go评论116阅读模式
英文:

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

问题

我有一个web服务API

在Denodo中,我虚拟化了以下API:

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

作为

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

这使我们在Denodo中能够这样写:

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

是否有任何方法可以以更传统的方式编写查询,例如:

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

我对Denodo相对新手。

谢谢,

英文:

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

答案1

得分: 1

在Denodo中,您可以使用IN子句来检查一个值是否存在于列表中:

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

这将返回与您原始查询相同的结果,但使用了更传统的IN操作符语法。

英文:

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.

huangapple
  • 本文由 发表于 2023年2月9日 01:34:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/75389665.html
  • denodo
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定