Add support for SQL-defined named collections in BACKUP/RESTORE#94605
Merged
pamarcos merged 3 commits intoClickHouse:masterfrom Jan 21, 2026
Merged
Add support for SQL-defined named collections in BACKUP/RESTORE#94605pamarcos merged 3 commits intoClickHouse:masterfrom
pamarcos merged 3 commits intoClickHouse:masterfrom
Conversation
…3 and AzureBlobStorage - Add BackupInfo::getNamedCollection to consolidate named collection loading, access checking, and key-value override handling for both S3 and Azure backup engines. - Call NamedCollectionFactory::instance().loadIfNot() to load SQL-defined collections before lookup. - Refactor Azure backup to reuse getAzureConnectionParams instead of duplicating connection logic. - Add integration tests for SQL-defined named collections (with and without key-value overrides) for both S3 and Azure.
Contributor
|
Workflow [PR], commit [a51c785] Summary: ❌
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for SQL-defined named collections in BACKUP/RESTORE operations for S3 and Azure Blob Storage, addressing issue #94604. Previously, only XML-configured named collections were supported.
Changes:
- Introduced
BackupInfo::getNamedCollection()to centralize named collection loading, access checking, and key-value override handling - Refactored S3 and Azure backup engines to use the new unified approach instead of directly reading from config
- Added integration tests verifying SQL-defined named collections work with and without parameter overrides
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Backups/BackupInfo.h |
Added kv_args field and getNamedCollection() method declaration |
src/Backups/BackupInfo.cpp |
Implemented getNamedCollection() with collection loading, access checks, and override support |
src/Backups/registerBackupEngineS3.cpp |
Refactored to use getNamedCollection() instead of direct config access |
src/Backups/registerBackupEngineAzureBlobStorage.cpp |
Refactored to use getNamedCollection() and getAzureConnectionParams() |
src/Storages/ObjectStorage/Azure/Configuration.h |
Exported getAzureConnectionParams() for reuse in backup engine |
src/Storages/ObjectStorage/Azure/Configuration.cpp |
Changed getConnectionParams() to getAzureConnectionParams() with public visibility |
tests/integration/test_backup_restore_s3/test.py |
Added tests for SQL-defined named collections with and without overrides |
tests/integration/test_backup_restore_azure_blob_storage/test.py |
Added tests for SQL-defined named collections with and without overrides; removed unused imports |
kssenii
reviewed
Jan 20, 2026
kssenii
approved these changes
Jan 20, 2026
Merged
via the queue into
ClickHouse:master
with commit Jan 21, 2026
4227b39
190 of 260 checks passed
This was referenced Jan 21, 2026
Merged
Merged
Merged
robot-ch-test-poll4
added a commit
that referenced
this pull request
Jan 21, 2026
Cherry pick #94605 to 25.12: Add support for SQL-defined named collections in BACKUP/RESTORE
robot-clickhouse
added a commit
that referenced
this pull request
Jan 21, 2026
…ns in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 21, 2026
Cherry pick #94605 to 25.8: Add support for SQL-defined named collections in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 21, 2026
Cherry pick #94605 to 25.10: Add support for SQL-defined named collections in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 21, 2026
Cherry pick #94605 to 25.11: Add support for SQL-defined named collections in BACKUP/RESTORE
This was referenced Jan 21, 2026
Merged
robot-clickhouse
added a commit
that referenced
this pull request
Jan 21, 2026
…ns in BACKUP/RESTORE
robot-clickhouse
added a commit
that referenced
this pull request
Jan 21, 2026
…ns in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 22, 2026
Backport #94605 to 25.10: Add support for SQL-defined named collections in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 22, 2026
Backport #94605 to 25.11: Add support for SQL-defined named collections in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 22, 2026
Backport #94605 to 25.12: Add support for SQL-defined named collections in BACKUP/RESTORE
pamarcos
added a commit
that referenced
this pull request
Jan 22, 2026
Backport #94605 to 25.8: Add support for SQL-defined named collections in BACKUP/RESTORE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for SQL-defined named collections in BACKUP/RESTORE for S3 and Azure Blob Storage
BackupInfo::getNamedCollectionto consolidate named collection loading, access checking, and key-value override handling for both S3 and Azure backup engines.NamedCollectionFactory::instance().loadIfNot()to load SQL-defined collections before lookup.getAzureConnectionParamsinstead of duplicating connection logic.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add support for SQL-defined named collections in BACKUP/RESTORE for S3 and Azure Blob Storage. Closes #94604
Documentation entry for user-facing changes