How to configure a datasource Extra parameter?
Make sure these boxes are checked before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
Superset version
0.999.0dev more ./superset/assets/package.json``installed by docker
Expected results
press save button, engine param can be configered correctly
Actual results
Invalid argument(s) 'pool_size','max_overflow' sent to create_engine(), using configuration PGDialect_psycopg2/NullPool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
Steps to reproduce
- go to Edit Database Page
- config Extra section
- save button
Please try wrap arguments by "connect_args"
"engine_params": {"connect_args": {"pool_size": 10: "max_overflow": 20}}
reference from https://docs.sqlalchemy.org/en/latest/core/engines.html?highlight=create_engine#sqlalchemy.create_engine
Please try wrap arguments by "connect_args"
"engine_params": {"connect_args": {"pool_size": 10: "max_overflow": 20}}reference from https://docs.sqlalchemy.org/en/latest/core/engines.html?highlight=create_engine#sqlalchemy.create_engine
Thanks for help!
But i got a following error
(psycopg2.ProgrammingError) invalid dsn: invalid connection option "pool_size" (Background on this error at: http://sqlalche.me/e/f405)
I have checked the doc out, and i supposed that the "pool_size" and "connect_args" might be in one level ,rather than "pool_size" is underlying the "connect_args"

thank you any way @zhaoyongjie
@kristw hey dude, I haven't gotten the answer to this question and why u close this issue?
My apology. I misunstood while triaging the issues. Please feel free to reopen if this happens.
Here's how it goes: https://github.com/apache/incubator-superset/blob/b5d03c85c578bd12bfb99446a54543bd029361ad/superset/models/core.py#L800-L820
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
@lhyundeadsoul were you able to figure this out? I'm having the same issue on Superset v0.35.1.
When I use
"engine_params": {"connect_args": {"pool_size": 10, "max_overflow": 20}}
I get:
(psycopg2.ProgrammingError) invalid dsn: invalid connection option "pool_size" (Background on this error at: http://sqlalche.me/e/f405)
It seems like Superset is using NullPool so pool_size and max_overflow won't work for that.