Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Aug 12, 2024
1 parent 76c96d6 commit 65d0f68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public JdbcSource(JdbcSourceConfig jdbcSourceConfig) {
JdbcCatalogUtils.getTables(
jdbcSourceConfig.getJdbcConnectionConfig(),
jdbcSourceConfig.getTableConfigList(),
this.jdbcSourceConfig);
this.jdbcSourceConfig.getDialectName());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.JdbcCatalogOptions;
import org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.utils.CatalogUtils;
import org.apache.seatunnel.connectors.seatunnel.jdbc.config.JdbcConnectionConfig;
import org.apache.seatunnel.connectors.seatunnel.jdbc.config.JdbcSourceConfig;
import org.apache.seatunnel.connectors.seatunnel.jdbc.config.JdbcSourceTableConfig;
import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.connection.JdbcConnectionProvider;
import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect;
Expand Down Expand Up @@ -66,15 +65,15 @@ public class JdbcCatalogUtils {
public static Map<TablePath, JdbcSourceTable> getTables(
JdbcConnectionConfig jdbcConnectionConfig,
List<JdbcSourceTableConfig> tablesConfig,
JdbcSourceConfig sourceConfig)
String dialectName)
throws SQLException, ClassNotFoundException {
Map<TablePath, JdbcSourceTable> tables = new LinkedHashMap<>();

JdbcDialect jdbcDialect =
JdbcDialectLoader.load(
jdbcConnectionConfig.getUrl(),
jdbcConnectionConfig.getCompatibleMode(),
sourceConfig.getDialectName());
dialectName);
Optional<Catalog> catalog = findCatalog(jdbcConnectionConfig, jdbcDialect);
if (catalog.isPresent()) {
try (AbstractJdbcCatalog jdbcCatalog = (AbstractJdbcCatalog) catalog.get()) {
Expand Down

0 comments on commit 65d0f68

Please sign in to comment.