Skip to content

Commit e75ea0f

Browse files
authored
[Source-mssql] : Remove override for queryTableFullRefresh (#37110)
1 parent ce85afe commit e75ea0f

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
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: 4.0.9
12+
dockerImageTag: 4.0.10
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

-33
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.google.common.collect.ImmutableMap;
2424
import com.google.common.collect.Lists;
2525
import io.airbyte.cdk.db.factory.DatabaseDriver;
26-
import io.airbyte.cdk.db.jdbc.AirbyteRecordData;
2726
import io.airbyte.cdk.db.jdbc.JdbcDatabase;
2827
import io.airbyte.cdk.db.jdbc.JdbcUtils;
2928
import io.airbyte.cdk.db.jdbc.streaming.AdaptiveStreamingQueryConfig;
@@ -136,38 +135,6 @@ public AirbyteConnectionStatus check(final JsonNode config) throws Exception {
136135
return super.check(config);
137136
}
138137

139-
@Override
140-
public AutoCloseableIterator<AirbyteRecordData> queryTableFullRefresh(final JdbcDatabase database,
141-
final List<String> columnNames,
142-
final String schemaName,
143-
final String tableName,
144-
final SyncMode syncMode,
145-
final Optional<String> cursorField) {
146-
LOGGER.info("Queueing query for table: {}", tableName);
147-
// This corresponds to the initial sync for in INCREMENTAL_MODE. The ordering of the records matters
148-
// as intermediate state messages are emitted.
149-
if (syncMode.equals(SyncMode.INCREMENTAL)) {
150-
final String quotedCursorField = enquoteIdentifier(cursorField.get(), getQuoteString());
151-
final String newIdentifiers = getWrappedColumnNames(database, null, columnNames, schemaName, tableName);
152-
final String preparedSqlQuery =
153-
String.format("SELECT %s FROM %s ORDER BY %s ASC", newIdentifiers,
154-
getFullyQualifiedTableNameWithQuoting(schemaName, tableName, getQuoteString()), quotedCursorField);
155-
LOGGER.info("Prepared SQL query for TableFullRefresh is: " + preparedSqlQuery);
156-
return AutoCloseableIterators.transform(queryTable(database, preparedSqlQuery, tableName, schemaName),
157-
jsonNode -> new AirbyteRecordData(jsonNode, new AirbyteRecordMessageMeta()));
158-
} else {
159-
// If we are in FULL_REFRESH mode, state messages are never emitted, so we don't care about ordering
160-
// of the records.
161-
final String newIdentifiers = getWrappedColumnNames(database, null, columnNames, schemaName, tableName);
162-
final String preparedSqlQuery =
163-
String.format("SELECT %s FROM %s", newIdentifiers, getFullyQualifiedTableNameWithQuoting(schemaName, tableName, getQuoteString()));
164-
165-
LOGGER.info("Prepared SQL query for TableFullRefresh is: " + preparedSqlQuery);
166-
return AutoCloseableIterators.transform(queryTable(database, preparedSqlQuery, tableName, schemaName),
167-
jsonNode -> new AirbyteRecordData(jsonNode, new AirbyteRecordMessageMeta()));
168-
}
169-
}
170-
171138
/**
172139
* See {@link MssqlQueryUtils#getWrappedColumnNames}
173140
*/

docs/integrations/sources/mssql.md

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

328328
| Version | Date | Pull Request | Subject |
329329
|:--------|:-----------|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
330+
| 4.0.10 | 2024-04-15 | [37110](https://github.com/airbytehq/airbyte/pull/37110) | Internal cleanup. |
330331
| 4.0.9 | 2024-04-10 | [36919](https://github.com/airbytehq/airbyte/pull/36919) | Fix a bug in conversion of null values. |
331332
| 4.0.8 | 2024-04-05 | [36872](https://github.com/airbytehq/airbyte/pull/36872) | Update to connector's metadat definition. |
332333
| 4.0.7 | 2024-04-03 | [36772](https://github.com/airbytehq/airbyte/pull/36772) | Adopt latest CDK. |

0 commit comments

Comments
 (0)