Home > database >  Databricks Lakehouse JDBC and Docker
Databricks Lakehouse JDBC and Docker

Time:04-10

Pretty new to Databricks. I've got a requirement to access data in the Lakehouse using a JDBC driver. This works fine.

I now want to stub the Lakehouse using a docker image for some tests I want to write. Is it possible to get a Databricks / spark docker image with a database in it? I would also want to bootstrap the database on startup to create a bunch of tables.

CodePudding user response:

No - Databricks is not a database but a hosted service (PaaS). You can theoretically you can use OSS Spark with Thriftserver started on it, but the connections strings and other functionality would be very different, so it makes no sense to spend time on it (imho). Real solution would depend on the type of tests that you want to do.

Regarding bootstrapping database & create a bunch of tables - just issue these commands, like, create database if not exists or create table if not exists when you application starts up (see documentation for an exact syntax)

  • Related