4

I am working on the "write" side of a cassandra database using the outworkers phantom scala library.

The "read" side is in a different micro-service that is responsible for creating the keyspace and shared tables.

The "write" side however does have some "scratch work" tables that are an internal concern that it needs to create.

I've found how to disable auto-create of the keyspace with "autoinit=false" but I haven't found how to disable auto-create of individual tables within a Database. I just want to connect to those tables, check that they exist and then write to them without inducing a create.

Any guidance appreciated. I'm using com.outworkers:phantom-*:2.39.0 with scala 2.11.12

jmcnulty
  • 190
  • 10

1 Answers1

0

A workaround occurred to me while waiting ... I can create two overlapping Database objects: one with autoinit=false that includes all tables and one with autoinit=true that includes the "scratch work" tables only. I use the autoinit=true Database just to get my scratch tables created and the first Database with autoinit=false after that for reading/writing to all of the tables. Open to better ideas still

jmcnulty
  • 190
  • 10