pyrooka / metabase-cubejs-driver

Connect Metabase with Cube.js.
GNU Affero General Public License v3.0
4 stars 6 forks source link

Can I use variables in native query #73

Closed devtothemoon closed 4 years ago

devtothemoon commented 4 years ago

I want to send some input variables like choose events when creating a funnel. But when I use {{variable}}, it can't work. Does the driver support variable in a native query?

*--- Cubejs 0.20.3 Driver version: lastest. Metabase: 0.36.3

pyrooka commented 4 years ago

I have never used native params and this feature is turned off at the moment: https://github.com/lili-data/metabase-cubejs-driver/blob/e82a82180ef49df1d1980f04f935e7dbe823a7dd/src/metabase/driver/cubejs.clj#L62 I check how does it work and try to implement it if possible.

pyrooka commented 4 years ago

WIP, some basic functionality is already working. I hope I can finish and release it tomorrow.

pyrooka commented 4 years ago

I have created a new release which supports variables in native queries. For now only text, number, date, filter: category are working. I will improve this in the future. Please try it and if you still have problems just reopen this issue. Thanks!