diff --git a/bijoe/engine.py b/bijoe/engine.py index a8a7b89..8838f59 100644 --- a/bijoe/engine.py +++ b/bijoe/engine.py @@ -209,7 +209,8 @@ class JSONDimensions(object): return [] if not self.__cache: with self.engine.get_cursor() as cursor: - sql = 'select distinct jsonb_object_keys(json_data) as a from formdata order by a' + sql = ('select distinct jsonb_object_keys(%s) as a from formdata order by a' + % self.engine_cube.json_field) cursor.execute(sql) self.__cache = [row[0] for row in cursor.fetchall()] return self.__cache