You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "shqcheng (via GitHub)" <gi...@apache.org> on 2025/02/14 08:02:08 UTC

[I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

shqcheng opened a new issue, #32258:
URL: https://github.com/apache/superset/issues/32258

   ### Bug description
   
   In sql lab, when use "union" to connect two sql statement and run the sql query, there is an error "database error"/"network error". 
   by the way, when using "sysdate" in sql query, the error is the same.
   
   ![Image](https://github.com/user-attachments/assets/fce5dbf1-fdab-4593-9e99-7dbdcfca4f17)
   
   ![Image](https://github.com/user-attachments/assets/d93130aa-0bd8-496a-8bcc-8f537dbdad80)
   
   the database connection parameters is below:
   
   ![Image](https://github.com/user-attachments/assets/246584ac-70e9-4604-95f8-81057f414537)
   
   superset version is 4.1.1
   
   ![Image](https://github.com/user-attachments/assets/5db59d1d-77cf-44bf-be03-58a78675dfc9)
   
   does anyone encounter it and solve it? Thanks for help!
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.1
   
   ### Python version
   
   3.10
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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-unsubscribe@superset.apache.org.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-2658537024

   <!-- Greeting -->
   Hey there, @shqcheng! I'm here to help you with any bugs, questions, or contributions you have for Superset. Let's get to the bottom of this together!
   
   <!-- Answer -->
   I found a similar closed issue related to Oracle database errors in Apache Superset. The issue titled "SQL Lab: Oracle Error (cx_Oracle.DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor" did not have a solution found in the comments <sup>[[1]](https://github.com/apache/superset/issues/1761)</sup>.
   
   For your specific issue with the UNION operation and the use of SYSDATE resulting in "Database error" or "Network error," common causes could include:
   
   1. **Database Errors:**
      - `SYNTAX_ERROR`: There might be a syntax error in the SQL query.
      - `CONNECTION_INVALID_HOSTNAME_ERROR`: The hostname provided can't be resolved.
      - `CONNECTION_PORT_CLOSED_ERROR`: The port is closed.
      - `CONNECTION_HOST_DOWN_ERROR`: The host might be down, and can't be reached on the provided port.
   
   2. **Network Errors:**
      - `FRONTEND_NETWORK_ERROR`: General network error on the frontend.
      - `FRONTEND_TIMEOUT_ERROR`: The frontend request timed out.
      - `BACKEND_TIMEOUT_ERROR`: The backend request timed out.
   
   These errors are mapped to specific issue codes that provide more detailed descriptions of the problems encountered <sup>[[2]](https://github.com/apache/superset/blob/master/superset/errors.py)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts)</sup>.
   
   You might want to check the database connection settings, ensure that the database server is reachable, and verify that there are no syntax errors in your SQL queries.
   
   
   <!-- 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/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/42d90af9-2ecd-478d-8d5a-edb2a51dc1d9?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: notifications-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-2920768763

   Is this still an issue on current `master`? There may be a limitation with the Oracle dbapi/db engine spec, but I don't know since I don't use Oracle. All I can say is that I use UNION reasonably often with other databases, and haven't run into issues like this, so I'm assuming it's oracle-specific.


-- 
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-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-2660713535

   hi there, what database do you use for these erroneous queries?


-- 
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-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "shqcheng (via GitHub)" <gi...@apache.org>.
shqcheng commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-2658544754

   Thanks for your response.
   
   Sorry it's not the mentioned cause as i don't use union, the sql query can run correctly.
   
   ![Image](https://github.com/user-attachments/assets/8c56ca03-ccb6-4af3-b9e3-0dacae810a40)


-- 
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-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "shqcheng (via GitHub)" <gi...@apache.org>.
shqcheng commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-2661740963

   oracle.
   &nbsp;
   
   
   走走停停
   ***@***.***
   
   
   
   &nbsp;
   
   
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人: "Đỗ Trọng ***@***.***&gt;; 
   发送时间: 2025年2月15日(星期六) 中午12:08
   收件人: ***@***.***&gt;; 
   抄送: ***@***.***&gt;; ***@***.***&gt;; 
   主题: Re: [apache/superset] error: database error or network error/ why sql query can&#39;t use union to connect two sql statement (Issue #32258)
   
   
   
   
   
   
   
   
   
   
   
   
      
   hi there, what database do you use for these erroneous queries?
   
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***&gt;
     hainenber left a comment (apache/superset#32258)
    
   hi there, what database do you use for these erroneous queries?
    
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***&gt;


-- 
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-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32258:
URL: https://github.com/apache/superset/issues/32258#issuecomment-3942511281

   Closing this issue due to extended inactivity (270+ days without response to maintainer's question).
   
   The reported version (Superset 4.1.1) is no longer supported. Apache Superset currently supports versions 5.x and 6.x.
   
   If you're still experiencing this Oracle SQL UNION issue on a supported version (5.x or 6.x), please feel free to open a new issue with:
   - Your current Superset version
   - Oracle database version
   - A reproducible example
   
   Thank you for your report!


-- 
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-unsubscribe@superset.apache.org

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


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


Re: [I] error: database error or network error/ why sql query can't use union to connect two sql statement [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #32258: error: database error or network error/ why sql query can't use union to connect two sql statement
URL: https://github.com/apache/superset/issues/32258


-- 
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-unsubscribe@superset.apache.org

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


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