evliya commented on issue #16723:
URL: https://github.com/apache/superset/issues/16723#issuecomment-2908905150

   I'm getting errors with Superset 4.1.2 and AWS Opensearch. I've tried 
@Unanimad 's solution and installed the required libraries in the docker file:
   
   pip install elasticsearch==7.13.4 sqlalchemy==1.4.9 
elasticsearch-dbapi[opendistro] opensearch-py
   
   I used the following URL syntax for database connection:
   
   
odelasticsearch+https://username:password$@my-opensearch-domain.my-region.es.amazonaws.com:443
   
   I can create a database connection, but while trying to create a dataset, I 
get the following error (the index that I'm trying to connect is named 
"cloudwatch", and that's an alias btw):
   
   > 2025-05-26 
07:51:37,370:WARNING:superset.views.error_handling:SupersetErrorException
   > Traceback (most recent call last):
   >   File "/app/superset/sql/parse.py", line 257, in _parse
   >     return sqlglot.parse(script, dialect=dialect)
   >   File "/usr/local/lib/python3.10/site-packages/sqlglot/__init__.py", line 
102, in parse
   >     return Dialect.get_or_raise(read or dialect).parse(sql, **opts)
   >   File 
"/usr/local/lib/python3.10/site-packages/sqlglot/dialects/dialect.py", line 
919, in parse
   >     return self.parser(**opts).parse(self.tokenize(sql), sql)
   >   File "/usr/local/lib/python3.10/site-packages/sqlglot/parser.py", line 
1395, in parse
   >     return self._parse(
   >   File "/usr/local/lib/python3.10/site-packages/sqlglot/parser.py", line 
1467, in _parse
   >     self.raise_error("Invalid expression / Unexpected token")
   >   File "/usr/local/lib/python3.10/site-packages/sqlglot/parser.py", line 
1508, in raise_error
   >     raise error
   > sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 2, 
Col: 14.
   >   SELECT *
   > FROM `default`.cloudwatch
   >  LIMIT 100
   >  
   >  The above exception was the direct cause of the following exception:
   > 
   > Traceback (most recent call last):
   >   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, 
in full_dispatch_request
   >     rv = self.dispatch_request()
   >   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, 
in dispatch_request
   >     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   >   File 
"/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py",
 line 95, in wraps
   >     return f(self, *args, **kwargs)
   >   File "/app/superset/views/base_api.py", line 119, in wraps
   >     duration, response = time_function(f, self, *args, **kwargs)
   >   File "/app/superset/utils/core.py", line 1364, in time_function
   >     response = func(*args, **kwargs)
   >   File "/app/superset/utils/log.py", line 303, in wrapper
   >     value = f(*args, **kwargs)
   >   File "/app/superset/databases/api.py", line 1024, in table_metadata
   >     payload = database.db_engine_spec.get_table_metadata(database, table)
   >   File "/app/superset/db_engine_specs/base.py", line 1079, in 
get_table_metadata
   >     return get_table_metadata(database, table)
   >   File "/app/superset/databases/utils.py", line 100, in get_table_metadata
   >     "selectStar": database.select_star(
   >   File "/app/superset/models/core.py", line 719, in select_star
   >     return self.db_engine_spec.select_star(
   >   File "/app/superset/db_engine_specs/base.py", line 1689, in select_star
   >     sql = SQLScript(sql, engine=cls.engine).format()
   >   File "/app/superset/sql/parse.py", line 612, in __init__
   >     self.statements = statement_class.split_script(script, engine)
   >   File "/app/superset/sql/parse.py", line 317, in split_script
   >     ast = cls._parse(remainder, engine)[0]
   >   File "/app/superset/sql/parse.py", line 260, in _parse
   >     raise SupersetParseError(
   > superset.exceptions.SupersetParseError: Error parsing near '`' at line 2:14


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to