【问题标题】:YQL showing results from multiple sourcesYQL 显示来自多个来源的结果
【发布时间】:2014-08-18 05:10:07
【问题描述】:

从人中选择 *

<root>
<row>
  <name>a</name>
  <address>address1</address>
  <loc_id>1</loc_id>
</row>
<row>
  <name>b</name>
  <address>address2</address>
  <loc_id>2</loc_id>
</row>
</root>

从位置中选择 *

<root>
<row>
  <id>1</id>
  <name>location1</name>
  <details>locationdetails1</details>
</row>
<row>
  <id>2</id>
  <name>location2</name>
  <details>locationdetails2</details>
</row>
</root>

无论如何,在 YQL 中我们可以在 people.loc_idlocation.id 上连接这两个数据源并返回包含所有值的结果。我知道有命名冲突的可能性,但无论如何也解决这个问题?所以基本上任何可能有助于返回如下结果或类似结果的 yql 查询。

<root>
<row>
  <name>a</name>
  <address>address1</address>
  <loc_id>1</loc_id>
  <location.id>1</location.id>
  <location.name>location1</location.name>
  <location.details>locationdetails1</location.details>
</row>
<row>
  <name>b</name>
  <address>address2</address>
  <loc_id>2</loc_id>
  <location.id>2</location.id>
  <location.name>location2</location.name>
  <location.details>locationdetails2</location.details>
</row>
</root>

YQL forums上交叉发布

【问题讨论】:

    标签: yql


    【解决方案1】:

    不,这在 YQL 中是不可能的。它没有这样组合结果的能力。

    相反,在您的应用程序中(无论您有什么调用 YQL)都可以进行两次调用并合并结果。

    【讨论】:

      猜你喜欢
      • 2021-05-25
      • 2020-05-12
      • 2023-03-05
      • 2019-08-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多