-
Notifications
You must be signed in to change notification settings - Fork 9
fix(flows): FlowAppendView support for 'once' flag by forcing batch read #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
liamperritt
merged 3 commits into
databricks-solutions:main
from
liamperritt:fix/append-view-once
Apr 7, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
.../bronze_sample/src/dataflows/feature_samples/dataflowspec/append_view_once_flow_main.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "dataFlowId": "append_view_once_flow", | ||
| "dataFlowGroup": "feature_samples_general", | ||
| "dataFlowType": "flow", | ||
| "targetFormat": "delta", | ||
| "targetDetails": { | ||
| "table": "append_view_once_flow", | ||
| "tableProperties": { | ||
| "delta.enableChangeDataFeed": "true" | ||
| } | ||
| }, | ||
| "flowGroups": [ | ||
| { | ||
| "flowGroupId": "main", | ||
| "flows": { | ||
| "f_customer_append_view_once": { | ||
| "flowType": "append_view", | ||
| "flowDetails": { | ||
| "targetTable": "append_view_once_flow", | ||
| "sourceView": "v_append_view_once_flow", | ||
| "once": true | ||
| }, | ||
| "views": { | ||
| "v_append_view_once_flow": { | ||
| "mode": "batch", | ||
| "sourceType": "delta", | ||
| "sourceDetails": { | ||
| "database": "{staging_schema}", | ||
| "table": "customer" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens in streaming flows if you have this turned on, have we tested this? and can we please add a sample for this as well if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've successfully tested this manually, but I'm happy to add a sample as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, yeah that would be good if you could add one into the features samples under bronze, we use these as regression testing for now and will later turn into the tests for CICD pipeline so if we have a test for every feature that would help make sure we don't break anything on future developments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds good.
I just finished testing this change on new samples locally with these results:
mode: batch, the flow succeeds (the batch view is inserted "once" into the target streaming table during the initial pipeline run, and then ignored in subsequent runs).mode: stream, the flow fails withView 'v_append_view_once_stream_flow' is a streaming view and must be referenced using readStream.This behaviour is expected, as customers should only ever use a batch view as the source for an append
onceflow. As outlined in the append_flow documentation:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a link to my test pipeline run: https://e2-demo-field-eng.cloud.databricks.com/pipelines/d55b8d12-d5c0-4e8e-85d9-234f3d99d594/updates/d2073a2f-c1ca-4094-9727-7b18212c67bd?o=1444828305810485
The relevant table is named
append_view_once_flow