|
23 | 23 | import com.google.common.collect.ImmutableMap;
|
24 | 24 | import com.google.common.collect.Lists;
|
25 | 25 | import io.airbyte.cdk.db.factory.DatabaseDriver;
|
26 |
| -import io.airbyte.cdk.db.jdbc.AirbyteRecordData; |
27 | 26 | import io.airbyte.cdk.db.jdbc.JdbcDatabase;
|
28 | 27 | import io.airbyte.cdk.db.jdbc.JdbcUtils;
|
29 | 28 | import io.airbyte.cdk.db.jdbc.streaming.AdaptiveStreamingQueryConfig;
|
@@ -136,38 +135,6 @@ public AirbyteConnectionStatus check(final JsonNode config) throws Exception {
|
136 | 135 | return super.check(config);
|
137 | 136 | }
|
138 | 137 |
|
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 |
| - |
171 | 138 | /**
|
172 | 139 | * See {@link MssqlQueryUtils#getWrappedColumnNames}
|
173 | 140 | */
|
|
0 commit comments