Skip to content

Can't connect to SQL Server using JDBC #12

@jotav93

Description

@jotav93

Describe the bug
Can't connect to my sql server from databricks.

To Reproduce

  1. Install sqlalchemy and sqlalchemy-jdbcapi
  2. Build your connection string as per below (to a MS SQL Server):
    jdbcUrl = f"jdbcapi+jdbc:sqlserver://{jdbcHostname}:{jdbcPort};database={jdbcDatabase};user={username};password={password};loginTimeout=30;"
  3. Execute engine = create_engine(jdbcUrl)
  4. Error: Could not parse SQLAlchemy URL from string:...

Expected behavior
Engine should be created

Setup information

  • OS: Azure Databricks
  • Browser Chrome
  • Version Databricks Runtime 11.3 LTS

Additional context
Let me know if you need more details. Is there anything wrongwith my connection string? What environment variables do I need to specify? (I have already specified the JDBC_DRIVER_PATH)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions