--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: duckbridge excerpt: | DuckDB Community Extensions Bridge between SQL Server and DuckDB - import a SQL Server database, run T-SQL on DuckDB through a built-in translator, export back as a live load, a restorable .bak, PostgreSQL or Parquet extension: name: duckbridge description: Bridge between SQL Server and DuckDB - import a SQL Server database, run T-SQL on DuckDB through a built-in translator, export back as a live load, a restorable .bak, PostgreSQL or Parquet version: 0.1.2 language: Rust build: cargo license: MIT excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl" requires_toolchains: "rust;python3" maintainers: - singhpratech repo: github: singhpratech/duckbridge-extension ref: 5333079b7525f0d488ebcc36c16c27030df88950 docs: hello_world: | -- T-SQL in, DuckDB SQL out (no connection needed) SELECT bridge_transpile('tsql', 'duckdb', 'SELECT TOP 5 ISNULL(a, 0) FROM dbo.t'); -- SQL Server -> this DuckDB database, 8 parallel streams; identity columns become sequences SELECT * FROM bridge_import('mssql://user:p%40ss@sql01:1433/Sales', parallel := 8); -- run the team's T-SQL unchanged against DuckDB SELECT * FROM bridge_run('SELECT c.id, SUM(o.amount) AS total INTO dbo.kpi FROM dbo.customers c JOIN dbo.orders o ON o.customer_id = c.id GROUP BY c.id;'); -- ship the result back: live load, clustered keys after the data, then a verified .bak SELECT * FROM bridge_export('mssql://user:p%40ss@sql01:1433/Sales_kpi', tables := 'kpi', bak := '/var/opt/mssql/backup/Sales_kpi.bak', verify_restore := true); extended_description: | DuckBridge moves whole databases between SQL Server and DuckDB and translates the SQL in between, so a team that lives in T-SQL can do its heavy processing in DuckDB and keep SQL Server as the system of record. Functions: - `bridge_import(dsn, ...)`: copy a SQL Server database (tables, views, keys, identity values) into the current DuckDB database with parallel key-range streams. - `bridge_run(tsql, ...)`: translate a T-SQL script to DuckDB SQL and run it here, with a SQL Server compatibility prelude (integer division, NULL ordering, case-insensitive comparisons, UTC). - `bridge_export(target, ...)`: push tables to SQL Server (live load with bulk copy, or a restorable `.bak` with optional restore verification), to PostgreSQL, to Parquet, or to a T-SQL script. - `bridge_transpile(from, to, sql [, target_version])` and `bridge_prelude(nocase)`: the translator and the prelude as plain functions. Dialects: `tsql`, `duckdb`, `postgres`. SQL Server is reached natively over TDS (no ODBC or `bcp`), with Windows authentication by default (`DOMAIN\user`, `user@domain`, or integrated login on Windows) and SQL logins otherwise. Passwords in `mssql://` URLs are percent-encoded. The translator is DuckBridge's own; constructs it cannot translate are reported, never silently changed. Every table function returns `(object, kind, rows, note)` rows. The extension opens a pool of connections to the host database at load time, so `parallel` is capped at 64. Source and CLI: https://github.com/singhpratech/duckbridge extension_star_count: 0 extension_star_count_pretty: 0 extension_download_count: 519 extension_download_count_pretty: 519 image: '/images/community_extensions/social_preview/preview_community_extension_duckbridge.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |------------------|---------------|-------------|---------|----------| | bridge_export | table | NULL | NULL | | | bridge_import | table | NULL | NULL | | | bridge_prelude | scalar | NULL | NULL | | | bridge_run | table | NULL | NULL | | | bridge_transpile | scalar | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings | name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |