Data from multiple datasources can be merged into a single dataset within Knowi. Simply send the data into the same entityName or identifier in the query file.
Example:
[
{
"entityName":"Visitor Data",
"dsName":"demoGA",
"gaMetrics":"ga:visitors,ga:newVisits",
"gaDimensions":"ga:date",
"gaDateRange":"10d",
"gaMaxResults":"1000",
"gaSort":"-ga:date",
"c9QLFilter":"select ga:visitors as Visitors, ga:newVisits as New Visits, ga:date as Date, \"GA Data\" as Type",
"frequencyType":"hour",
"frequency":2
"overrideVals":{
"replaceValuesForKey":["Date","Type"]
}
},
{
"entityName":"Visitor Data",
"dsName":"demoMongo",
"queryStr":"db.pagehits.find({hits: { $gte: 1}})",
"c9QLFilter":"select date(lastAccessTime) as Date, count(*) as Page Hits, \"Mongo Data\" as Type group by date(lastAccessTime) order by Date asc",
"frequencyType":"daily",
"frequency":1,
"startTime": "04:00",
"overrideVals":{
"replaceValuesForKey":["Date","Type"]
}
}
]
The above example gets data from Google Analytics and MongoDB (on a schedule) and inserts data into the Visitor Data dataset based on Date and Type.