{"id":13454063,"url":"https://github.com/rupurt/odbc-scanner-duckdb-extension","last_synced_at":"2025-06-30T02:33:31.457Z","repository":{"id":170774181,"uuid":"647020960","full_name":"rupurt/odbc-scanner-duckdb-extension","owner":"rupurt","description":"A DuckDB extension to read data directly from databases supporting the ODBC interface","archived":false,"fork":false,"pushed_at":"2023-09-04T22:49:50.000Z","size":130,"stargazers_count":83,"open_issues_count":23,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T14:14:06.630Z","etag":null,"topics":["analytics","bigquery","columnar-database","cpp","data-engineering","db2","duckdb","mariadb","mssql","mysql","nix","odbc","olap","oracle","postgres","snowflake","vector-engine"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rupurt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-29T22:21:53.000Z","updated_at":"2025-03-22T10:17:01.000Z","dependencies_parsed_at":"2025-02-15T04:32:53.730Z","dependency_job_id":"1521636e-e511-4fe2-9b2a-6c01e46ce09f","html_url":"https://github.com/rupurt/odbc-scanner-duckdb-extension","commit_stats":null,"previous_names":["fremantle-industries/odbc_scanner","rupurt/odbc-scanner-duckdb-extension"],"tags_count":0,"template":false,"template_full_name":"duckdb/extension-template","purl":"pkg:github/rupurt/odbc-scanner-duckdb-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupurt%2Fodbc-scanner-duckdb-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupurt%2Fodbc-scanner-duckdb-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupurt%2Fodbc-scanner-duckdb-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupurt%2Fodbc-scanner-duckdb-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rupurt","download_url":"https://codeload.github.com/rupurt/odbc-scanner-duckdb-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupurt%2Fodbc-scanner-duckdb-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262698966,"owners_count":23350213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","bigquery","columnar-database","cpp","data-engineering","db2","duckdb","mariadb","mssql","mysql","nix","odbc","olap","oracle","postgres","snowflake","vector-engine"],"created_at":"2024-07-31T08:00:50.650Z","updated_at":"2025-06-30T02:33:31.439Z","avatar_url":"https://github.com/rupurt.png","language":"C++","funding_links":[],"categories":["Extensions"],"sub_categories":["Web Clients","Other Extensions"],"readme":"# ODBC Scanner DuckDB Extension\n\nA DuckDB extension to read data directly from databases supporting the ODBC interface\n\n### odbc_scan\n\n```shell\nODBCSYSINI=${PWD} ODBCINSTINI=.odbcinst.ini ODBCINI=.odbc.ini ./build/release/duckdb\n```\n```duckdb\nD select * from odbc_scan(\n    'Driver={db2 odbctest};Hostname=localhost;Database=odbctest;Uid=db2inst1;Pwd=password;Port=50000',\n    'DB2INST1',\n    'PEOPLE'\n);\n┌──────────────┬───────┬───────────────┐\n│     NAME     │  AGE  │    SALARY     │\n│   varchar    │ int32 │ decimal(20,2) │\n├──────────────┼───────┼───────────────┤\n│ Lebron James │    37 │        100.10 │\n│ Spiderman    │    25 │        200.20 │\n│ Wonder Woman │    22 │        300.30 │\n│ David Bowie  │    69 │        400.40 │\n└──────────────┴───────┴───────────────┘\n```\n\n## Supported Databases\n\nThis extension is tested and known to work with the ODBC drivers of the following databases.\n\n| Database   | Tests                                                      | Linux x86_64 | Linux arm64 | OS X x86_64 | OS X aarch64 |\n| ---------- | :--------------------------------------------------------: | :----------: | :---------: | :---------: | :----------: |\n| IBM Db2    | [odbc_scan_db2](./test/sql/odbc_scan_db2.test)             | `[x]`        | `[ ]`       | `[x]`       | `[ ]`        |\n| MSSQL      | [odbc_scan_msql](./test/sql/odbc_scan_mssql.test)          | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| Oracle     | [odbc_scan_oracle](./test/sql/odbc_scan_oracle.test)       | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| Postgres   | [odbc_scan_postgres](./test/sql/odbc_scan_postgres.test)   | `[x]`        | `[x]`       | `[x]`       | `[x]`        |\n| MySQL      | [odbc_scan_mysql](./test/sql/odbc_scan_mysql.test)         | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| MariaDB    | [odbc_scan_mariadb](./test/sql/odbc_scan_mariadb.test)     | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| Snowflake  | [odbc_scan_snowflake](./test/sql/odbc_scan_snowflake.test) | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| BigQuery   | [odbc_scan_big_query](./test/sql/odbc_scan_big_query.test) | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n| MongoDB    | [odbc_scan_mongo_db](./test/sql/odbc_scan_mongo_db.test)   | `[ ]`        | `[ ]`       | `[ ]`       | `[ ]`        |\n\nIf you have tested the extension against other databases let us know by opening an [issue](https://github.com/rupurt/odbc-scanner-duckdb-extension/issues/new)\nor creating a pull request with a set of tests.\n\n## Connection String and DSN Formats\n\nFor a full list of supported values read the [connection string](./docs/ODBC_CONNECTION_STRING_AND_DSN_FORMATS.md) documentation.\n\n## ODBC Drivers\n\nDrivers can be downloaded from most vendors. This package manages ODBC drivers through the [odbc-drivers-nix](https://github.com/rupurt/odbc-drivers-nix)\nflake. If you'd like to have nix download and manage drivers and their dependencies follow the instructions in the [README](https://github.com/rupurt/odbc-drivers-nix#add-the-odbc-drivers-nix-overlay-to-your-own-flake).\n\n## Development\n\nThis repository manages development dependencies such drivers and shared libraries with [nix](https://nixos.org). It assumes you\nhave it [installed](https://github.com/DeterminateSystems/nix-installer).\n\nAll `development` and `test` tasks should be run within a nix shell\n\n```shell\nnix develop -c $SHELL\n```\n\nThe `odbc-scanner-duckdb-extension` is built with a `clang` toolchain. To enable `clangd` LSP support run the `.clangd`\ngenerator nix application.\n\n```shell\nnix run .#generate-dot-clangd\n```\n\nTo build the extension with the official DuckDB `cmake` toolchain and `clangd` run the build nix application which will link\nto the correct version of `unixodbc`.\n\n```shell\nnix run .#build\n./build/release/duckdb\n```\n\nTo use ODBC DSN's with driver paths managed by the `odbc-drivers-nix` flake run the generate nix apps.\n\n```shell\nnix run .#generate-odbc-ini\nnix run .#generate-odbcinst-ini\n```\n\n## Test\n\nRun the official DuckDB `cmake` builder with `nix` to ensure `unixodbc` is linked correctly\n\n```shell\ndocker compose up\nnix run .#test\n```\n\n## Installing the deployed binaries\n\nTo install your extension binaries from S3, you will need to do two things. Firstly, DuckDB should be launched with the\n`allow_unsigned_extensions` option set to true. How to set this will depend on the client you're using. Some examples:\n\nCLI:\n```shell\nduckdb -unsigned\n```\n\nPython:\n```python\ncon = duckdb.connect(':memory:', config={'allow_unsigned_extensions' : 'true'})\n```\n\nNodeJS:\n```js\ndb = new duckdb.Database(':memory:', {\"allow_unsigned_extensions\": \"true\"});\n```\n\nSecondly, you will need to set the repository endpoint in DuckDB to the HTTP url of your bucket + version of the extension\nyou want to install. To do this run the following SQL query in DuckDB:\n```sql\nSET custom_extension_repository='bucket.s3.eu-west-1.amazonaws.com/\u003cyour_extension_name\u003e/latest';\n```\nNote that the `/latest` path will allow you to install the latest extension version available for your current version of\nDuckDB. To specify a specific version, you can pass the version instead.\n\nAfter running these steps, you can install and load your extension using the regular INSTALL/LOAD commands in DuckDB:\n```sql\nINSTALL 'build/release/extension/odbc_scanner/odbc_scanner.duckdb_extension';\nLOAD 'build/release/extension/odbc_scanner/odbc_scanner.duckdb_extension';\n```\n\n## License\n\n`odbc-scanner-duckdb-extension` is released under the [MIT license](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frupurt%2Fodbc-scanner-duckdb-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frupurt%2Fodbc-scanner-duckdb-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frupurt%2Fodbc-scanner-duckdb-extension/lists"}