Skip to content

Commit 9d513c2

Browse files
quote database name to support special characters (#201)
1 parent 0efd78b commit 9d513c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlserver-delta-plugins/src/main/java/io/cdap/delta/sqlserver/SqlServerTableRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public TableList listTables() throws IOException {
7272
try (Statement statement = connection.createStatement()) {
7373
// we have to execute query here since the metadata will return sys tables back, and we cannot filter
7474
// that, this query only works for SQL server 2005 or above
75-
String query = String.format("SELECT name FROM %s.sys.tables where is_ms_shipped = 0", config.getDatabase());
75+
String query = String.format("SELECT name FROM [%s].sys.tables where is_ms_shipped = 0", config.getDatabase());
7676
ResultSet resultSet = statement.executeQuery(query);
7777
Set<String> tableNames = new HashSet<>();
7878
while (resultSet.next()) {

0 commit comments

Comments
 (0)