Sets the author, commit message, and/or extra info for the most recent
snapshot in a DuckLake catalog by updating the ducklake_snapshot_changes
metadata table directly.
Usage
set_snapshot_metadata(
ducklake_name,
author = NULL,
commit_message = NULL,
commit_extra_info = NULL,
conn = NULL
)Arguments
- ducklake_name
The name of the DuckLake catalog
Optional author name to associate with the snapshot
- commit_message
Optional commit message describing the changes
- commit_extra_info
Optional extra information about the commit
- conn
Optional DuckDB connection object. If not provided, uses the default ducklake connection.
Details
This function retroactively updates metadata on the most recent snapshot.
To set metadata at commit time, use the author, commit_message,
and commit_extra_info arguments in commit_transaction() or
with_transaction() instead.
See also
Other transactions:
begin_transaction(),
commit_transaction(),
rollback_transaction(),
with_transaction()
Examples
if (FALSE) { # \dontrun{
begin_transaction()
# ... make changes ...
commit_transaction()
# Add metadata to the snapshot after the fact
set_snapshot_metadata(
ducklake_name = "my_ducklake",
author = "Data Team",
commit_message = "Updated station names for clarity"
)
} # }
