diff --git a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties index fdabd58116b7..7870af4b1f3b 100644 --- a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties +++ b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties @@ -1 +1 @@ -version=0.30.3 +version=0.30.4 diff --git a/airbyte-cdk/java/airbyte-cdk/db-sources/src/main/kotlin/io/airbyte/cdk/integrations/debezium/internals/RecordWaitTimeUtil.kt b/airbyte-cdk/java/airbyte-cdk/db-sources/src/main/kotlin/io/airbyte/cdk/integrations/debezium/internals/RecordWaitTimeUtil.kt index 29c11fd38b2b..00c1fa1acfae 100644 --- a/airbyte-cdk/java/airbyte-cdk/db-sources/src/main/kotlin/io/airbyte/cdk/integrations/debezium/internals/RecordWaitTimeUtil.kt +++ b/airbyte-cdk/java/airbyte-cdk/db-sources/src/main/kotlin/io/airbyte/cdk/integrations/debezium/internals/RecordWaitTimeUtil.kt @@ -13,7 +13,7 @@ object RecordWaitTimeUtil { private val LOGGER: Logger = LoggerFactory.getLogger(RecordWaitTimeUtil::class.java) val MIN_FIRST_RECORD_WAIT_TIME: Duration = Duration.ofMinutes(2) - val MAX_FIRST_RECORD_WAIT_TIME: Duration = Duration.ofMinutes(40) + val MAX_FIRST_RECORD_WAIT_TIME: Duration = Duration.ofMinutes(60) val DEFAULT_FIRST_RECORD_WAIT_TIME: Duration = Duration.ofMinutes(5) val DEFAULT_SUBSEQUENT_RECORD_WAIT_TIME: Duration = Duration.ofMinutes(1) diff --git a/airbyte-integrations/connectors/source-mssql/build.gradle b/airbyte-integrations/connectors/source-mssql/build.gradle index aeadb10194b1..4a4109889b0e 100644 --- a/airbyte-integrations/connectors/source-mssql/build.gradle +++ b/airbyte-integrations/connectors/source-mssql/build.gradle @@ -3,7 +3,7 @@ plugins { } airbyteJavaConnector { - cdkVersionRequired = '0.30.1' + cdkVersionRequired = '0.30.4' features = ['db-sources'] useLocalCdk = false } diff --git a/airbyte-integrations/connectors/source-mssql/metadata.yaml b/airbyte-integrations/connectors/source-mssql/metadata.yaml index f6e5a4d225b2..b691d147a0af 100644 --- a/airbyte-integrations/connectors/source-mssql/metadata.yaml +++ b/airbyte-integrations/connectors/source-mssql/metadata.yaml @@ -9,7 +9,7 @@ data: connectorSubtype: database connectorType: source definitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1 - dockerImageTag: 4.0.11 + dockerImageTag: 4.0.12 dockerRepository: airbyte/source-mssql documentationUrl: https://docs.airbyte.com/integrations/sources/mssql githubIssueLabel: source-mssql diff --git a/airbyte-integrations/connectors/source-mssql/src/main/resources/spec.json b/airbyte-integrations/connectors/source-mssql/src/main/resources/spec.json index 58f27ffa8b2d..082967b199bc 100644 --- a/airbyte-integrations/connectors/source-mssql/src/main/resources/spec.json +++ b/airbyte-integrations/connectors/source-mssql/src/main/resources/spec.json @@ -135,10 +135,10 @@ "initial_waiting_seconds": { "type": "integer", "title": "Initial Waiting Time in Seconds (Advanced)", - "description": "The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 2400 seconds. Read about initial waiting time.", + "description": "The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 3600 seconds. Read about initial waiting time.", "default": 300, "min": 120, - "max": 2400, + "max": 3600, "order": 3 }, "invalid_cdc_cursor_position_behavior": { diff --git a/airbyte-integrations/connectors/source-mssql/src/test-integration/resources/expected_spec.json b/airbyte-integrations/connectors/source-mssql/src/test-integration/resources/expected_spec.json index cb0b167ce1c0..e0f1fc92d0ae 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test-integration/resources/expected_spec.json +++ b/airbyte-integrations/connectors/source-mssql/src/test-integration/resources/expected_spec.json @@ -135,10 +135,10 @@ "initial_waiting_seconds": { "type": "integer", "title": "Initial Waiting Time in Seconds (Advanced)", - "description": "The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 2400 seconds. Read about initial waiting time.", + "description": "The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 3600 seconds. Read about initial waiting time.", "default": 300, "min": 120, - "max": 2400, + "max": 3600, "order": 3 }, "invalid_cdc_cursor_position_behavior": { diff --git a/docs/integrations/sources/mssql.md b/docs/integrations/sources/mssql.md index 1de03223ad61..8633863ea786 100644 --- a/docs/integrations/sources/mssql.md +++ b/docs/integrations/sources/mssql.md @@ -1,9 +1,16 @@ # Microsoft SQL Server (MSSQL) + Airbyte's certified MSSQL connector offers the following features: -* Multiple methods of keeping your data fresh, including [Change Data Capture (CDC)](https://docs.airbyte.com/understanding-airbyte/cdc) using the [binlog](https://dev.mysql.com/doc/refman/8.0/en/binary-log.html). -* Incremental as well as Full Refresh [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes), providing flexibility in how data is delivered to your destination. -* Reliable replication at any table size with [checkpointing](https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#state--checkpointing) and chunking of database reads. +- Multiple methods of keeping your data fresh, including + [Change Data Capture (CDC)](https://docs.airbyte.com/understanding-airbyte/cdc) using the + [binlog](https://dev.mysql.com/doc/refman/8.0/en/binary-log.html). +- Incremental as well as Full Refresh + [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes), providing + flexibility in how data is delivered to your destination. +- Reliable replication at any table size with + [checkpointing](https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#state--checkpointing) + and chunking of database reads. ## Features @@ -17,57 +24,85 @@ Airbyte's certified MSSQL connector offers the following features: | SSH Tunnel Connection | Yes | | | Namespaces | Yes | Enabled by default | -The MSSQL source does not alter the schema present in your database. Depending on the destination connected to this source, however, the schema may be altered. See the destination's documentation for more details. +The MSSQL source does not alter the schema present in your database. Depending on the destination +connected to this source, however, the schema may be altered. See the destination's documentation +for more details. ## Getting Started #### Requirements -1. MSSQL Server `Azure SQL Database`, `Azure Synapse Analytics`, `Azure SQL Managed Instance`, `SQL Server 2019`, `SQL Server 2017`, `SQL Server 2016`, `SQL Server 2014`, `SQL Server 2012`, `PDW 2008R2 AU34`. +1. MSSQL Server `Azure SQL Database`, `Azure Synapse Analytics`, `Azure SQL Managed Instance`, + `SQL Server 2019`, `SQL Server 2017`, `SQL Server 2016`, `SQL Server 2014`, `SQL Server 2012`, + `PDW 2008R2 AU34`. 2. Create a dedicated read-only Airbyte user with access to all tables needed for replication -3. If you want to use CDC, please see [the relevant section below](mssql.md#change-data-capture-cdc) for further setup requirements +3. If you want to use CDC, please see [the relevant section below](mssql.md#change-data-capture-cdc) + for further setup requirements #### 1. Make sure your database is accessible from the machine running Airbyte -This is dependent on your networking setup. The easiest way to verify if Airbyte is able to connect to your MSSQL instance is via the check connection tool in the UI. +This is dependent on your networking setup. The easiest way to verify if Airbyte is able to connect +to your MSSQL instance is via the check connection tool in the UI. #### 2. Create a dedicated read-only user with access to the relevant tables \(Recommended but optional\) -This step is optional but highly recommended to allow for better permission control and auditing. Alternatively, you can use Airbyte with an existing user in your database. +This step is optional but highly recommended to allow for better permission control and auditing. +Alternatively, you can use Airbyte with an existing user in your database. #### 3. Your database user should now be ready for use with Airbyte! #### Airbyte Cloud -On Airbyte Cloud, only secured connections to your MSSQL instance are supported in source configuration. You may either configure your connection using one of the supported SSL Methods or by using an SSH Tunnel. + +On Airbyte Cloud, only secured connections to your MSSQL instance are supported in source +configuration. You may either configure your connection using one of the supported SSL Methods or by +using an SSH Tunnel. ## Change Data Capture \(CDC\) -We use [SQL Server's change data capture feature](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-2017) with transaction logs to capture row-level `INSERT`, `UPDATE` and `DELETE` operations that occur on CDC-enabled tables. +We use +[SQL Server's change data capture feature](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-2017) +with transaction logs to capture row-level `INSERT`, `UPDATE` and `DELETE` operations that occur on +CDC-enabled tables. -Some extra setup requiring at least _db_owner_ permissions on the database\(s\) you intend to sync from will be required \(detailed [below](mssql.md#setting-up-cdc-for-mssql)\). +Some extra setup requiring at least _db_owner_ permissions on the database\(s\) you intend to sync +from will be required \(detailed [below](mssql.md#setting-up-cdc-for-mssql)\). -Please read the [CDC docs](../../understanding-airbyte/cdc.md) for an overview of how Airbyte approaches CDC. +Please read the [CDC docs](../../understanding-airbyte/cdc.md) for an overview of how Airbyte +approaches CDC. ### Should I use CDC for MSSQL? -- If you need a record of deletions and can accept the limitations posted below, CDC is the way to go! -- If your data set is small and/or you just want a snapshot of your table in the destination, consider using Full Refresh replication for your table instead of CDC. -- If the limitations below prevent you from using CDC and your goal is to maintain a snapshot of your table in the destination, consider using non-CDC incremental and occasionally reset the data and re-sync. -- If your table has a primary key but doesn't have a reasonable cursor field for incremental syncing \(i.e. `updated_at`\), CDC allows you to sync your table incrementally. +- If you need a record of deletions and can accept the limitations posted below, CDC is the way to + go! +- If your data set is small and/or you just want a snapshot of your table in the destination, + consider using Full Refresh replication for your table instead of CDC. +- If the limitations below prevent you from using CDC and your goal is to maintain a snapshot of + your table in the destination, consider using non-CDC incremental and occasionally reset the data + and re-sync. +- If your table has a primary key but doesn't have a reasonable cursor field for incremental syncing + \(i.e. `updated_at`\), CDC allows you to sync your table incrementally. #### CDC Limitations -- Make sure to read our [CDC docs](../../understanding-airbyte/cdc.md) to see limitations that impact all databases using CDC replication. -- `hierarchyid` and `sql_variant` types are not processed in CDC migration type (not supported by Debezium). For more details please check -[this ticket](https://github.com/airbytehq/airbyte/issues/14411) +- Make sure to read our [CDC docs](../../understanding-airbyte/cdc.md) to see limitations that + impact all databases using CDC replication. +- `hierarchyid` and `sql_variant` types are not processed in CDC migration type (not supported by + Debezium). For more details please check + [this ticket](https://github.com/airbytehq/airbyte/issues/14411) - CDC is only available for SQL Server 2016 Service Pack 1 \(SP1\) and later. -- _db_owner_ \(or higher\) permissions are required to perform the [neccessary setup](mssql.md#setting-up-cdc-for-mssql) for CDC. -- On Linux, CDC is not supported on versions earlier than SQL Server 2017 CU18 \(SQL Server 2019 is supported\). -- Change data capture cannot be enabled on tables with a clustered columnstore index. \(It can be enabled on tables with a _non-clustered_ columnstore index\). -- The SQL Server CDC feature processes changes that occur in user-created tables only. You cannot enable CDC on the SQL Server master database. -- Using variables with partition switching on databases or tables with change data capture \(CDC\) is not supported for the `ALTER TABLE` ... `SWITCH TO` ... `PARTITION` ... statement +- _db_owner_ \(or higher\) permissions are required to perform the + [neccessary setup](mssql.md#setting-up-cdc-for-mssql) for CDC. +- On Linux, CDC is not supported on versions earlier than SQL Server 2017 CU18 \(SQL Server 2019 is + supported\). +- Change data capture cannot be enabled on tables with a clustered columnstore index. \(It can be + enabled on tables with a _non-clustered_ columnstore index\). +- The SQL Server CDC feature processes changes that occur in user-created tables only. You cannot + enable CDC on the SQL Server master database. +- Using variables with partition switching on databases or tables with change data capture \(CDC\) + is not supported for the `ALTER TABLE` ... `SWITCH TO` ... `PARTITION` ... statement - Our CDC implementation uses at least once delivery for all change records. -- Read more on CDC limitations in the [Microsoft docs](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-2017#limitations). +- Read more on CDC limitations in the + [Microsoft docs](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-2017#limitations). ### Setting up CDC for MSSQL @@ -75,7 +110,8 @@ Please read the [CDC docs](../../understanding-airbyte/cdc.md) for an overview o MS SQL Server provides some built-in stored procedures to enable CDC. -- To enable CDC, a SQL Server administrator with the necessary privileges \(_db_owner_ or _sysadmin_\) must first run a query to enable CDC at the database level. +- To enable CDC, a SQL Server administrator with the necessary privileges \(_db_owner_ or + _sysadmin_\) must first run a query to enable CDC at the database level. ```text USE {database name} @@ -99,18 +135,33 @@ MS SQL Server provides some built-in stored procedures to enable CDC. GO ``` - - \[1\] Specifies a role which will gain `SELECT` permission on the captured columns of the source table. We suggest putting a value here so you can use this role in the next step but you can also set the value of @role*name to `NULL` to allow only \_sysadmin* and _db_owner_ to have access. Be sure that the credentials used to connect to the source in Airbyte align with this role so that Airbyte can access the cdc tables. - - \[2\] Specifies the filegroup where SQL Server places the change table. We recommend creating a separate filegroup for CDC but you can leave this parameter out to use the default filegroup. - - \[3\] If 0, only the support functions to query for all changes are generated. If 1, the functions that are needed to query for net changes are also generated. If supports_net_changes is set to 1, index_name must be specified, or the source table must have a defined primary key. - -- \(For more details on parameters, see the [Microsoft doc page](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-cdc-enable-table-transact-sql?view=sql-server-ver15) for this stored procedure\). -- If you have many tables to enable CDC on and would like to avoid having to run this query one-by-one for every table, [this script](http://www.techbrothersit.com/2013/06/change-data-capture-cdc-sql-server_69.html) might help! - -For further detail, see the [Microsoft docs on enabling and disabling CDC](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server?view=sql-server-ver15). + - \[1\] Specifies a role which will gain `SELECT` permission on the captured columns of the source + table. We suggest putting a value here so you can use this role in the next step but you can + also set the value of @role*name to `NULL` to allow only \_sysadmin* and _db_owner_ to have + access. Be sure that the credentials used to connect to the source in Airbyte align with this + role so that Airbyte can access the cdc tables. + - \[2\] Specifies the filegroup where SQL Server places the change table. We recommend creating a + separate filegroup for CDC but you can leave this parameter out to use the default filegroup. + - \[3\] If 0, only the support functions to query for all changes are generated. If 1, the + functions that are needed to query for net changes are also generated. If supports_net_changes + is set to 1, index_name must be specified, or the source table must have a defined primary key. + +- \(For more details on parameters, see the + [Microsoft doc page](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-cdc-enable-table-transact-sql?view=sql-server-ver15) + for this stored procedure\). +- If you have many tables to enable CDC on and would like to avoid having to run this query + one-by-one for every table, + [this script](http://www.techbrothersit.com/2013/06/change-data-capture-cdc-sql-server_69.html) + might help! + +For further detail, see the +[Microsoft docs on enabling and disabling CDC](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server?view=sql-server-ver15). #### 2. Enable snapshot isolation -- When a sync runs for the first time using CDC, Airbyte performs an initial consistent snapshot of your database. To avoid acquiring table locks, Airbyte uses _snapshot isolation_, allowing simultaneous writes by other database clients. This must be enabled on the database like so: +- When a sync runs for the first time using CDC, Airbyte performs an initial consistent snapshot of + your database. To avoid acquiring table locks, Airbyte uses _snapshot isolation_, allowing + simultaneous writes by other database clients. This must be enabled on the database like so: ```text ALTER DATABASE {database name} @@ -119,7 +170,10 @@ For further detail, see the [Microsoft docs on enabling and disabling CDC](https #### 3. Create a user and grant appropriate permissions -- Rather than use _sysadmin_ or _db_owner_ credentials, we recommend creating a new user with the relevant CDC access for use with Airbyte. First let's create the login and user and add to the [db_datareader](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles?view=sql-server-ver15) role: +- Rather than use _sysadmin_ or _db_owner_ credentials, we recommend creating a new user with the + relevant CDC access for use with Airbyte. First let's create the login and user and add to the + [db_datareader](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles?view=sql-server-ver15) + role: ```text USE {database name}; @@ -135,14 +189,19 @@ For further detail, see the [Microsoft docs on enabling and disabling CDC](https EXEC sp_addrolemember '{role name}', '{user name}'; ``` - - This should be enough access, but if you run into problems, try also directly granting the user `SELECT` access on the cdc schema: + - This should be enough access, but if you run into problems, try also directly granting the user + `SELECT` access on the cdc schema: ```text USE {database name}; GRANT SELECT ON SCHEMA :: [cdc] TO {user name}; ``` - - If feasible, granting this user 'VIEW SERVER STATE' permissions will allow Airbyte to check whether or not the [SQL Server Agent](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver15#relationship-with-log-reader-agent) is running. This is preferred as it ensures syncs will fail if the CDC tables are not being updated by the Agent in the source database. + - If feasible, granting this user 'VIEW SERVER STATE' permissions will allow Airbyte to check + whether or not the + [SQL Server Agent](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver15#relationship-with-log-reader-agent) + is running. This is preferred as it ensures syncs will fail if the CDC tables are not being + updated by the Agent in the source database. ```text USE master; @@ -151,8 +210,13 @@ For further detail, see the [Microsoft docs on enabling and disabling CDC](https #### 4. Extend the retention period of CDC data -- In SQL Server, by default, only three days of data are retained in the change tables. Unless you are running very frequent syncs, we suggest increasing this retention so that in case of a failure in sync or if the sync is paused, there is still some bandwidth to start from the last point in incremental sync. -- These settings can be changed using the stored procedure [sys.sp_cdc_change_job](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-cdc-change-job-transact-sql?view=sql-server-ver15) as below: +- In SQL Server, by default, only three days of data are retained in the change tables. Unless you + are running very frequent syncs, we suggest increasing this retention so that in case of a failure + in sync or if the sync is paused, there is still some bandwidth to start from the last point in + incremental sync. +- These settings can be changed using the stored procedure + [sys.sp_cdc_change_job](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-cdc-change-job-transact-sql?view=sql-server-ver15) + as below: ```text -- we recommend 14400 minutes (10 days) as retention period @@ -171,9 +235,11 @@ For further detail, see the [Microsoft docs on enabling and disabling CDC](https - MSSQL uses the SQL Server Agent - to [run the jobs necessary](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver15#agent-jobs) + to + [run the jobs necessary](https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver15#agent-jobs) - for CDC. It is therefore vital that the Agent is operational in order for to CDC to work effectively. You can check + for CDC. It is therefore vital that the Agent is operational in order for to CDC to work + effectively. You can check the status of the SQL Server Agent as follows: @@ -183,20 +249,27 @@ For further detail, see the [Microsoft docs on enabling and disabling CDC](https - If you see something other than 'Running.' please follow - the [Microsoft docs](https://docs.microsoft.com/en-us/sql/ssms/agent/start-stop-or-pause-the-sql-server-agent-service?view=sql-server-ver15) + the + [Microsoft docs](https://docs.microsoft.com/en-us/sql/ssms/agent/start-stop-or-pause-the-sql-server-agent-service?view=sql-server-ver15) to start the service. ## Connection to MSSQL via an SSH Tunnel -Airbyte has the ability to connect to a MSSQL instance via an SSH Tunnel. The reason you might want to do this because it is not possible \(or against security policy\) to connect to the database directly \(e.g. it does not have a public IP address\). +Airbyte has the ability to connect to a MSSQL instance via an SSH Tunnel. The reason you might want +to do this because it is not possible \(or against security policy\) to connect to the database +directly \(e.g. it does not have a public IP address\). -When using an SSH tunnel, you are configuring Airbyte to connect to an intermediate server \(a.k.a. a bastion sever\) that _does_ have direct access to the database. Airbyte connects to the bastion and then asks the bastion to connect directly to the server. +When using an SSH tunnel, you are configuring Airbyte to connect to an intermediate server \(a.k.a. +a bastion sever\) that _does_ have direct access to the database. Airbyte connects to the bastion +and then asks the bastion to connect directly to the server. -Using this feature requires additional configuration, when creating the source. We will talk through what each piece of configuration means. +Using this feature requires additional configuration, when creating the source. We will talk through +what each piece of configuration means. 1. Configure all fields for the source as you normally would, except `SSH Tunnel Method`. -2. `SSH Tunnel Method` defaults to `No Tunnel` \(meaning a direct connection\). If you want to use an +2. `SSH Tunnel Method` defaults to `No Tunnel` \(meaning a direct connection\). If you want to use + an SSH Tunnel choose `SSH Key Authentication` or `Password Authentication`. @@ -204,19 +277,23 @@ Using this feature requires additional configuration, when creating the source. establishing the SSH Tunnel \(see below for more information on generating this key\). - 2. Choose `Password Authentication` if you will be using a password as your secret for establishing + 2. Choose `Password Authentication` if you will be using a password as your secret for + establishing the SSH Tunnel. -3. `SSH Tunnel Jump Server Host` refers to the intermediate \(bastion\) server that Airbyte will connect to. This should +3. `SSH Tunnel Jump Server Host` refers to the intermediate \(bastion\) server that Airbyte will + connect to. This should be a hostname or an IP Address. -4. `SSH Connection Port` is the port on the bastion server with which to make the SSH connection. The default port for +4. `SSH Connection Port` is the port on the bastion server with which to make the SSH connection. + The default port for SSH connections is `22`, so unless you have explicitly changed something, go with the default. -5. `SSH Login Username` is the username that Airbyte should use when connection to the bastion server. This is NOT the +5. `SSH Login Username` is the username that Airbyte should use when connection to the bastion + server. This is NOT the MSSQL username. @@ -244,14 +321,21 @@ The connector expects an RSA key in PEM format. To generate this key: ssh-keygen -t rsa -m PEM -f myuser_rsa ``` -This produces the private key in pem format, and the public key remains in the standard format used by the `authorized_keys` file on your bastion host. The public key should be added to your bastion host to whichever user you want to use with Airbyte. The private key is provided via copy-and-paste to the Airbyte connector configuration screen, so it may log in to the bastion. +This produces the private key in pem format, and the public key remains in the standard format used +by the `authorized_keys` file on your bastion host. The public key should be added to your bastion +host to whichever user you want to use with Airbyte. The private key is provided via copy-and-paste +to the Airbyte connector configuration screen, so it may log in to the bastion. ## Data type mapping -MSSQL data types are mapped to the following data types when synchronizing data. You can check the test values examples [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/MssqlSourceComprehensiveTest.java). If you can't find the data type you are looking for or have any problems feel free to add a new test! +MSSQL data types are mapped to the following data types when synchronizing data. You can check the +test values examples +[here](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/MssqlSourceComprehensiveTest.java). +If you can't find the data type you are looking for or have any problems feel free to add a new +test! | MSSQL Type | Resulting Type | Notes | -| :------------------------------------------------------ |:------------------------| :---- | +| :------------------------------------------------------ | :---------------------- | :---- | | `bigint` | number | | | `binary` | string | | | `bit` | boolean | | @@ -284,14 +368,17 @@ MSSQL data types are mapped to the following data types when synchronizing data. | `varchar(max) COLLATE Latin1_General_100_CI_AI_SC_UTF8` | string | | | `xml` | string | | -If you do not see a type in this list, assume that it is coerced into a string. We are happy to take feedback on preferred mappings. +If you do not see a type in this list, assume that it is coerced into a string. We are happy to take +feedback on preferred mappings. ## Upgrading from 0.4.17 and older versions to 0.4.18 and newer versions -There is a backwards incompatible spec change between Microsoft SQL Source connector versions 0.4.17 and 0.4.18. As part of that spec change -`replication_method` configuration parameter was changed to `object` from `string`. +There is a backwards incompatible spec change between Microsoft SQL Source connector versions 0.4.17 +and 0.4.18. As part of that spec change `replication_method` configuration parameter was changed to +`object` from `string`. -In Microsoft SQL source connector versions 0.4.17 and older, `replication_method` configuration parameter was saved in the configuration database as follows: +In Microsoft SQL source connector versions 0.4.17 and older, `replication_method` configuration +parameter was saved in the configuration database as follows: ``` "replication_method": "STANDARD" @@ -305,9 +392,11 @@ Starting with version 0.4.18, `replication_method` configuration parameter is sa } ``` -After upgrading Microsoft SQL Source connector from 0.4.17 or older version to 0.4.18 or newer version you need to fix source configurations in the `actor` table -in Airbyte database. To do so, you need to run two SQL queries. Follow the instructions in [Airbyte documentation](https://docs.airbyte.com/operator-guides/configuring-airbyte-db/#accessing-the-default-database-located-in-docker-airbyte-db) to -run SQL queries on Airbyte database. +After upgrading Microsoft SQL Source connector from 0.4.17 or older version to 0.4.18 or newer +version you need to fix source configurations in the `actor` table in Airbyte database. To do so, +you need to run two SQL queries. Follow the instructions in +[Airbyte documentation](https://docs.airbyte.com/operator-guides/configuring-airbyte-db/#accessing-the-default-database-located-in-docker-airbyte-db) +to run SQL queries on Airbyte database. If you have connections with Microsoft SQL Source using _Standard_ replication method, run this SQL: @@ -316,7 +405,8 @@ update public.actor set configuration =jsonb_set(configuration, '{replication_me WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configuration->>'replication_method' = 'STANDARD'); ``` -If you have connections with Microsoft SQL Source using _Logicai Replication (CDC)_ method, run this SQL: +If you have connections with Microsoft SQL Source using _Logicai Replication (CDC)_ method, run this +SQL: ```sql update public.actor set configuration =jsonb_set(configuration, '{replication_method}', '{"method": "CDC"}', true) @@ -326,7 +416,8 @@ WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configura ## Changelog | Version | Date | Pull Request | Subject | -|:--------|:-----------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------| +| :------ | :--------- | :---------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | +| 4.0.12 | 2024-04-15 | [37326](https://github.com/airbytehq/airbyte/pull/37326) | Allow up to 60 minutes of wait for the an initial CDC record. | | 4.0.11 | 2024-04-15 | [37325](https://github.com/airbytehq/airbyte/pull/37325) | Populate airbyte_meta.changes + error handling. | | 4.0.10 | 2024-04-15 | [37110](https://github.com/airbytehq/airbyte/pull/37110) | Internal cleanup. | | 4.0.9 | 2024-04-10 | [36919](https://github.com/airbytehq/airbyte/pull/36919) | Fix a bug in conversion of null values. |