Skip to content

database catalog and semantic model interoperability - #86

Draft
simonpcouch wants to merge 25 commits into
mainfrom
db-55
Draft

database catalog and semantic model interoperability#86
simonpcouch wants to merge 25 commits into
mainfrom
db-55

Conversation

@simonpcouch

Copy link
Copy Markdown
Collaborator

Related to #55. Just to actually see what one e2e take on this could feel like.

Treat a connection to Snowflake/Databricks plus a schema path as minimally sufficient:

db <- DBI::dbConnect(odbc::snowflake())

source <- data_source(
  db,
  options = data_source_options(
    include = DBI::Id(...)
  )
)

agent <- commons(chat_anthropic(), source)

commons then discovers the schema and native semantic models without requiring a data dictionary.

@simonpcouch

Copy link
Copy Markdown
Collaborator Author

Have been testing with:

db <- DBI::dbConnect(odbc::snowflake())

DBI::dbExecute(
  db,
  'USE WAREHOUSE "MC_TUTORIAL_WAREHOUSE"'
)

source <- data_source(
  db,
  options = data_source_options(
    include = DBI::Id(
      catalog = "LENDING_CLUB_CLONE",
      schema = "PUBLIC",
      table = "DATABOT_TEST"
    )
  )
)

ui <- page_fillable(
  commons_ui("chat")
)

server <- function(input, output, session) {
  agent <- commons(
    chat_anthropic(), 
    source
  )

  commons_server("chat", agent)
}

shinyApp(ui, server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant