Connect Redash and save analytic queries

Start with the shared setup and dataset. The versioned observations below use the MatrixOne build identified in the overview.

Configure and query

Install Redash and initialize its application database/workers following upstream deployment instructions. The tested native MySQL runner was from Redash 26.9.0, bundled with mysqlclient 2.1.1.

  1. Add a MySQL datasource in datasource settings. Set host MO_HOST, port 6001, database bi_tutorial, username and password. Match SSL options to your instance.

  2. Check the connection with SELECT 1, then create a query using the shared total SQL. The runner’s internal configuration keys are host, port, user, passwd, db and use_ssl; do not mistake these for the visible field labels.

  3. Save the category query as Net amount by category. After executing it, check A=130.000000 and B=280.000000 in the table.

  4. In a deployed UI, a bar visualization uses category as its grouping column and net_amount as the value. Add the saved visualization to a dashboard only after checking the returned data. UI visualization, scheduled refresh and dashboard behavior need their own validation.

Decimal precision and version differences

The current runner connected and returned correct native Decimal results. Redash’s production JSON encoder converts Decimal values to float, so large/high-precision amounts can lose precision after the database query. Run the shared large-Decimal check and inspect serialized/exported results before relying on financial values. Correct native query values do not establish exact browser arithmetic.

An older Redash 10.1.0 / mysqlclient 1.4.6 combination failed authentication on the same MatrixOne binary. The working newer runner is not evidence that an engine fix resolved that older failure; see #29957.

Validation covered the native query runner and the actual JSON serialization path, not a full Redash web deployment, scheduler or browser dashboard. See the shared metric definitions to avoid adding overlapping distinct counts or averaging row-level ratios.