【发布时间】:2022-01-26 10:15:00
【问题描述】:
我通过 sqlalchemy-drill 将 Apache Superset 与 apache Drill 连接起来。 这是连接:
"type": "http",
"cacheResults": true,
"connections": {
"get": {
"url": "http://localhost:5500/",
"method": "GET",
"headers": null,
"authType": "none",
"userName": null,
"password": null,
"postBody": null,
"params": null,
"dataPath": null,
"requireTail": true,
"inputType": "json",
"xmlDataLevel": 1
}
},
"timeout": 5,
"proxyType": "direct",
"enabled": true
在 Superset 中我获取数据:
SELECT * FROM api.get.`link`
但在 api 中,我需要通过“link/1”、“link/2”等动态 url 获取数据。 我正在尝试使用 Jinja 模板将 urla 参数插入查询:
SELECT * FROM api.get.{{ url_param('url') }}
然后在仪表板中使用诸如“http://localhost:8088/superset/dashboard/1/?url=link/1”之类的url来访问参数?但它不起作用。
有没有办法使用动态url从Superset访问api?
【问题讨论】:
标签: apache-superset apache-drill