Skip to content

Commit

Permalink
change current_snapshot_id if branch is main
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKaul committed Feb 14, 2024
1 parent 46cf787 commit 2eb74b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dashtool

Dashtool is a Lakehouse build tool that turns declarative SQL queries into Iceberg tables and generates Kubernetes workflows to keep these tables up-to-date.
Dashtool is a Lakehouse build tool that builds Iceberg tables from declarative SQL queries and generates Kubernetes workflows to keep these tables up-to-date.

## Features

Expand Down
5 changes: 4 additions & 1 deletion dashtool/src/build/build_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use iceberg_rust_spec::{
spec::{
schema::SchemaBuilder,
snapshot::{SnapshotReference, SnapshotRetention},
table_metadata::new_metadata_location,
table_metadata::{new_metadata_location, MAIN_BRANCH},
view_metadata::REF_PREFIX,
},
util::strip_prefix,
Expand Down Expand Up @@ -99,6 +99,9 @@ pub(super) async fn build_dag<'repo>(
retention: SnapshotRetention::default(),
},
);
if branch == MAIN_BRANCH {
storage_table.current_snapshot_id = Some(snapshot_id);
}
let metaddata_location =
new_metadata_location(matview.metadata().into());
matview
Expand Down

0 comments on commit 2eb74b1

Please sign in to comment.