Skip to content

Commit

Permalink
Merge pull request #128 from keenlabs/jm_UpdateCachedDatasetsBranch
Browse files Browse the repository at this point in the history
Datasets
  • Loading branch information
masojus authored Nov 11, 2017
2 parents 676e52f + f73aa1d commit a528e6f
Show file tree
Hide file tree
Showing 41 changed files with 3,277 additions and 155 deletions.
23 changes: 23 additions & 0 deletions Keen.NET.Test/ApiResponses/GetDatasetDefinition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"dataset_name": "count-purchases-gte-100-by-country-daily",
"display_name": "Count Daily Product Purchases Over $100 by Country",
"query": {
"project_id": "5011efa95f546f2ce2000000",
"analysis_type": "count",
"event_collection": "purchases",
"filters": [
{
"property_name": "price",
"operator": "gte",
"property_value": 100
}
],
"timeframe": "this_500_days",
"interval": "daily",
"group_by": [ "ip_geo_info.country" ]
},
"index_by": [ "product.id" ],
"last_scheduled_date": "2016-11-04T18:52:36.323Z",
"latest_subtimeframe_available": "2016-11-05T00:00:00.000Z",
"milliseconds_behind": 3600000
}
52 changes: 52 additions & 0 deletions Keen.NET.Test/ApiResponses/GetDatasetResults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"result": [
{
"timeframe": {
"start": "2016-11-02T00:00:00.000Z",
"end": "2016-11-03T00:00:00.000Z"
},
"value": [
{
"item.name": "Golden Widget",
"result": 0
},
{
"item.name": "Silver Widget",
"result": 18
},
{
"item.name": "Bronze Widget",
"result": 1
},
{
"item.name": "Platinum Widget",
"result": 9
}
]
},
{
"timeframe": {
"start": "2016-11-03T00:00:00.000Z",
"end": "2016-11-04T00:00:00.000Z"
},
"value": [
{
"item.name": "Golden Widget",
"result": 1
},
{
"item.name": "Silver Widget",
"result": 13
},
{
"item.name": "Bronze Widget",
"result": 0
},
{
"item.name": "Platinum Widget",
"result": 3
}
]
}
]
}
60 changes: 60 additions & 0 deletions Keen.NET.Test/ApiResponses/ListDatasetDefinitions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"datasets": [
{
"project_id": "PROJECT_ID",
"organization_id": "ORGANIZATION_ID",
"dataset_name": "DATASET_NAME_1",
"display_name": "a first dataset wee",
"query": {
"project_id": "PROJECT_ID",
"analysis_type": "count",
"event_collection": "best collection",
"filters": [
{
"property_name": "request.foo",
"operator": "lt",
"property_value": 300
}
],
"timeframe": "this_500_hours",
"timezone": "US/Pacific",
"interval": "hourly",
"group_by": [
"exception.name"
]
},
"index_by": [
"project.id"
],
"last_scheduled_date": "2016-11-04T18:03:38.430Z",
"latest_subtimeframe_available": "2016-11-04T19:00:00.000Z",
"milliseconds_behind": 3600000
},
{
"project_id": "PROJECT_ID",
"organization_id": "ORGANIZATION_ID",
"dataset_name": "DATASET_NAME_10",
"display_name": "tenth dataset wee",
"query": {
"project_id": "PROJECT_ID",
"analysis_type": "count",
"event_collection": "tenth best collection",
"filters": [],
"timeframe": "this_500_days",
"timezone": "UTC",
"interval": "daily",
"group_by": [
"analysis_type"
]
},
"index_by": [
"project.organization.id"
],
"last_scheduled_date": "2016-11-04T19:28:36.639Z",
"latest_subtimeframe_available": "2016-11-05T00:00:00.000Z",
"milliseconds_behind": 3600000
}
],
"next_page_url": "https://api.keen.io/3.0/projects/PROJECT_ID/datasets?limit=LIMIT&after_name=DATASET_NAME_10",
"count": 4
}
Loading

0 comments on commit a528e6f

Please sign in to comment.