Skip to content

Commit

Permalink
feat: allow configuring of object storage files deletion for warehous…
Browse files Browse the repository at this point in the history
…e destinations (#1896)
  • Loading branch information
shekhar-rudder authored Feb 12, 2025
1 parent b9bb684 commit 2547b0c
Show file tree
Hide file tree
Showing 33 changed files with 161 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"syncFrequency",
"syncStartAt",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/azure_datalake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"syncStartAt": {
"type": "string"
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
},
"oneTrustCookieCategories": {
"type": "object",
"properties": {
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/azure_datalake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
"default": false,
"footerNote": "Use this to Grant limited access to Azure Storage resources using shared access signatures (SAS)"
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false
},
{
"type": "singleSelect",
"label": "Sync Frequency",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"skipTracksTable",
"skipUsersTable",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/azure_synapse/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,12 @@
"required": ["useRudderStorage"]
},
"then": {
"properties": {
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketProvider"]
}
},
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/azure_synapse/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,16 @@
"label": "Use SSL for connection",
"value": "useSSL",
"default": true
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/bq/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"underscoreDivideNumbers",
"allowUsersContextTraits",
"partitionColumn",
"cleanupObjectStorageFiles",
"partitionType"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/bq/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
}
}
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
},
"jsonPaths": {
"type": "string",
"pattern": "(^env[.].*)|.*"
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/bq/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
"footerNote": "Create a service account in your GCP Project for RudderStack with roles of 'BigQuery User'",
"secret": true
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false
},
{
"type": "singleSelect",
"label": "Sync Frequency",
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/clickhouse/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"excludeWindow",
"useRudderStorage",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/clickhouse/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,12 @@
"required": ["useRudderStorage"]
},
"then": {
"properties": {
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketProvider"]
}
},
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/clickhouse/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,16 @@
"label": "Use SSL for connection",
"value": "useSSL",
"default": true
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/deltalake/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"externalLocation",
"useRudderStorage",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/deltalake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,12 @@
"required": ["useRudderStorage"]
},
"then": {
"properties": {
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketProvider"]
}
},
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/deltalake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,16 @@
"required": true,
"secret": true,
"footerNote": "Create a service account in your GCP Project for RudderStack with roles of 'storage.objectCreator'"
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"skipUsersTable",
"syncStartAt",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/gcs_datalake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"type": "boolean",
"default": true
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
},
"tableSuffix": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*"
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/gcs_datalake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
"required": false,
"placeholder": "e.g: TABLE_SUFFIX_PATH"
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false
},
{
"type": "singleSelect",
"label": "Choose time window layout",
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/mssql/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"excludeWindow",
"useRudderStorage",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/mssql/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@
"type": "string",
"enum": ["S3", "GCS", "AZURE_BLOB", "MINIO"],
"default": "MINIO"
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketProvider"]
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/mssql/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,16 @@
"label": "Use SSL for connection",
"value": "useSSL",
"default": true
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/postgres/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"clientCert",
"serverCA",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
6 changes: 6 additions & 0 deletions src/configurations/destinations/postgres/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,12 @@
"required": ["useRudderStorage"]
},
"then": {
"properties": {
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketProvider"]
}
},
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/postgres/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,16 @@
"label": "Use SSL for connection",
"value": "useSSL",
"default": true
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/rs/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"jsonPaths",
"useRudderStorage",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"web": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/rs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,10 @@
"enableSSE": {
"type": "boolean",
"default": false
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["bucketName"],
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/rs/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,16 @@
"name": "useRudderStorage",
"selectedValue": false
}
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/s3_datalake/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"timeWindowLayout",
"enableSSE",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/s3_datalake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"syncStartAt": {
"type": "string"
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
},
"oneTrustCookieCategories": {
"type": "object",
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/s3_datalake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@
"value": "enableSSE",
"default": false
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
},
{
"type": "singleSelect",
"label": "Sync Frequency",
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/snowflake/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"privateKey",
"privateKeyPassphrase",
"underscoreDivideNumbers",
"cleanupObjectStorageFiles",
"allowUsersContextTraits"
],
"android": [
Expand Down
4 changes: 4 additions & 0 deletions src/configurations/destinations/snowflake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,10 @@
"prefix": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"cleanupObjectStorageFiles": {
"type": "boolean",
"default": false
}
},
"required": ["cloudProvider"]
Expand Down
10 changes: 10 additions & 0 deletions src/configurations/destinations/snowflake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*",
"required": true,
"footerNote": "Create a service account in your GCP Project for RudderStack with roles of 'storage.objectCreator'"
},
{
"type": "checkbox",
"label": "Enable for cleanup of object storage files (deletion) after successful sync",
"value": "cleanupObjectStorageFiles",
"default": false,
"preRequisiteField": {
"name": "useRudderStorage",
"selectedValue": false
}
}
]
},
Expand Down

0 comments on commit 2547b0c

Please sign in to comment.