Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.1 KB

README.md

File metadata and controls

22 lines (17 loc) · 1.1 KB

Connecting to Databricks via PHP

Example of connecting to Databricks using PHP in a Docker environment

Requirements

Make sure you have Docker Desktop installed.

Usage

  1. Copy odbc.ini.dist
    • cp -p odbc.ini.dist odbc.ini
  2. Edit odbc.ini and replace the values in it with your Databricks SQL endpoint connection details
    • Replace <SQL_ENDPOINT_SERVER> and <SQL_ENDPOINT_HTTPPATH> with values found under the "Connection details" tab for your Databricks SQL endpoint.
    • Replace <PERSONAL_TOKEN> with the your account's Personal Access Token.
  3. Copy config-dist.php
    • cp -p config-dist.php config.php
  4. Edit config.php and replace <PERSONAL_TOKEN> with the your account's Personal Access Token.
  5. Build the container
    • docker build -t databricks_php .
  6. Run the test connection script
    • docker run databricks_php