That’s right! Enter any value in your Parameter field(s) and have data written to a database (choose your flavor). Keep history, study filter trends (and timing), leverage it as a form-enabler and/or data analytics tool. Now Tableau *can* take user input and write that input to a database.
I’ll let that soak in…Filter/Parameter values being written back to a database.
Okay, here’s how to do it.
Make a Dashboard and toss some Parameters on it (can be any data type). NOTE: you can also use filters because that data is also logged. But, parameters are fun because so many people think they aren’t dynamic. It’s time to prove they are, in fact, very dynamic.
Use the logs.
Every event performed on a dashboard/workbook is logged. It’s just a matter of finding the right key/value pair, parsing, and then adding to a database. For example, if I have a free-form parameter value and I enter, ‘2,000,000’, it is logged along with the parameter number (note this is different than your parameter caption) as well as user, session, request, and a bunch of other stuff.
This means you can keep a history of who changed the parameter, the old value, the new value, and a whole bunch of other stuff.
Create some tables in your database. (NOTE: you only do this 1x)
This is simple if you just want to keep a log of the changing parameter values. If, on the other hand, you want to keep performance metrics, track which workbook/sheets are being used, then I’d recommend you also parse and create analysis on the Apache logs. I’ve talked about this a lot here, here, here and here.
Parse the logs and add to the tables.
Simple since the main log is in json format. Use some PowerShell and you can do this in a simple function/module: 1 for pulling the log data and 1 for adding to a database.
If you have a log analytics tool in place, this becomes insanely easy since all your logs are centralized (they are, right?!). If not, you can just parse the log file in the default directory.
- As a light-CRM
- Data ‘picker’ tool for template dashboards (for example: choose between line/bar chart, etc and data gets written to database and picked up by another script that makes the workbook for you, based on those choices).
- Replacement for embedded forms
- Full cycle analytics (from data entry to data analysis, quantified self stuff)
- Triggers (for example: User A picks Parameter B and, a csv and/or png file is delivered)
- Usage data about dashboards (for example: if you create 15 parameters and users only ever use 2, then you can remove the unnecessary stuff).
- Permission approval form (for example: User A request permission to Dashboard B)
- Subscription forms
- Form for filtered queries (for example: use fields to help analysts who might not know SQL to create custom SQL based on set fields/values)
- And more!