You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/11/23 10:37:38 UTC

[GitHub] [superset] cometta opened a new issue, #22206: spark sql connection has query issue

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

   1 bug)
   on the sql lab page -> `SEE TABLE SCHEMA` selectbox throw pop up error when press `refresh` icon,  the `schema` select box is working fine. the custom query textbox also working fine. see screenshot
   
   ![image](https://user-images.githubusercontent.com/187495/203525553-41a153e5-3fe1-42ee-9028-0a2bb8443184.png)
   
   
   2 bug)
   settings-> database connection-> select existing `Apache Spark SQL` -> click edit
   basic tab show empty, pop up
   `An error occurred while fetching databases: Object of type bytes is not JSON serializable`
   
   ![image](https://user-images.githubusercontent.com/187495/203525881-49c6d49b-d4bf-4346-ba6a-c95fdbbad37f.png)
   


-- 
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


[GitHub] [superset] eschutho commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
eschutho commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1325778700

   HI @cometta. Which version of the app are you on? 


-- 
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


[GitHub] [superset] xiaotiao commented on issue #22206: spark sql connection has query issue

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

   > I just tested this with the pyhive driver and didn't have any errors:
   > 
   > ```
   > from sqlalchemy.engine.url import make_url
   > make_url('hive://').get_driver_name() 
   > ```
   > 
   > returns `b'thrift'` Is this where the error is happening for you @xiaotiao?
   
   I discovered that json.dumps cannot deserialize bytes data, so I converted the b'thrift' object to a string using the decode() method.


-- 
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


[GitHub] [superset] eschutho commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
eschutho commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1334129213

   There was an existing issue on this, which I believe has been resolved. Can you pull again from master and test? 


-- 
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] spark sql connection has query issue [superset]

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

   Hopefully, the answer above is sufficient to close this thread. I'll do so anyway since it's been so long since there was a comment here. If this needs revisiting/reopening, just say the word.


-- 
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


[GitHub] [superset] xiaotiao commented on issue #22206: spark sql connection has query issue

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

   > I just tested this with the pyhive driver and didn't have any errors:
   > 
   > ```
   > from sqlalchemy.engine.url import make_url
   > make_url('hive://').get_driver_name() 
   > ```
   > 
   > returns `b'thrift'` Is this where the error is happening for you @xiaotiao?
   
   yes, my superset verison is 2.1.0, when click edit database button it will report exception: Object of type bytes is not JSON serializable, and I discovered that json.dumps cannot deserialize bytes data, so I converted the b'thrift' object to a string using the decode() method.


-- 
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


[GitHub] [superset] xiaotiao commented on issue #22206: spark sql connection has query issue

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

   it seems the json.dumps method error becase of wrong driver type when using Apache Spark. I modified the code as below and the response is right when click edit databse button
   
   `
   # method: models.core.Database.driver
       def driver(self) -> str:
           if isinstance(self.url_object.get_driver_name(),bytes):
               return bytes(self.url_object.get_driver_name()).decode("utf-8")
           return self.url_object.get_driver_name()
   `


-- 
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


[GitHub] [superset] xiaotiao commented on issue #22206: spark sql connection has query issue

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

   > 
   
   I discovered that json.dumps cannot deserialize bytes data, so I converted the b'thrift' object to a string using the decode() method.


-- 
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


[GitHub] [superset] cometta commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
cometta commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1335971098

   it happen for hive connector as well. 


-- 
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


[GitHub] [superset] si1verwind17 commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
si1verwind17 commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1369571941

   I also have this problem as well when connect with sparksql, it show an error when clicking at "SEE TABLE SCHEMA". However, it work fine when I query with sql statement (SELECT * FROM table)


-- 
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


[GitHub] [superset] eschutho commented on issue #22206: spark sql connection has query issue

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

   I just tested this with the pyhive driver and didn't have any errors:
   ```
   from sqlalchemy.engine.url import make_url
   make_url('hive://').get_driver_name() 
   ```
   returns `b'thrift'`
   Is this where the error is happening for you @xiaotiao?


-- 
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] spark sql connection has query issue [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22206: spark sql connection has query issue
URL: https://github.com/apache/superset/issues/22206


-- 
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


[GitHub] [superset] Udutta52 commented on issue #22206: spark sql connection has query issue

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

   The issue is with the pyhive package installed in your machine.
   You can resolve it by installing this version of pyhive:
   `pip install git+https://github.com/dropbox/PyHive.git`


-- 
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


[GitHub] [superset] cometta commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
cometta commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1325816153

   @eschutho i pull from master branch, run on docker


-- 
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


[GitHub] [superset] cometta commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
cometta commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1334649968

   i just pulled a few minutes ago , git pull,  docker-compose-non-dev.yml pull , docker-compose-non-dev.yml up , still having same error like on the screenshots


-- 
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


[GitHub] [superset] eschutho commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
eschutho commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1335923173

   I don't have spark sql set up, but I'm unable to reproduce on other databases. Can you confirm by testing this on another database to make sure that it's not just happening on spark? If it's still happening with say postgres or even sqlite, then I would try to delete your docker images and pull from docker latest again instead of pulling from github. 


-- 
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


[GitHub] [superset] meyergin commented on issue #22206: spark sql connection has query issue

Posted by GitBox <gi...@apache.org>.
meyergin commented on issue #22206:
URL: https://github.com/apache/superset/issues/22206#issuecomment-1363925161

   > 
   
   I've pulled latest master branch, this bug only happens on spark which used pyhive package.


-- 
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