Hi,
I'm trying to download table data from Statistics Finland PX-Web API (documentation here http://pxnet2.stat.fi/api1.html). URL for example for the cube and the table containing population demographic data is: http://pxnet2.stat.fi/PXWeb/api/v1/fi/StatFin/vrm/vaerak/statfin_vaerak_pxt_001.px . Px-Web API can return table data in various formats, including csv and excel.
Using HTTPCaller and GET or/and JSON-reader I've been able to receive nested JSON containing list of all the different variables of the desired table, but the problem is that this request does NOT retrieve the actual data.
In my understanding I should send a specified JSON-query using GET/POST-command to API to be able to download the actual data. But I have no clue how to do this in FME. I've tried to go through JSON-readers schema scan using JSON-query, and I looked for the HTTPcaller but don't know if Query String Parameters or Body settings could help me with this. JSON-query should look somewhat like this:
{
"query": [
{
"code": "Vuosi",
"selection": {
"filter": "item",
"values": [
"2017"
]
}
},
{
"code": "Sukupuoli",
"selection": {
"filter": "item",
"values": [
"S"
]
}
},
{
"code": "Ikä",
"selection": {
"filter": "agg:1-vuotisikä.agg",
"values": [
"SSS"
]
}
},
{
"code": "Tiedot",
"selection": {
"filter": "item",
"values": [
"lkm"
]
}
}
],
"response": {
"format": "csv"
}
}
Any help (including sceencaps) to go futher with this is very much appreciated! :D
Best answer by mark2atsafe
View original