frictionlessdata / datapackage

Data Package is a standard consisting of a set of simple yet extensible specifications to describe datasets, data files and tabular data. It is a data definition language (DDL) and data API that facilitates findability, accessibility, interoperability, and reusability (FAIR) of data.
https://datapackage.org
The Unlicense
481 stars 107 forks source link

Add `dialect.namespace` #947

Open roll opened 1 week ago

roll commented 1 week ago
          @roll, I'm not sure if there's still time, but wouldn't it make sense to add a `dialect.namespace` to specify the database schema where the table is located? 

frictionless-py for example already allows this.

Originally posted by @fjuniorr in https://github.com/frictionlessdata/specs/issues/920#issuecomment-2186527880

roll commented 1 week ago

@fjuniorr I think we can include it in the next version i.e. v2.1. I'm wondering when namespace can be applicable as I guess it's not a part of SQLite?

fjuniorr commented 1 week ago

SQLite indeed does not have a traditional schema[^1], but others do, such as PostgreSQL and DuckDB, understood as a collection of database objects within a single database.

[^1]: Only attached databases.

I currently utilize the namespace support in frictionless-py to load data packages into different schemas, which helps prevent name conflicts among my tables. These tables are named after each resource that exists under the same name in different packages.

roll commented 1 week ago

@fjuniorr Ahh I have forgotten about DuckDB. The Data Package spec itself in a form of a published data package is kinda hard to apply for classical client/server databases as they require authz but in-process ones are really good uses cases so having in mind DuckDB this feature totally makes sense for me :+1: