In the ConnectionComponents class from prefect_sqlalchemy, the database parameter is mandatory and used instead of host when creating the connection URL. This leads to incorrect connection string generation. The database parameter should be made optional to allow proper connection string formation in all cases.
from prefect_sqlalchemy import ConnectionComponents
# Current behavior: Generates incorrect connection string
ConnectionComponents(driver="oracle+oracledb", username="root", password="root", database="xx").create_url()
# Output: oracle+oracledb://root:***@/xx
Proposed behavior: database is made optional, can specify host instead:
Bug summary
In the
ConnectionComponents
class fromprefect_sqlalchemy
, the database parameter is mandatory and used instead of host when creating the connection URL. This leads to incorrect connection string generation. Thedatabase
parameter should be made optional to allow proper connection string formation in all cases.Proposed behavior: database is made optional, can specify host instead:
Version info (
prefect version
output)Additional context
No response