Repository navigation
Issue #8505 : Show the tables and files of a pipeline in a Datasets tab - #9790
vbhanuchander-lang wants to merge 2 commits into
Conversation
…sets tab A Datasets tab in the execution results lists the tables and files the transforms of the pipeline declare they read and write, with the transforms that read and write each one. It is built on PipelineDatasets, so the names are the ones lineage and the data catalogs use, and nothing runs. Double-clicking a transform selects it on the canvas.
bamaer
left a comment
There was a problem hiding this comment.
Thanks @vbhanuchander-lang, building this on PipelineDatasets works well: the names match what the lineage sinks and catalogs use.
I built the PR (core, engine, ui, rcp, with checkstyle, spotless and javadoc) and ran HopGuiPipelineDatasetsDelegateTest: 4/4 pass. One thing to fix before merge, inline.
| tabFolder.addListener(SWT.Selection, showListener); | ||
| tab.addListener(SWT.Dispose, event -> tabFolder.removeListener(SWT.Selection, showListener)); | ||
|
|
||
| refresh(); |
There was a problem hiding this comment.
Should fix: this fills the tab on the UI thread as soon as it's created, and HopGuiPipelineGraph.start() creates it (addAllTabs() runs in asyncExec, before preparePipeline). So the first run of a pipeline now works out its datasets on the UI thread before it starts, and so does every later click on the tab. Most transforms are quick, but Text file input lists its files to declare them (getFilePaths → FileInputList.createFileList). On S3, SFTP or a large folder with a wildcard, that listing freezes Hop GUI. #9783 fixed the same kind of freeze in the Explorer lint marks.
Suggestion: only fill the tab when it's selected (the selection listener already does that), and compute PipelineDatasets.of(...) on a background thread. Then fill the tree with display.asyncExec, and skip the result when the tree is disposed or a newer refresh has started.
There was a problem hiding this comment.
Thanks, fixed in 8180849. The tab is only filled when it is shown or refreshed, PipelineDatasets.of runs on a background thread via BackgroundThreadFacade, and the tree is filled with asyncExec, skipping the result if the tree is disposed or a newer refresh started. Added 3 tests (hidden tab does no lookup, lookup is off the UI thread, a slow earlier lookup does not overwrite a newer one); all 3 fail on the previous commit.
…e the tab is shown The Datasets tab filled itself as soon as it was created, on the UI thread, and HopGuiPipelineGraph creates it before every first run. A transform may list files to declare them (Text file input with a wildcard on S3 or SFTP), which froze Hop GUI. The tab is now only filled when it is shown or refreshed. The lookup runs on a background thread through BackgroundThreadFacade, and the tree is filled with asyncExec, skipping the result when the tree is gone or a newer refresh has started.
For #8505, the GUI side @bamaer suggested: built on the lineage declarations instead of
analyseImpact.A Datasets tab in the execution results of a pipeline lists the tables and files its transforms declare they read and write, with the transforms that read and write each one. It comes from
PipelineDatasets, so the names match what lineage and the data catalogs use, and nothing runs and no database is queried. Double-clicking a transform selects it on the canvas. The tab refills when it is shown and has a Refresh button.Pipelines only for now: actions don't declare their datasets yet.
Tests
New
HopGuiPipelineDatasetsDelegateTest(uitest, rcp): files listed with their readers and writers, the message for a pipeline without datasets, double-click selects the transform, and the tab is registered for the pipeline graph. All 4 pass. The rest of the rcpuitestsuite passes exceptConfigurationDialogLaunchFocusTest, which also fails on main on my machine (a focus test on macOS). The user manual's execution results section describes the tab.