2018-05-25 13:44:37 -04:00
|
|
|
SELECT
|
|
|
|
jsonb_pretty(r.x)
|
|
|
|
FROM
|
|
|
|
tps.srce_set(
|
|
|
|
$$
|
|
|
|
{
|
|
|
|
"name": "DMAPI",
|
|
|
|
"type": "csv",
|
|
|
|
"schemas": {
|
|
|
|
"default": [
|
|
|
|
{
|
|
|
|
"path": "{doc,origin_addresses,0}",
|
|
|
|
"type": "text",
|
|
|
|
"column_name": "origin_address"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "{doc,destination_addresses,0}",
|
|
|
|
"type": "text",
|
|
|
|
"column_name": "destination_address"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "{doc,rows,0,elements,0,distance,value}",
|
|
|
|
"type": "numeric",
|
|
|
|
"column_name": "distince"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "{doc,rows,0,elements,0,duration,value}",
|
|
|
|
"type": "numeric",
|
|
|
|
"column_name": "duration"
|
|
|
|
}
|
|
|
|
]
|
2018-05-25 14:03:01 -04:00
|
|
|
},
|
|
|
|
"constraint": [
|
2018-05-25 14:36:24 -04:00
|
|
|
"{doc,origin_addresses}",
|
|
|
|
"{doc,destination_addresses}"
|
2018-05-25 14:03:01 -04:00
|
|
|
]
|
2018-05-25 13:44:37 -04:00
|
|
|
}
|
|
|
|
$$
|
|
|
|
) r(x);
|