Skip to content

Commit

Permalink
[Fix] Add views to the Table list in athena-sqlserver connector (#2170)
Browse files Browse the repository at this point in the history
Co-authored-by: ejeffrli <[email protected]>
  • Loading branch information
Jithendar12 and ejeffrli authored Aug 15, 2024
1 parent 5e3a2d2 commit 6899f8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public class SqlServerMetadataHandler extends JdbcMetadataHandler
"WHERE t.object_id = (select object_id from sys.objects o where o.name = ? " +
"and schema_id = (select schema_id from sys.schemas s where s.name = ?))";
static final String VIEW_CHECK_QUERY = "select TYPE_DESC from sys.objects where name = ? and schema_id = (select schema_id from sys.schemas s where s.name = ?)";
static final String LIST_PAGINATED_TABLES_QUERY = "SELECT t.name AS \"TABLE_NAME\", s.name AS \"TABLE_SCHEM\" FROM sys.tables t INNER JOIN sys.schemas s ON t.schema_id = s.schema_id ORDER BY table_name OFFSET ? ROWS FETCH NEXT ? ROWS ONLY;";
static final String LIST_PAGINATED_TABLES_QUERY = "SELECT o.name AS \"TABLE_NAME\", s.name AS \"TABLE_SCHEM\" FROM sys.objects o INNER JOIN sys.schemas s ON o.schema_id = s.schema_id WHERE o.type IN ('U', 'V') ORDER BY table_name OFFSET ? ROWS FETCH NEXT ? ROWS ONLY;";

public SqlServerMetadataHandler(java.util.Map<String, String> configOptions)
{
Expand Down

0 comments on commit 6899f8b

Please sign in to comment.