We are having lots of great luck using metabase for reporting and visualizations. Great work.
We have started trying to embed metabase into our web-based interface. While everything looks good we are making the filters accessible however we have encountered one issue. We can change the parameters of the filters (in this case they are date filters) and the report updates perfectly yet when we click the export button at the bottom (CSV or Excel) the report exports but none of the filters are applied. Has anyone else encountered this? Am I missing something configuration-wise?
Looking at this further, it seems that CSVexport when non embedded calls the API “query/csv” with a form post where parameters are placed in hidden inputs …
When embedded it uses a different endpoint “/embed/question” for this call followed by the embed token and I do not see any hidden input elements as when this is used non-embedded.
How are query parameters passed to the /embed/question endpoint? Is this the intention of the hash or should I expect to see form input elements as well? Seems to me that when embedded the filtering mechanism is not working correctly in some way but I’m not sure exactly what the intention of this is when embedded in an iframe.
Could really use some help here as this is holding up/limiting our ability to use Metabase significantly.
Thanks a ton Sameer! It definitely seems fishy. It seems to me that the buttons form token is always inherited from what is passed into the iframe. If I generate a token with the parameters specified the export works fine because it is using that token with the parameters but it does not seem that when you set the filters on the question that the token is repacked with the specified parameters at all. At least that is my guess based on inspecting the browser activity.
In addition, it seems that when you set the filters they are added as parameters on the iframe URL ie. ?start_date=DATE
If I try just hacking the url and saying url/token.csv?start_date=DATE that does not seem to works so there may be a disconnect between how tokens are used when embedding the question and how the csv/excel/json buttons are supposed to react to those changes.
I am using Metabase Public embed iframe on my web site. The metabase question has 2 parameters which I pass as querystring to iframe URL at load from my web site as the parameter values are dynamic in nature.
I am also facing the same problem as mentioned above by @PayloadDean. In my case, the excel output is always generated based on the default parameter, irrespective of the value I pass to iframe.