{"id":20087241,"url":"https://github.com/conduitio-labs/conduit-connector-sql-server","last_synced_at":"2026-04-28T01:33:03.257Z","repository":{"id":60377477,"uuid":"542613576","full_name":"conduitio-labs/conduit-connector-sql-server","owner":"conduitio-labs","description":"Conduit connector for SQL Server","archived":false,"fork":false,"pushed_at":"2026-04-02T07:38:43.000Z","size":591,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-04-02T21:39:05.205Z","etag":null,"topics":["conduit","go","golang","sql-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conduitio-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-28T13:47:30.000Z","updated_at":"2026-04-02T07:38:47.000Z","dependencies_parsed_at":"2023-11-06T07:43:49.083Z","dependency_job_id":"bd369930-c762-4348-bf89-9f7a0022b3f0","html_url":"https://github.com/conduitio-labs/conduit-connector-sql-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/conduitio-labs/conduit-connector-sql-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduitio-labs%2Fconduit-connector-sql-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduitio-labs%2Fconduit-connector-sql-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduitio-labs%2Fconduit-connector-sql-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduitio-labs%2Fconduit-connector-sql-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conduitio-labs","download_url":"https://codeload.github.com/conduitio-labs/conduit-connector-sql-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduitio-labs%2Fconduit-connector-sql-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conduit","go","golang","sql-server"],"created_at":"2024-11-13T16:04:41.986Z","updated_at":"2026-04-28T01:33:03.242Z","avatar_url":"https://github.com/conduitio-labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conduit Connector MICROSOFT SQL SERVER \n\n## General\n\nThe [SQL SERVER](https://learn.microsoft.com/en-us/sql/sql-server/?view=sql-server-ver16) connector is one\nof [Conduit](https://github.com/ConduitIO/conduit) plugins.\nIt provides both, a source and a destination SQL SERVER connector.\n\n### Prerequisites\n\n- [Go](https://go.dev/) 1.20\n- (optional) [golangci-lint](https://github.com/golangci/golangci-lint) 1.48.0\n- (optional) [mock](https://github.com/golang/mock) 1.6.0\n\n\n### How to build it\n\nRun `make build`.\n\n### Testing\n\nRun `make test` to run all the unit and integration tests.\n\n## Destination\n\nThe SQL Server Destination takes a `sdk.Record` and parses it into a valid SQL query.\n\n### Configuration Options\n\n| Name         | Description                                                                                                                                                                                 | Required | Example                                       |\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------|\n| `connection` | String line  for connection to  SQL SERVER. More information about it [Connection](https://github.com/denisenkom/go-mssqldb#the-connection-string-can-be-specified-in-one-of-three-formats) | **true** | sqlserver://sa:password@0.0.0.0?database=mydb |\n| `table`      | The name of a table in the database that the connector should  write to, by default.                                                                                                        | **true** | users                                         |\n\n### Table name\n\nIf a record contains a `sqlserver.table` property in its metadata it will be inserted in that table, otherwise it will fall back\nto use the table configured in the connector. Thus, a Destination can support multiple tables in a single connector,\nas long as the user has proper access to those tables.\n\n## Source\n\nThe source connects to the database using the provided connection and starts creating records for each table row\nand each detected change.\n\n### Configuration options\n\n| Name                      | Description                                                                                                                                                                                                   | Required | Example                                       |\n|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------|\n| `connection`              | String line  for connection to  SQL SERVER. More information about it [Connection](https://github.com/denisenkom/go-mssqldb#the-connection-string-can-be-specified-in-one-of-three-formats)                   | **true** | sqlserver://sa:password@0.0.0.0?database=mydb |\n| `table`                   | The name of a table in the database that the connector should  write to, by default.                                                                                                                          | **true** | users                                         |\n| `primaryKey`              | Column name that records should use for their `Key` fields.                                                                                                                                                   | **true** | id                                            |\n| `orderingColumn`          | The name of a column that the connector will use for ordering rows. Its values must be unique and suitable for sorting, otherwise, the snapshot won't work correctly.                                         | **true** | id                                            |\n| `column`                  | Comma separated list of column names that should be included in each Record's payload. If the field is not empty it must contain values of the `primaryKey` and `orderingColumn` fields. By default: all rows | false    | id,name,age                                   |\n| `snapshot`                | Whether or not the plugin will take a snapshot of the entire table before starting cdc mode, by default true.                                                                                                 | false    | false                                         |\n| `batchSize`               | Size of rows batch. By default is 1000                                                                                                                                                                        | false    | 100                                           |\n\n### Snapshot\nWhen the connector first starts, snapshot mode is enabled.\n\nFirst time when the snapshot iterator starts work, it is get max value from `orderingColumn` and saves this value to position.\nThe snapshot iterator reads all rows, where `orderingColumn` values less or equal maxValue, from the table in batches.\n\n\nValues in the ordering column must be unique and suitable for sorting, otherwise, the snapshot won't work correctly.\nIterators saves last processed value from `orderingColumn` column to position to field `SnapshotLastProcessedVal`.\nIf snapshot stops it will parse position from last record and will try gets row where `{{orderingColumn}} \u003e {{position.SnapshotLastProcessedVal}}`\n\n\nWhen all records are returned, the connector switches to the CDC iterator.\n\nThis behavior is enabled by default, but can be turned off by adding \"snapshot\":\"false\" to the Source configuration.\n\n### Change Data Capture (CDC)\n\nThis connector implements CDC features for DB2 by adding a tracking table and triggers to populate it. The tracking\ntable has the same name as a target table with the prefix `CONDUIT_TRACKING_`. The tracking table has all the\nsame columns as the target table plus three additional columns:\n\n| name                            | description                                          |\n|---------------------------------|------------------------------------------------------|\n| `CONDUIT_TRACKING_ID`           | Autoincrement index for the position.                |\n| `CONDUIT_OPERATION_TYPE`        | Operation type: `insert`, `update`, or `delete`.     |\n| `CONDUIT_TRACKING_CREATED_DATE` | Date when the event was added to the tacking table.  |\n\n\nTriggers have name pattern `CONDUIT_TRIGGER_{{operation_type}}_{{table}}`.\n\n\nQueries to retrieve change data from a tracking table are very similar to queries in a Snapshot iterator, but with\n`CONDUIT_TRACKING_ID` ordering column.\n\nCDC iterator periodically clears rows which were successfully applied from tracking table.\nIt collects `CONDUIT_TRACKING_ID` inside the `Ack` method into a batch and clears the tracking table every 5 seconds.\n\nIterator saves the last `CONDUIT_TRACKING_ID` to the position from the last successfully recorded row.\n\nIf connector stops, it will parse position from the last record and will try\nto get row where `{{CONDUIT_TRACKING_ID}}` \u003e `{{position.CDCLastID}}`.\n\n\n### CDC FAQ\n\n#### Is it possible to add/remove/rename column to table?\n\nYes. You have to stop the pipeline and do the same with conduit tracking table.\nFor example:\n```sql\nALTER TABLE CLIENTS\nADD COLUMN address VARCHAR(18);\n\nALTER TABLE CONDUIT_TRACKING_CLIENTS\n    ADD COLUMN address VARCHAR(18);\n```\n\n#### I accidentally removed tracking table.\n\nYou have to restart pipeline, tracking table will be recreated by connector.\n\n#### I accidentally removed table.\n\nYou have to stop the pipeline, remove the conduit tracking table, and then start the pipeline.\n\n#### Is it possible to change table name?\n\nYes. Stop the pipeline, change the value of the `table` in the Source configuration,\nchange the name of the tracking table using a pattern `CONDUIT_TRACKING_{{TABLE}}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduitio-labs%2Fconduit-connector-sql-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconduitio-labs%2Fconduit-connector-sql-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduitio-labs%2Fconduit-connector-sql-server/lists"}