Skip to content

Commit

Permalink
Remove catalog_name from snowflake metadata audit query (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
raveeram committed Aug 4, 2022
1 parent cd61d77 commit b243340
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class SnowflakeConnectorTableService extends JdbcConnectorTableService {
private static final String COL_LAST_ALTERED = "LAST_ALTERED";
private static final String SQL_GET_AUDIT_INFO
= "select created, last_altered from information_schema.tables"
+ " where table_catalog=? and table_schema=? and table_name=?";
+ " where table_schema=? and table_name=?";
private static final String JDBC_UNDERSCORE = "_";
private static final String JDBC_ESCAPE_UNDERSCORE = "\\_";

Expand Down Expand Up @@ -199,8 +199,7 @@ protected void setTableInfoDetails(final Connection connection, final TableInfo
PreparedStatement statement = connection.prepareStatement(SQL_GET_AUDIT_INFO)
) {
statement.setString(1, tableName.getDatabaseName());
statement.setString(2, tableName.getDatabaseName());
statement.setString(3, tableName.getTableName());
statement.setString(2, tableName.getTableName());
try (ResultSet resultSet = statement.executeQuery()) {
if (resultSet.next()) {
final AuditInfo auditInfo =
Expand Down

0 comments on commit b243340

Please sign in to comment.