CARVIEW |
Select Language
HTTP/2 200
date: Tue, 14 Oct 2025 22:21:16 GMT
content-type: text/html; charset=utf-8
server: cloudflare
access-control-allow-origin: *
cache-control: public, max-age=0, must-revalidate
content-disposition: inline
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=9NjHYMXMhyapGWhqP4o8sux4YTGLTJrX7IELH8IVwYrl8%2FwNqojwa4N9O2CupFNaYkSTxGiBsFkWh6OIjP0gjZeLOhQlGpEBoU6FwAkM%2BzaD%2Fw%3D%3D"}]}
x-matched-path: /docs/sgr-advanced/working-with-data/committing-changes
x-vercel-cache: HIT
x-vercel-id: fra1::m2jg5-1760480475234-ea7214e13c7b
vary: Accept-Encoding
x-varnish: 229478
age: 50155
via: 1.1 varnish (Varnish/6.5)
x-cache: MISS
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
strict-transport-security: max-age=63072000
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 98ea77f538604415-BOM
alt-svc: h3=":443"; ma=86400
Committing changes | Splitgraph Try Now
Advanced sgr usage

Splitgraph has been acquired by EDB! Read the blog post.
Seafowl NEW!
Try Now
- Add DataExplore DataQuery DataSearch Data
Advanced sgr usage
Committing changes
To commit changes to a checked-out repository, use
sgr commit
. This will record the
data in the audit triggers as a series of new sgr
objects and create a new
image with those objects.
Example
$ sgr commit example/repo_2 --message "My first image"
$ sgr show example/repo_2:latest
$ sgr table example/repo_2:latest demo
Committing example/repo_2...
Storing and indexing table demo
100%|██████████████| 1/1 [00:00<00:00, 4.44objs/s]
Committed example/repo_2 as 48407a3cef8a.
Image example/repo_2:48407a3cef8a9ed3e54d88c6f3768385cc8d3e8e14c1034062decdc265f3d172
My first image
Created at 2020-04-06T10:18:11.218442
Size: 1.48 KiB
Parent: 97900a8279627ec22b355d1211dd824f78f5840b6a0e30e1d285f4e5c6120016
Tables:
demo
Table example/repo_2:48407a3cef8a9ed3e54d88c6f3768385cc8d3e8e14c1034062decdc265f3d172/demo
Size: 1.48 KiB
Rows: 10
Columns:
key (integer, PK)
value (character varying)
Objects:
o26c6d8345cba276f807d7bcf906531568f309c2609a3420d98c01a6c99b166
o4882c12cdc4cb5b4e89481ebdb71585998633f19a72652debbb80980ae0f0b
Splitgraph stores the demo
table as a new object in this image, and the object
only includes the 6 changed rows, as opposed to the whole table.
Tag the new image and check out the old one:
$ sgr tag example/repo_2 new_data
$ sgr checkout example/repo_2:original_data
$ sgr sql --schema example/repo_2 "SELECT * FROM demo ORDER BY key"
You should see the original contents of the table before all changes. Check out the new copy:
$ sgr checkout example/repo_2:new_data
$ sgr sql --schema example/repo_2 "SELECT * FROM demo ORDER BY key"
Behind the scenes, this replays the changes packaged up in the patch object against the original copy of the table.
Table of contents
Splitgraph
Splitgraph Inc, registered in Delaware, USA
Splitgraph Limited, registered in England and Wales No. 11657324
Made with
on four continents.