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/29 23:54:18 UTC

[GitHub] [superset] nagarajmmu opened a new issue, #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   Hi Team
   
   I have installed superset with **docker** container, logged in to superset.
   **I wanted to connect to Azure Databricks**. I have followed the below steps.
   1. I have created "requirements-local.txt" file in /superset/docker/ folder.
   2. Added "databricks-dbapi[hive,odbc,sqlalchemy]" in "requirements-local.txt" file.
   3. Ran "docker-compose build --force-rm" command to build.
   4. Ram "docker-compose -f docker-compose-non-dev.yml up" command to run the docker.
   5. Superset is up and running and able to login.
   
   #### How to reproduce the bug
   
   1. Go to Data -> "Connect a database"
   2. Select "Databricks SQL Endpoint" in "SUPPORTED DATABASES" dropdown .
   3. Provide "databricks+pyhive://token:{access_token}@{server_hostname}:{port}/{database_name}" URL details from Databricks, for "SQLALCHEMY URI" 
   4. Provide "{"connect_args": {"http_path": "sql/protocolv1/o/****"}}" with Http Path, in ADVANCED > Other > ENGINE PARAMETERS.
   5. Click on "TEST CONNECTION"
   6. Below ERROR occurred 
   ERROR:
   superset_app            | SupersetErrorsException
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/app/superset/databases/commands/test_connection.py", line 102, in run
   superset_app            |     with database.get_sqla_engine_with_context() as engine:
   superset_app            |   File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
   superset_app            |     return next(self.gen)
   superset_app            |   File "/app/superset/models/core.py", line 372, in get_sqla_engine_with_context
   superset_app            |     yield self._get_sqla_engine(schema=schema, nullpool=nullpool, source=source)
   superset_app            |   File "/app/superset/models/core.py", line 396, in _get_sqla_engine
   superset_app            |     params["poolclass"] = NullPool
   superset_app            | TypeError: 'str' object does not support item assignment
   superset_app            |
   superset_app            | The above exception was the direct cause of the following exception:
   superset_app            |
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
   superset_app            |     rv = self.dispatch_request()
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
   superset_app            |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 89, in wraps
   superset_app            |     return f(self, *args, **kwargs)
   superset_app            |   File "/app/superset/views/base_api.py", line 114, in wraps
   superset_app            |     raise ex
   superset_app            |   File "/app/superset/views/base_api.py", line 111, in wraps
   superset_app            |     duration, response = time_function(f, self, *args, **kwargs)
   superset_app            |   File "/app/superset/utils/core.py", line 1604, in time_function
   superset_app            |     response = func(*args, **kwargs)
   superset_app            |   File "/app/superset/utils/log.py", line 265, in wrapper
   superset_app            |     value = f(*args, **kwargs)
   superset_app            |   File "/app/superset/views/base_api.py", line 84, in wraps
   superset_app            |     return f(self, *args, **kwargs)
   superset_app            |   File "/app/superset/databases/api.py", line 726, in test_connection
   superset_app            |     TestConnectionDatabaseCommand(item).run()
   superset_app            |   File "/app/superset/databases/commands/test_connection.py", line 176, in run
   superset_app            |     raise DatabaseTestConnectionUnexpectedError(errors) from ex
   superset_app            | superset.databases.commands.exceptions.DatabaseTestConnectionUnexpectedError: [SupersetError(message="'str' object does not support item assignment", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Databricks Interactive Cluster', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset_app            | 2022-11-29 23:29:08,364:WARNING:superset.views.base:SupersetErrorsException
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/app/superset/databases/commands/test_connection.py", line 102, in run
   superset_app            |     with database.get_sqla_engine_with_context() as engine:
   superset_app            |   File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
   superset_app            |     return next(self.gen)
   superset_app            |   File "/app/superset/models/core.py", line 372, in get_sqla_engine_with_context
   superset_app            |     yield self._get_sqla_engine(schema=schema, nullpool=nullpool, source=source)
   superset_app            |   File "/app/superset/models/core.py", line 396, in _get_sqla_engine
   superset_app            |     params["poolclass"] = NullPool
   superset_app            | TypeError: 'str' object does not support item assignment
   superset_app            |
   superset_app            | The above exception was the direct cause of the following exception:
   superset_app            |
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
   superset_app            |     rv = self.dispatch_request()
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
   superset_app            |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
   superset_app            |   File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 89, in wraps
   superset_app            |     return f(self, *args, **kwargs)
   superset_app            |   File "/app/superset/views/base_api.py", line 114, in wraps
   superset_app            |     raise ex
   superset_app            |   File "/app/superset/views/base_api.py", line 111, in wraps
   superset_app            |     duration, response = time_function(f, self, *args, **kwargs)
   superset_app            |   File "/app/superset/utils/core.py", line 1604, in time_function
   superset_app            |     response = func(*args, **kwargs)
   superset_app            |   File "/app/superset/utils/log.py", line 265, in wrapper
   superset_app            |     value = f(*args, **kwargs)
   superset_app            |   File "/app/superset/views/base_api.py", line 84, in wraps
   superset_app            |     return f(self, *args, **kwargs)
   superset_app            |   File "/app/superset/databases/api.py", line 726, in test_connection
   superset_app            |     TestConnectionDatabaseCommand(item).run()
   superset_app            |   File "/app/superset/databases/commands/test_connection.py", line 176, in run
   superset_app            |     raise DatabaseTestConnectionUnexpectedError(errors) from ex
   superset_app            | superset.databases.commands.exceptions.DatabaseTestConnectionUnexpectedError: [SupersetError(message="'str' object does not support item assignment", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Databricks Interactive Cluster', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset_app            | 10.48.4.5 - - [29/Nov/2022:23:29:08 +0000] "POST /api/v1/database/test_connection/ HTTP/1.1" 422 296 "http://[Host_IP]:8088/superset/welcome/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
   superset_app            | 10.48.4.5 - - [29/Nov/2022:23:29:39 +0000] "GET /api/v1/me/ HTTP/1.1" 200 150 "http://[Host_IP]:8088/superset/welcome/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
   
   Please let me know, if I am missing anything while connecting to Azure Databricks.
   
   Please help me to connect to Azure Databricks.
   
   Thanks
   Nagaraj M M
   
   


-- 
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] 'str' object does not support item assignment, while Databrciks database connection [superset]

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

   I'm assuming this was fixed by now but never closed. Can anyone confirm on Preset and/or Superset 3.x?


-- 
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] vignesh-maersk2022 commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

Posted by GitBox <gi...@apache.org>.
vignesh-maersk2022 commented on issue #22267:
URL: https://github.com/apache/superset/issues/22267#issuecomment-1345383558

   Hi @eschutho I have tried your code by downloading locally and tested still the issue is not fixed. Please look into it again.


-- 
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] 'str' object does not support item assignment, while Databrciks database connection [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22267: 'str' object does not support item assignment, while Databrciks database connection
URL: https://github.com/apache/superset/issues/22267


-- 
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] fullergalway commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   Same error message trying to connect a hive database on preset.io 
   
   "test connection" reports, "Connection looks good!", but "connect" triggers the error.
   
   ```
   {
     "errors": [
       {
         "message": "'str' object does not support item assignment",
         "error_type": "GENERIC_DB_ENGINE_ERROR",
         "level": "error",
         "extra": {
           "engine_name": "Apache Hive",
           "issue_codes": [
             {
               "code": 1002,
               "message": "Issue 1002 - The database returned an unexpected error."
             }
           ]
         }
       }
     ]
   ```


-- 
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] fullergalway commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   > "test connection" reports, "Connection looks good!", but "connect" triggers the error.
   
   The problem occurs in preset.io for me, but in my superset development environment there is no issue. (Reporting in preset)


-- 
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] nagarajmmu commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   Hi fullergalway and Elizabeth Thompson
   
   Thanks for the update, I am waiting for the fix.
   
   Thanks
   Nagaraj M M 


-- 
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] nagarajmmu commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   Hi Evan
   
   Thank you for adding betodealmeida


-- 
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] rusackas commented on issue #22267: 'str' object does not support item assignment, while Databrciks database connection

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

   Pinging @betodealmeida as someone who knows the intricacies of Databricks x Superset. Please feel free to redirect/shepherd this issue as you see fit :)


-- 
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] 'str' object does not support item assignment, while Databrciks database connection [superset]

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

   It's been four months (well, almost) and we're on Superset 4.x. I'm still hopeful it's fixed, but certain that the issue is stale. Holler if this needs a revisit or to be reopened for some reason.


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