modality segment
Command: modality segment
Manage and get information about segments. Segments are chunks of the data in a workspace, automatically separated based on a segmentation rule in the workspace definition file. Note that a given workspace could have multiple segmentation rules. Each rule will provide its own set of segments encompassing all the data in the workspace. Some examples of using segments could be to separate each test case in a test suite, or to separate each discrete run of a system. This command's functionality is exposed via subcommands:
# modality segment inspect
Command: modality segment inspect [segment name]
Print detailed information about the given segment. If no segment name is specified this command prints information about the current default segment (set with modality segment use
).
# Example
$ modality segment inspect 'Run 34fb505a-5d4b-44a6-a80a-08fde6c10e76'
No explicit workspace provided. Using the default workspace
'by-run-id':
Name: 'Run 34fb505a-5d4b-44a6-a80a-08fde6c10e76'
Workspace Version: 8aa8b23b-f8b0-4fd2-9a03-1fae4788bf36
Last Receive Time: 2022-07-08 23:23:55.998688731 UTC
Parameters:
timeline.run_id = 34fb505a-5d4b-44a6-a80a-08fde6c10e76
# Options
[segment name]
- Name of the segment to inspect. If not specified this command prints information about the current default segment (set with modality segment use
).
-f, --format <text | json>
- The printed output format. Defaults to text
.
--workspace-name <workspace-name>
- Name of the workspace to display data for. If not specified the current default workspace (set with modality workspace use
) will be used.
# modality segment list
Command: modality segment list
List all known segments in a workspace.
# Example
$ modality segment list
No explicit workspace provided. Using the default workspace
'by-run-id':
Name: 'Run 34fb505a-5d4b-44a6-a80a-08fde6c10e76'
Name: 'Run 763c76e7-1258-4626-ace2-14f2666e685b'
# Options
-f, --format <text | json>
- The printed output format. Defaults to text
.
--workspace-name <workspace-name>
- Name of the workspace to display data for. If not specified the current default workspace (set with modality workspace use
) will be used.
# modality segment use
Command: modality segment use [segments]
Set the default segment(s). Commands which use event and timeline data (all except config
, user
, and workspace
) will be limited to the content of these segment(s) by default.
# Example
$ modality segment use 'Run 34fb505a-5d4b-44a6-a80a-08fde6c10e76'
No explicit workspace provided. Using the default workspace
Using segments ['Run 34fb505a-5d4b-44a6-a80a-08fde6c10e76'] as the default segment
# Options
[segments]
- One or more segments to use as default. May not be used with --all
or --latest
.
--all-segments
- Instead of limiting to a single segment, include all the segments in the workspace, separately. May not be used with the [segments]
argument or the --latest
, --segmentation-rule
, or --whole-workspace
options.
--force
- Use the given name as the default segment even if it doesn't currently exist.
-f, --format <text | json>
- The printed output format. Defaults to text
.
--latest
- Use the single most recent segment (i.e. the segment which has most recently received an event or timeline attribute update) as the default. This will update automatically whenever a new segment is detected as most recent. May not be used with the [segments]
argument or the --all-segments
, --segmentation-rule
, or --whole-workspace
options.
--segmentation-rule <segmentation rule pattern>...
- Limit data to segments produced by the given segmentation rule(s). Accepts one or more segmentation rule name patterns, which can include *
or ?
as wildcards in the style of glob. May not be used with the [segments]
argument or the --all-segments
, --latest-segment
, or --whole-workspace
options.
--whole-workspace
- Limit data to the workspace as a monolithic whole unit. May not be used with the [segments]
argument or the --all-segments
, --latest-segment
, or --segmentation-rule
options.
--workspace-name <workspace-name>
- Name of the workspace to display data for. If not specified the current default workspace (set with modality workspace use
) will be used.