You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fabgat (via GitHub)" <gi...@apache.org> on 2024/05/07 09:53:05 UTC
[I] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
fabgat opened a new issue, #28365:
URL: https://github.com/apache/superset/issues/28365
### Bug description
I'm trying to use superset 4.0.0 docker version, but I'm encountering problem to install the pymssql module.
I've listed that into the requirements-local.txt as per follow:
ubuntu@superset-test-prod-2:/opt/superset$ cat docker/requirements-local.txt
**pymssql==2.2.3**
The docker starts correctly and I can connect to MySQL servers, but trying to connect to MSSQL, I receive the error:
**ERROR: Could not load database driver: MssqlEngineSpec**
Connecting though SSH to the docker images, I've tried to list the pip modules using:
**pip list**
And infact, I do not see that package installed.
I would like to understand where I'm wrong.
Regards
### How to reproduce the bug
Database, other and then I write the connection string.
### Screenshots/recordings
_No response_
### Superset version
4.0.0
### Python version
3.10
### Node version
Not applicable
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] 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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "fabgat (via GitHub)" <gi...@apache.org>.
fabgat commented on issue #28365:
URL: https://github.com/apache/superset/issues/28365#issuecomment-2098663890
this issue can be closed.
--
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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #28365:
URL: https://github.com/apache/superset/issues/28365#issuecomment-2097907386
<!-- Greeting -->
Hey there, @fabgat! I'm [Dosu](https://dosu.dev), a bot here to lend a hand with bugs, answer your questions, and guide you on becoming a contributor to Superset. While we're waiting for a human maintainer, I'll do my best to assist you. I see you're having an issue with connecting to MSSQL using pymssql in the Docker setup for Superset 4.0.0. Let me take a closer look at this, and I'll get back to you with a full answer shortly!
--
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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "fabgat (via GitHub)" <gi...@apache.org>.
fabgat commented on issue #28365:
URL: https://github.com/apache/superset/issues/28365#issuecomment-2098661961
Thanks **@dosu**, this solution worked perfectly.
--
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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "fabgat (via GitHub)" <gi...@apache.org>.
fabgat closed issue #28365: MSSQL - ERROR: Could not load database driver: MssqlEngineSpec
URL: https://github.com/apache/superset/issues/28365
--
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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "fabgat (via GitHub)" <gi...@apache.org>.
fabgat commented on issue #28365:
URL: https://github.com/apache/superset/issues/28365#issuecomment-2098033378
Update:
if I install as root user the module, everything works. Of course, the problem will be back, if I need to update the docker image.
Saying so, I think that the problem is during launching the bootstrap that maybe, has not root privileges into the container.
How can I fix this?
--
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] MSSQL - ERROR: Could not load database driver: MssqlEngineSpec [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #28365:
URL: https://github.com/apache/superset/issues/28365#issuecomment-2098331174
<!-- Answer -->
To resolve the issue with `pymssql` not persisting through Docker image updates, you should incorporate the installation of `pymssql` directly into your Dockerfile. This ensures that the module is installed every time the image is built, thus avoiding the need to manually reinstall it after updates. Here's a concise guide on how to do this:
1. **Modify Your Dockerfile**: Add a `RUN` command in your Dockerfile to install `pymssql`. If you're using an official Superset image as your base, you'll need to create a custom Dockerfile that builds from it.
2. **Example Dockerfile Snippet**:
```Dockerfile
FROM apache/superset:4.0.0
RUN pip install pymssql
```
3. **Build Your Custom Image**: After adding the `RUN` command, use the `docker build` command to create your custom image. For example:
```bash
docker build -t my-custom-superset-image .
```
4. **Use Your Custom Image**: Deploy your Docker setup using this newly built image to ensure `pymssql` is included and persists through any future updates.
By following these steps, you integrate `pymssql` installation into your Docker image build process, ensuring it's always present in your Superset environment and eliminating the issue with MSSQL connections.
<!-- Dosu Comment Footer -->
<details>
<summary>
#### Details
</summary>
**Sources**
- [superset/db_engine_specs/mssql.py](https://github.com/apache/superset/blob/master/superset/db_engine_specs/mssql.py)
- [docker-compose-image-tag.yml](https://github.com/apache/superset/blob/master/docker-compose-image-tag.yml)
- [docker/docker-init.sh](https://github.com/apache/superset/blob/master/docker/docker-init.sh)
- [docker/docker-bootstrap.sh](https://github.com/apache/superset/blob/master/docker/docker-bootstrap.sh)
- [docker-compose-non-dev.yml](https://github.com/apache/superset/blob/master/docker-compose-non-dev.yml)
- [pyproject.toml](https://github.com/apache/superset/blob/master/pyproject.toml)
- [docs/docs/configuration/databases.mdx](https://github.com/apache/superset/blob/master/docs/docs/configuration/databases.mdx)
<br/>
**About Dosu**
This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
</details>
*To continue the conversation, mention @dosu.*
--
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