Skip to content

Commit 9f68681

Browse files
committed
test: add aggregated dataset to testing ldm
risk: nonprod
1 parent 2423aeb commit 9f68681

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

tests-support/fixtures/demo_declarative_hierarchy.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,70 @@
23462346
],
23472347
"title": "Campaign channels"
23482348
},
2349+
{
2350+
"attributes": [
2351+
{
2352+
"description": "Category Agg",
2353+
"id": "campaign_channels.category_agg",
2354+
"sourceColumn": "category",
2355+
"sourceColumnDataType": "STRING",
2356+
"labels": [],
2357+
"tags": [
2358+
"Campaign channels"
2359+
],
2360+
"title": "Category"
2361+
}
2362+
],
2363+
"description": "Campaign channels per categories",
2364+
"facts": [],
2365+
"aggregatedFacts": [
2366+
{
2367+
"description": "Budget Agg",
2368+
"id": "budget_agg",
2369+
"sourceColumn": "budget",
2370+
"sourceColumnDataType": "INT",
2371+
"tags": [
2372+
"Campaign channels per category"
2373+
],
2374+
"sourceFactReference": {
2375+
"reference": {
2376+
"id": "budget",
2377+
"type": "fact"
2378+
},
2379+
"operation": "SUM"
2380+
}
2381+
}
2382+
],
2383+
"grain": [
2384+
{
2385+
"id": "campaign_channels.category_agg",
2386+
"type": "attribute"
2387+
}
2388+
],
2389+
"id": "campaign_channels_per_category",
2390+
"precedence": 1,
2391+
"references": [
2392+
{
2393+
"identifier": {
2394+
"id": "campaign_channels",
2395+
"type": "dataset"
2396+
},
2397+
"multivalue": false,
2398+
"sourceColumns": [
2399+
"campaign_channel_category"
2400+
],
2401+
"sourceColumnDataTypes": [ "STRING" ]
2402+
}
2403+
],
2404+
"tags": [
2405+
"Campaign channels per category"
2406+
],
2407+
"sql": {
2408+
"statement": "SELECT category, SUM(budget) FROM campaign_channels GROUP BY category",
2409+
"dataSourceId": "demo-test-ds"
2410+
},
2411+
"title": "Campaign channels per category"
2412+
},
23492413
{
23502414
"attributes": [
23512415
{

tests-support/upload_demo_layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def rest_op(op, url_path, data=None, raise_ex=True):
3535

3636
if response.status_code < 200 or response.status_code > 299:
3737
if raise_ex:
38-
raise Exception(f"Call to {url} failed - {str(response)}")
38+
raise Exception(f"Call to {url} failed - {str(response.text)}")
3939
else:
4040
return None
4141

0 commit comments

Comments
 (0)