SQL queries with Json field fails

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

Technical details:

  • Redash Version:9.0.0(beta)
  • Browser/OS: Firefox / Windows 10
  • How did you install Redash:Self-hosted through docker

When I was trying to use Redash queries with a postgres database. For the following query to be used
with a JSON based field is failing in Redash as shown in screenshot?

select data->field1
from all_orders

I would loved to know if Redash actually supports SQL queries based on JSON data

Have you tried putting the element name in quotes i.e.

select data → ‘deliveryMethod’
from all_orders_for_reporting

Correct case is important when querying JSON.

1 Like

It worked. Yeah redash supports Json based queries. It was the issue of typo in my query.