if (FALSE) {
library(brickster)
library(DBI)
library(RPostgres)
# list all lakebase instances
dbs <- db_lakebase_list()
# connect to the first instance available using {RPostgres}
# using identity that brickster is running as generate a token
creds <- db_lakebase_creds_generate(instance_names = dbs[[1]]$name)
con <- dbConnect(
drv = RPostgres::Postgres(),
host = dbs[[1]]$read_write_dns,
user = db_current_user()$userName,
password = creds$token,
dbname = "databricks_postgres",
sslmode = "require"
)
dbListTables(con)
}
Run the code above in your browser using DataLab