dosubot[bot] commented on issue #31853:
URL: https://github.com/apache/superset/issues/31853#issuecomment-2591745713

   <!-- Greeting -->
   Hey there, @chshedra! I'm here to assist you with any bugs, questions, or 
contributions. Let's work together to resolve the issue you're facing.
   
   <!-- Answer -->
   The issue you're encountering with the `sqlalchemy-mongobi` connector and 
numeric table names wrapped in backticks seems to be related to changes in the 
SQL parsing logic in Superset 4.1.1. Specifically, the `sqlglot` library, which 
Superset uses for SQL parsing, might be handling backticks differently in this 
version.
   
   In Superset 4.1.1, there were several changes to the SQL parsing logic, 
including handling of Jinja templating and more lenient logic for certain SQL 
expressions 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md)</sup>.
 However, it seems that the handling of backticks, especially with numeric 
table names, might not be fully compatible with the `sqlalchemy-mongobi` 
connector when using the "Other" database option.
   
   Your temporary workaround of forcing the MySQL dialect in the `_parse` 
function is a practical short-term solution, but as you mentioned, it's not 
ideal for long-term use. This suggests that the default dialect used for the 
"Other" database option might not be handling backticks as expected.
   
   To address this issue more permanently, you might consider:
   
   1. **Custom DB Engine Spec**: Implementing a custom database engine 
specification for the `sqlalchemy-mongobi` connector that explicitly sets the 
SQL dialect to MySQL. This would ensure consistent parsing behavior without 
modifying the core Superset code.
   
   2. **Contributing a Fix**: If you're comfortable with the codebase, you 
could contribute a fix to the Superset repository that addresses this parsing 
issue for the "Other" database option, potentially by improving the handling of 
backticks in the default dialect.
   
   3. **Configuration Adjustments**: Check if there are any configuration 
options within `sqlglot` or Superset that allow for more flexible handling of 
backticks or numeric table names.
   
   These steps could help in resolving the issue without relying on manual code 
changes.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/fec5ca52-898f-4003-b10a-522d77665b51?feedback_type=other)</sup>
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to