Run, Preview and Debug a Pipeline
Running a Pipeline
Running a pipeline to see how it performs can be done by completing one of the following tasks:
-
Using the Run
icon
-
Select Run and Start execution from the top menu
-
Pressing F8
In the pipeline run dialog, hit the 'New' button in the upper right corner to create a new 'Pipeline run configuration'.
In the dialog that pops up, add 'Local Pipeline' as the pipeline configuration name and choose the 'Local pipeline engine' as engine type.
Click 'Ok' to return to the pipeline run dialog.
Choose the logging level as described below.
| LogLevel | Description |
|---|---|
Nothing |
Do not record any logging output. |
Error |
Only record errors in logging output. |
Minimal |
Only use minimal logging. |
Basic |
This is the default logging level. |
Detailed |
This logging level gives a detailed logging output. |
Debugging |
Results in a very detailed output for debugging purposes. |
Row Level |
Logging at row level. |
If the pipeline has parameters, give them a value on the Parameters tab of this dialog, or leave the value empty to use the default value. See Working with parameters.
Make sure your configuration is selected and hit 'Launch'.
When a pipeline has run successfully, a check mark is displayed in the upper right corner of each transform. With more than one copy, that check is shown only when every copy of the transform has finished. Until then the corner shows how many copies are done. See Specify copies.
The transforms also show a little table icon, giving you access to a preview of the results of that transform.
When a pipeline fails, a red triangle is shown in the upper right corner of the failed transform. Hover your mouse over the red error triangle to take a quick peek at the error message. The full stacktrace is available in the logs. Check pipeline error handling to learn about how you can handle errors in your pipeline gracefully (which is not necessarily what you want).
After each run the execution results are displayed in the panel on the bottom of your window. The panel has these tabs:
-
Logging: the log of the pipeline.
-
Metrics: the metrics of each transform.
-
Problems: the results of the checks of the pipeline and of the linter.
-
Revisions: the git history of the pipeline file, when Git is enabled.
The same tabs are shown for a workflow, see Run and Debug a Workflow.
Logging
The Logging tab displays the log of the pipeline according to the log level chosen on execution.
Metrics
The Metrics tab displays metrics per transform.
Following metrics are displayed:
| the metrics in this table can be captured and processed in a standard pipeline (e.g to write to a database table or Apache Kafka topic) with a Pipeline Log |
|
the metrics available in this table depend on your Pipeline run configuration. The Local pipeline engine always shows these metrics in real-time. |
| Metric | Description |
|---|---|
Copy |
The transform copy these metrics apply to. See Specify Copies for more details |
Input |
Number of rows read from an input source like files, relational or NoSql databases etc |
Read |
Number of rows coming from previous transform |
Written |
Number of rows leaving this transform toward next transform |
Output |
Number of rows written to an output target like files, relational or NoSql databases etc |
Updated |
Number of rows updated by the transform in an output target like files, relational or NoSql databases etc |
Rejected |
Number of rows that were rejected by the transform and diverted to an error handling transform |
Errors |
Number of errors in the execution of this transform that were not diverted to an error handling transform (marked by a red error triangle on the transform) |
Buffers Input |
Number of rows in the input buffer for this transform (can only higher than 0 during execution) |
Buffers Output |
Number of rows in the output buffer for this transform (can only higher than 0 during execution) |
Duration |
The execution duration for this transform |
Speed |
The execution speed in rows per second for this transform. This is close to the number of rows processed (written or output) by this transform divided by the duration (not exact because of rounding in the duration) |
Status |
The transform status; one of Empty, Initializing, Running, Idle, Paused, Halting, Halted, Stopped, Finished or Disposed |
Problems
When the linter is installed and switched on, the Problems tab lists its findings for the file as soon as the file has been linted: when you open it, when you save it, and shortly after you stop editing. Verify this pipeline on the toolbar adds the remarks of Hop’s own checks next to them. Double-click a remark to open the transform it is about. The toolbar of the tab can collapse and expand all remarks, and Force refresh clears the database cache and checks the pipeline again.
Revisions
The Revisions tab lists the commits of the pipeline file, with the columns Message, Author, Date and Commit. It is shown when Enable the git plugin is on (see Git Configuration options) and Hop has found a git repository for the project, see Working with git. For a file that isn’t saved yet, that is outside the git repository, or that has no commit yet, the tab shows a message instead of the list.
Select a commit and use Show text diff or Show visual diff on the toolbar of the tab to compare that version with the file as it is saved now; double-clicking a commit also shows the text diff. When the pipeline has changes that aren’t saved yet, Hop warns that the comparison is made with the last saved version.
Preview and debug a pipeline
To inspect pipeline data while controlling how execution pauses, use Preview & debug (toolbar, Run menu, or transform actions). This opens a single dialog for preview rows and optional breakpoint behavior.
You can start it in any of these ways:
-
Using the preview
icon on the pipeline toolbar
-
Select Run and Preview & debug from the top menu
-
Select Preview & debug output from the transform action menu
-
Click on the tiny bottom right icon after running the pipeline
In the dialog, choose the transform whose rows you want to inspect. Set how many rows to retrieve (Retrieve first rows), and optionally enable Pause on breakpoint and define a condition so the pipeline pauses when that condition matches a row. When finished press Quick Launch. To change the pipeline run configuration, click Configure.
The collected rows are shown in the preview window when execution pauses or finishes.
Debug a pipeline
Debug starts a local session and parks every transform before the first row.
A Debug mode badge stays in the top left of the canvas.
Each hop shows cursor at stored: how far the next transform has read, and how many rows are kept on that hop.
A green border means that transform is running.
A blue border means it is parked.
Several transforms can run at the same time.
Click Debug again, or Exit debug, to leave the session and return to the editor.
The Debugger tab in the execution results has the transforms, the hops, and the rows on the selected hop.
-
Process 1 runs the selected transform copies for one row. Process N uses the number in the N field. A copy only takes a row when one is waiting. A request for more rows than the hop holds does not take rows that arrive later.
-
Try runs the selected copies and then puts the input cursors back. It does not undo the transform’s own state or side effects. Sort rows, Group by, Unique rows, Add sequence, Table output, and similar transforms will see the row again if you process it for real afterwards. The button asks before it runs.
-
Run selected lets those copies run until they finish. Run to here runs upstream until a row reaches the selection.
-
Continue and Pause run or park the whole pipeline.
-
Save, Open, and Delete keep a session in the debug sessions folder from the configuration perspective. Open loads the rows into a new local session. Import on the hop toolbar appends a tab-separated file to the selected hop.
-
Follow output, when it is on, selects the first output hop of the transform you click.
-
The hop toolbar rewinds a hop to the first stored row, or clears the rows on the selected hops. Clear keeps the producer’s finished flag, so a reader whose producer has already finished does not wait forever. Rewind is refused once that reader has finished.
-
Rows shows one page of the stored rows. The column is the row’s place in the hop, starting at 1. The arrows move a page, and Rows sets how many rows a page holds, up to 5,000. New rows are added to the current page instead of rebuilding it. with the target button jumps to that row. Find and Find next search the stored rows without loading the whole hop.
Keyboard shortcuts, when the pipeline graph has focus:
-
Process 1 is F10, or F6 on macOS.
-
Continue is F11, or F9 on macOS.
-
Pause is Shift+F11, or Shift+F9 on macOS.
-
Exit debug is Ctrl+F2, or Command+F2 on macOS.
Debug does not stop a pipeline that is already running. Stop that run first. Leaving the session with Exit debug, closing the graph, or starting a normal run removes the hop buffers and the spill files. A normal run does not keep the yellow step marker.
Run part of the pipeline
Run selected or Continue leaves the chosen transforms running and the others parked. The hop labels keep up with the rows that have been written and read.
Step one row
With a transform selected, Process 1 lets that copy handle a single row and then parks it again. The rows on its output hop show what that step produced.
Pause when a row matches
The filter button on the hop toolbar opens Pause when a row enters this hop. The condition uses the fields on that hop, which are the output of the transform that writes it. Pause chooses what stops when a matching row arrives:
-
This transform parks the transform that wrote the row.
-
The whole pipeline parks every transform.
-
Downstream transforms parks the transform that reads the hop, and everything after it.
The matching row is already stored on the hop.
The next row is what waits.
A hop with a condition shows pause on its label.
The clear button on the hop toolbar removes the condition.
Finding and exporting table data
The toolbar above preview windows and other table grids in Hop Gui can find a value or a column, and export the rows.
The Find (search) icon opens a menu with two items:
-
Find value, also
Ctrl+F(Cmd+Fon macOS) in the table, searches the cells for text.-
Tick Case sensitive to match upper and lower case exactly, or Regular expression to search with a pattern.
-
Only the checked columns are searched. All columns, hidden ones included, are checked when the dialog opens; All and None change that.
-
Find first starts at the top of the table. Find next starts at the selected cell, and after a match continues after it.
-
The search goes row by row, from left to right, and doesn’t start over at the top: after the last match it shows No more matches.
-
-
Find column lists the columns. Pick one and the table scrolls to it. A hidden column is shown again.
The two export icons write the rows of the table to a file:
-
Export this data to a CSV file: comma-separated, with every value in double quotes, in UTF-8.
-
Export this data to a new Excel spreadsheet: an
.xlsxfile with a bold header row.
Both ask which columns to export, with all of them selected, and also write the # row number column first.
In Hop Gui the file is written to the temporary folder and opened with the program that handles the file type. Hop Web asks where to save it.
Table views
Preview windows (and other table grids in Hop Gui) can contain a large number of columns. A table view is a named subset of those columns, in the order you want to see them. Hidden columns stay in the data and are still exported, copied or saved. A view can also carry filters on its columns: rows that do not match are hidden while the view is applied, and come back with Show all columns. Row filters are offered when browsing data, such as Show rows. A grid that edits configuration leaves Add filter and Remove filter disabled and does not hide rows for a saved filter, so confirming the dialog still keeps every row.
Open the Table views dialog from the table toolbar icon, from the row context menu, or from the column header context menu.
In the dialog:
-
The dialog opens with every column in Columns in view (columns on screen first, then the rest) and with any filters already applied from the column header. Use current layout copies the columns that are visible now.
-
Move fields between Available columns and Columns in view, and use the arrow up and arrow down buttons in the middle to set the display order.
-
Add filter picks a column and then shows the unique sorted values of that column, where you select the values to keep. An
<null>entry covers empty values. The filter shows up asColumn-Name : value1,value2,value3in the Applied filters list, and Remove filter takes the selected filters out again. -
A column with more than 500 unique values asks for confirmation before the values are listed.
-
Apply shows only the selected columns, in that order, and hides the rows that do not match the applied filters. Filtered columns get a filter icon in their header.
-
Show all columns restores the full table: every column and every row comes back.
-
Save stores the view, including its filters, so you can reuse it later.
Views are stored per project in the Hop audit folder and are matched by column name.
A view such as customer-bk-fields can be applied to any table that has those field names, not only the preview where you created it.
The column header context menu can hide that column, add a filter on it, or remove the filter it already has. Remove filter stays disabled until that column has a filter.
Add filter lists the unique sorted values of that column, the same way the dialog does. Select the values to keep and press OK.
The filter is applied straight away. The column header shows a filter icon, and only the matching rows stay visible.
You can also drag headers to reorder them (desktop Hop Gui). Those one-off changes can be captured with Use current layout and then saved as a named view.
The table toolbar itself can be turned on or off with Show a toolbar above tables in the Configuration perspective.