You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte-integrations/connectors/destination-snowflake/src/main/kotlin/io/airbyte/integrations/destination/snowflake/SnowflakeDestination.kt
Copy file name to clipboardExpand all lines: airbyte-integrations/connectors/destination-snowflake/src/test-integration/kotlin/io/airbyte/integrations/destination/snowflake/SnowflakeDestinationIntegrationTest.kt
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,15 +33,20 @@ internal class SnowflakeDestinationIntegrationTest {
33
33
@Throws(Exception::class)
34
34
funtestCheckFailsWithInvalidPermissions() {
35
35
// TODO(sherifnada) this test case is assumes config.json does not have permission to access
36
-
// the
37
-
// schema
36
+
// the schema RESTRICTED_SCHEMA was created by the user AIRBYTETESTER, and then permissions
37
+
// were removed with
38
+
// 'REVOKE ALL ON SCHEMA restricted_schema FROM ROLE integration_tester_destination;'
38
39
// this connector should be updated with multiple credentials, each with a clear purpose
Copy file name to clipboardExpand all lines: airbyte-integrations/connectors/destination-snowflake/src/test-integration/kotlin/io/airbyte/integrations/destination/snowflake/typing_deduping/AbstractSnowflakeTypingDedupingTest.kt
"DELETE FROM \"airbyte_internal\".\"_airbyte_destination_state\" WHERE \"updated_at\" < timestampadd('hours', -$cleanupCutoffHours, current_timestamp())",
456
+
)
457
+
}
458
+
executor.execute {
459
+
database!!.execute(
460
+
"DELETE FROM \"AIRBYTE_INTERNAL\".\"_AIRBYTE_DESTINATION_STATE\" WHERE \"UPDATED_AT\" < timestampadd('hours', -$cleanupCutoffHours, current_timestamp())",
461
+
)
462
+
}
463
+
executor.execute {
464
+
val schemaList =
465
+
database!!.queryJsons(
466
+
"SHOW SCHEMAS IN DATABASE INTEGRATION_TEST_DESTINATION;",
467
+
)
468
+
LOGGER.info(
469
+
"tableCleaner found ${schemaList.size} schemas in database INTEGRATION_TEST_DESTINATION"
470
+
)
471
+
schemaList
472
+
.associate {
473
+
it.get("name").asText() to Instant.parse(it.get("created_on").asText())
0 commit comments