创建管道以及如何隔离数据的基本帮助
我正在创建一个基本上需要遵循以下工作流程的管道:
- 从网站读取 XML 提要(已经通过获取数据来完成)
- 获取它的一些信息(通过使用重命名来完成,以便可以将子元素使用所有项目创建)
根据此信息,我将提取一个我想通过以下 YQL 运行的 URL:
使用“http://javarants.com/yql/javascript.xml”作为j; select * from j where code='response.object = y.rest("http://www.my_url.com").followRedirects(false).get().headers.location;'
然后我想获取这个 URL,并更新已经生成的 URL,以便它可以通过我的管道返回
我不确定我说得是否清楚,但我在使用雅虎管道隔离事物时遇到了麻烦。基本上,我想获取重命名模块上的其中一项返回的字符串,对其进行一些处理(例如通过 YQL 运行该 URL),然后返回它以更新我的输出,这样我就有了新创建的 URL由我的 YQL 返回
另外,我想知道如何修改 YQL 返回的这个新创建的 URL,例如我想更改它的查询字符串属性。
这是我的管道现在的样子:
预先感谢您的帮助。
I'm creating a pipe that basically needs to follow the work flow as follows:
- Read an XML feed from a website (already does it by fetch data)
- Grab some information of it (does it by using rename so a sub-element can be created with all the items)
Off this information, I'll be extracting a URL which I'd like to run through the following YQL:
use 'http://javarants.com/yql/javascript.xml' as j; select * from j where code='response.object = y.rest("http://www.my_url.com").followRedirects(false).get().headers.location;'
I then want to take this URL, and update the URL already generated, so it can be returned by my pipe
I'm not sure I'm being very clear, but I'm having trouble with isolating things with Yahoo pipes. Basically I'd like to get a string returned by one of the items on my rename module, do some work with it (say run that URL through YQL), and then return it to update my output, so I have the newly created URL returned by my YQL
Also, I'd like to know how to modify this newly created URL returned by YQL is for example I wanted to change query string attributes of it.
Here's what my pipe looks like now:
Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了回答我自己的问题,最终循环遍历我的属性,并在其中添加一个项目生成器(用于多个项目)。
然后我发出结果,而我返回的唯一 XML 正是我需要的。
简单且真正实用:
To answer my own question, ended up looping through my attributes, and adding an item builder (for multiple items) inside of it.
I then emit the results, and the only XML I get back, is the one I need.
Simple and really functional as such: