opendal
opendal copied to clipboard
feat: an DSN connection string format
In the database drivers of different languages, they usually take a DSN format to connect different database backends.
Like the followings:
- JDBC: jdbc:clickhouse://xxx.myclickhouse.intra.com:8123
- Go SQL Driver: user:password@tcp(127.0.0.1:3306)/db?charset=utf8mb4
Maybe we could also get a DSN like format in opendal? The DSN format may have some benefits:
- allows connecting to different providers in a unified connection format, every one speaks one URL-like string
- easy to write config files, just one-liner instead of multiple parameters
- easy to embed in program logic, likewise
SELECT * FROM read_parquet("s3://mybucket.com/file.parquet?token_file=/var/token/access-token")
Nice concept. OpenDAL has been indecisive in adding this feature due to the instability of our builder's API. Furthermore, allowing users to write their own DSNs may exacerbate this issue. However, we will bring this matter to the forefront once we are confident enough to release OpenDAL 1.0.
Replaced by https://github.com/apache/incubator-opendal/discussions/1494