GitHub user dosubot[bot] added a comment to the discussion: Querying Superset dataset using jinja
<!-- Answer --> I found a similar unsolved discussion on using SQL templating in datasets, which might be relevant to your issue: [How to use sql templating in dataset](https://github.com/apache/superset/discussions/32215) <sup>[[1]](https://github.com/apache/superset/discussions/32215)</sup>. Regarding your specific issue with the `ORA-00907: missing right parenthesis` error, it seems like there might be a problem with how the `dataset` function is being used in your Jinja template. The `dataset` function is expected to generate a subquery, and the error might be related to how Oracle handles the generated SQL. Here are a few things to check and try: 1. **Verify Dataset Configuration**: Ensure that the dataset with ID 115 is correctly configured in Superset, including its columns and any custom SQL expressions. 2. **Check SQL Syntax**: The error message suggests a syntax issue. Ensure that the SQL generated by the `dataset` function is valid for Oracle. You might need to manually inspect the generated SQL to identify any syntax issues. 3. **Test with a Simple Query**: Try running a simpler query without the `dataset` function to ensure that the connection and basic query execution are working correctly. 4. **Review Jinja Context**: Make sure that the Jinja context is correctly set up and that any necessary macros or functions are available. If these steps don't resolve the issue, you might need to manually construct the SQL query to ensure compatibility with Oracle's syntax requirements. <!-- 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/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7528e8ff-00db-433c-99fa-3e350d0d7e76?feedback_type=other)</sup> GitHub link: https://github.com/apache/superset/discussions/32788#discussioncomment-12577680 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
