How to collect data using RSS plugin
This article will show you how to create a Metric or Report using a RSS as a data source. It assumes that you have already established connectivity to RSS
1. Access New > Report
- Name the Report: Define a unique descriptive name of your element
- Reported: choose the measurement interval from the drop-down list
- Category: define a category this element belongs to
- To move on to defining data collection details, click Next: Define Report
2. Full Editor displays the Data Collection tab
- Data Source: select the account you have created for IBM Cognos
- Data Collection Schedule: Specify the trigger that will be used to collect the data for your report
- Plug-in Command: Enter a plugin command directly or utilize the visual editor to construct a query
- Once you are ready with you command, click Show Data
2.1. Using the RSS Query Builder.
Select desired fields, and any filters and grouping parameters
Save
2.2. Query Syntax Examples
- Return ALL fields:
{
"select":["*"]
}
- Select the number of articles that contain a string of text (“value”:”your search term(s) here”) along with the publication date (pubDate):
http://rss.nytimes.com/services/xml/rss/nyt/US.xml
The values are not case sensitive, e.g., “Amazon” and “amazon” will return the same result. The "contains","value":" statement will work on multiple terms as an exact phrase match. For the title, “Amazon increases customers worldwide” you can include
{"column":"title","condition":"contains","value":"Amazon increases"} but inexact phrases will not work like:
{"column":"title","condition":"contains","value":"Amazon customers"}. To do this you need to create separate conditions:
{
"select":["pubDate","COUNT(*)"],
"where":[{"column":"title","condition":"contains","value":"amazon"},
{"column":"title","condition":"contains","value":"customers"},
{"column":"description","condition":"contains","value":"netflix"}],
"group":["pubDate GRANULARITY DAY"]
}