Hello !
I’m Trying add one ELK as a datasource
The connection works good !
But When I try see the Schema show a error
On the logs I’ve the error below
[2022-01-12 21:15:46,654][PID:5162][WARNING][ForkPoolWorker-56758] task_name=redash.tasks.refresh_schema task_id=3d1cb444-12aa-40d2-9c29-29ca957fe2cb Failed refreshing schema for the data source: Swapback
1/12/2022 6:15:46 PM Traceback (most recent call last):
1/12/2022 6:15:46 PM File "/app/redash/tasks/queries.py", line 261, in refresh_schema
1/12/2022 6:15:46 PM ds.get_schema(refresh=True)
1/12/2022 6:15:46 PM File "/app/redash/models/__init__.py", line 155, in get_schema
1/12/2022 6:15:46 PM schema = sorted(query_runner.get_schema(get_stats=refresh), key=lambda t: t['name'])
1/12/2022 6:15:46 PM File "/app/redash/query_runner/__init__.py", line 142, in get_schema
1/12/2022 6:15:46 PM self._get_tables(schema_dict)
1/12/2022 6:15:46 PM File "/app/redash/query_runner/mssql.py", line 95, in _get_tables
1/12/2022 6:15:46 PM raise Exception("Failed getting schema.")
1/12/2022 6:15:46 PM Exception: Failed getting schema.
[2022-01-12 21:15:46,725][PID:5172][WARNING][ForkPoolWorker-56768] task_name=redash.tasks.refresh_schema task_id=f1a41e5e-d13f-46f3-8aae-5df50f599ab2 Failed refreshing schema for the data source: vpc
1/12/2022 6:15:46 PM Traceback (most recent call last):
1/12/2022 6:15:46 PM File "/app/redash/tasks/queries.py", line 261, in refresh_schema
1/12/2022 6:15:46 PM ds.get_schema(refresh=True)
1/12/2022 6:15:46 PM File "/app/redash/models/__init__.py", line 155, in get_schema
1/12/2022 6:15:46 PM schema = sorted(query_runner.get_schema(get_stats=refresh), key=lambda t: t['name'])
1/12/2022 6:15:46 PM File "/app/redash/query_runner/elasticsearch.py", line 173, in get_schema
1/12/2022 6:15:46 PM columns.extend(parse_doc(items))
1/12/2022 6:15:46 PM File "/app/redash/query_runner/elasticsearch.py", line 154, in parse_doc
1/12/2022 6:15:46 PM for field, description in doc['properties'].items():
1/12/2022 6:15:46 PM KeyError: 'properties'
Traceback (most recent call last):
1/12/2022 6:15:46 PM File "/app/redash/tasks/queries.py", line 261, in refresh_schema
1/12/2022 6:15:46 PM ds.get_schema(refresh=True)
1/12/2022 6:15:46 PM File "/app/redash/models/__init__.py", line 155, in get_schema
1/12/2022 6:15:46 PM schema = sorted(query_runner.get_schema(get_stats=refresh), key=lambda t: t['name'])
1/12/2022 6:15:46 PM File "/app/redash/query_runner/mongodb.py", line 217, in get_schema
1/12/2022 6:15:46 PM columns = self._get_collection_fields(db, collection_name)
1/12/2022 6:15:46 PM File "/app/redash/query_runner/mongodb.py", line 204, in _get_collection_fields
1/12/2022 6:15:46 PM for d in db[collection_name].find().sort([("$natural", -1)]).limit(1):
1/12/2022 6:15:46 PM File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 1169, in next
1/12/2022 6:15:46 PM if len(self.__data) or self._refresh():
1/12/2022 6:15:46 PM File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 1085, in _refresh
1/12/2022 6:15:46 PM self.__send_message(q)
1/12/2022 6:15:46 PM File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 975, in __send_message
1/12/2022 6:15:46 PM helpers._check_command_response(first)
1/12/2022 6:15:46 PM File "/usr/local/lib/python2.7/site-packages/pymongo/helpers.py", line 145, in _check_command_response
1/12/2022 6:15:46 PM raise OperationFailure(msg % errmsg, code, response)
1/12/2022 6:15:46 PM OperationFailure: {$natural: -1} is not supported
Any ideas how to fix it ?