Skip to content

Commit 1b28dce

Browse files
authored
Revert "6339: error when attempting to use azure sql database within an elastic pool as source for cdc based replication (#13866)" (#14011)
This reverts commit 0d870bd.
1 parent 3a179a8 commit 1b28dce

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

airbyte-integrations/connectors/source-mssql/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-mssql
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=0.4.4
19+
LABEL io.airbyte.version=0.4.3
2020
LABEL io.airbyte.name=airbyte/source-mssql

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

+1-13
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
import java.io.File;
3838
import java.sql.JDBCType;
3939
import java.sql.PreparedStatement;
40-
import java.sql.ResultSet;
4140
import java.sql.SQLException;
42-
import java.sql.Statement;
4341
import java.time.Instant;
4442
import java.util.ArrayList;
4543
import java.util.List;
@@ -277,17 +275,7 @@ protected void assertCdcEnabledInDb(final JsonNode config, final JdbcDatabase da
277275
protected void assertCdcSchemaQueryable(final JsonNode config, final JdbcDatabase database)
278276
throws SQLException {
279277
final List<JsonNode> queryResponse = database.queryJsons(connection -> {
280-
boolean isAzureSQL = false;
281-
282-
try (Statement stmt = connection.createStatement();
283-
ResultSet editionRS = stmt.executeQuery("SELECT ServerProperty('Edition')")) {
284-
isAzureSQL = editionRS.next() && "SQL Azure".equals(editionRS.getString(1));
285-
}
286-
287-
// Azure SQL does not support USE clause
288-
final String sql =
289-
isAzureSQL ? "SELECT * FROM cdc.change_tables" : "USE " + config.get("database").asText() + "; SELECT * FROM cdc.change_tables";
290-
278+
final String sql = "USE " + config.get("database").asText() + "; SELECT * FROM cdc.change_tables";
291279
final PreparedStatement ps = connection.prepareStatement(sql);
292280
LOGGER.info(String.format(
293281
"Checking user '%s' can query the cdc schema and that we have at least 1 cdc enabled table using the query: '%s'",

docs/integrations/sources/mssql.md

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ If you do not see a type in this list, assume that it is coerced into a string.
302302

303303
| Version | Date | Pull Request | Subject |
304304
|:--------|:-----------| :----------------------------------------------------- |:-------------------------------------------------------------------------------------------------------|
305-
| 0.4.4 | 2022-07-20 | [13866](https://github.com/airbytehq/airbyte/pull/13866) | Omit using 'USE' keyword on Azure SQL with CDC |
306305
| 0.4.3 | 2022-07-17 | [13887](https://github.com/airbytehq/airbyte/pull/13887) | Increase version to include changes from [13854](https://github.com/airbytehq/airbyte/pull/13854) |
307306
| 0.4.2 | 2022-06-06 | [13435](https://github.com/airbytehq/airbyte/pull/13435) | Adjust JDBC fetch size based on max memory and max row size |
308307
| 0.4.1 | 2022-05-25 | [13419](https://github.com/airbytehq/airbyte/pull/13419) | Correct enum for Standard method. |

0 commit comments

Comments
 (0)