Skip to content

feat(ddl): fill out support for databases and schemas  #6331

@cpcloud

Description

@cpcloud

Is your feature request related to a problem?

I'd like to have a consistent interface for exploring and accessing the hierarchy of a given backend's databases.

Here's a table showing each backend's support for two levels of hierarchy: database -> schema and if the name differs in the backend from one or more of those levels I list it:

backend database schema distinct from user
bigquery project dataset Y
clickhouse database
dask NA NA
datafusion database schema Y
druid connector
duckdb database schema Y
impala database
mssql database schema Y
mysql database
oracle database user (?) N
pandas NA
polars NA
postgres database schema Y
pyspark database
snowflake database schema Y
sqlite database
trino catalog schema Y

Looking at this table it appears that most databases that have support for a second level of hierarchy that is, or can reasonably be called schema.

Describe the solution you'd like

I'd like to be able to do the follow where it makes sense for the backend:

  1. Create databases
  2. Create schemas
  3. List databases
  4. List schemas

Given the above table, I think it makes sense to make existing create_database()/drop_database()/list_databases() consistent with that table, and add a create_schema()/drop_schema() for the backends where that makes sense.

What version of ibis are you running?

master

What backend(s) are you using, if any?

NA

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

featureFeatures or general enhancements

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions