Hi.
I need to query existing queries. I tried QRDS but didn’t succeed. This is what I have done:
I created two queries Query_A (id 16) and Query_B (id 18) which make use of the Python data source like this:
Query_A:
result = {
"columns": [
{
"name": "month",
"type": TYPE_STRING,
"friendly_name": "month"
},
{
"name": "apples",
"type": "integer",
"friendly_name": "apples"
},
{
"name": "bananas",
"type": "integer",
"friendly_name": "bananas"
}
],
"rows": [
]
}
result['rows'].append(
{
"month":"jan",
"apples":1,
"bananas":2
}
)
result['rows'].append(
{
"month":"feb",
"apples":3,
"bananas":4
}
)
Query_B:
result = {
"columns": [
{
"name": "month",
"type": TYPE_STRING,
"friendly_name": "month"
},
{
"name": "apples",
"type": "integer",
"friendly_name": "apples"
},
{
"name": "bananas",
"type": "integer",
"friendly_name": "bananas"
}
],
"rows": [
]
}
result['rows'].append(
{
"month":"feb",
"apples":10,
"bananas":20
}
)
result['rows'].append(
{
"month":"mar",
"apples":30,
"bananas":40
}
)
Both queries work as expected. Now I created a query Query_C which makes use of the QRDS data source. This query works:
SELECT * FROM query_16;
Also this query works:
SELECT * FROM query_18;
But this does not work:
SELECT * FROM query_16,query_18;
The error message ist Error running query: no such table: query_18
I got the same error message with using JOIN statement. Is there a way to do queries like this? Also how to create such queries on queries as non tenchical user since this way a marketing guy would have to know about SQL which is rarely the case.
And how about parameters in QRDS queries? I read that parameters do not work (by now). I wonder how can the QRDS feature be usefull without parameterized queries on queries. Any way solve or to workaround this?
Thanks.