What happens when you open a brand new workbook and connect to this data source again?
Mavis Liu I am having the same issue as described above. I opened a new workbook and created a new datasource. The problem still persists where tableau ignores the fields that were constructed from a JSON column. An example query of what I'm doing is below:
, json_extract(t.content, '$.body') as body
, json_extract(t.content, '$.url') as url
Tableau only returns the "id" field into my dataset and ignores the other two. I've tried this both as an extract and live. When I click on "preview results..." from the Edit Custom SQL dialog, I only see the id field.
Any help would be much appreciated.
Both json_extract and -> return fields of type JSON. Since Tableau doesn't have built-in JSON support, it can't read fields of type JSON.
Try using the ->> operator which will convert the value to a plain type. You can also use the json_unquote function to convert any JSON value to a plain field.