Skip to content

Commit c9ba9df

Browse files
authored
🐛 Change null cursor value query to not use IIF sql function (#35405)
1 parent 875df79 commit c9ba9df

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

airbyte-integrations/connectors/source-mssql/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data:
99
connectorSubtype: database
1010
connectorType: source
1111
definitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1
12-
dockerImageTag: 3.7.0
12+
dockerImageTag: 3.7.1
1313
dockerRepository: airbyte/source-mssql
1414
documentationUrl: https://docs.airbyte.com/integrations/sources/mssql
1515
githubIssueLabel: source-mssql

airbyte-integrations/connectors/source-mssql/src/main/java/io/airbyte/integrations/source/mssql/MssqlSource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public class MssqlSource extends AbstractJdbcSource<JDBCType> implements Source
108108
""";
109109
public static final String NULL_CURSOR_VALUE_WITH_SCHEMA_QUERY =
110110
"""
111-
SELECT CAST(IIF(EXISTS(SELECT TOP 1 1 FROM "%s"."%s" WHERE "%s" IS NULL), 1, 0) AS BIT) AS %s
111+
SELECT CASE WHEN (SELECT TOP 1 1 FROM "%s"."%s" WHERE "%s" IS NULL)=1 then 1 else 0 end as %s
112112
""";
113113
public static final String DRIVER_CLASS = DatabaseDriver.MSSQLSERVER.getDriverClassName();
114114
public static final String MSSQL_CDC_OFFSET = "mssql_cdc_offset";

docs/integrations/sources/mssql.md

+1
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configura
342342

343343
| Version | Date | Pull Request | Subject |
344344
|:--------|:-----------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
345+
| 3.7.1 | 2024-02-20 | [35405](https://github.com/airbytehq/airbyte/pull/35405) | Change query syntax to make it compatible with Azure Synapse. |
345346
| 3.7.0 | 2024-01-30 | [33311](https://github.com/airbytehq/airbyte/pull/33311) | Source mssql with checkpointing initial sync. |
346347
| 3.6.1 | 2024-01-26 | [34573](https://github.com/airbytehq/airbyte/pull/34573) | Adopt CDK v0.16.0. |
347348
| 3.6.0 | 2024-01-10 | [33700](https://github.com/airbytehq/airbyte/pull/33700) | Remove CDC config options for data_to_sync and snapshot isolation. |

0 commit comments

Comments
 (0)