Documentation

gomask routines

Manage routines in GoMask

gomask routines

Manage routines stored in the GoMask platform.

Synopsis

gomask routines <subcommand> [OPTIONS]

Subcommands

CommandDescription
listList all routines for your team
showDisplay detailed routine information

gomask routines list

List all routines available to your team.

Synopsis

gomask routines list [OPTIONS]

Options

OptionTypeDefaultDescription
--limit INTinteger100Maximum number of routines to return
--offset INTinteger0Pagination offset

Examples

# List all routines
gomask routines list

Output:

ID    Identifier            Name                      Type        Tables  Last Run
───   ────────────────────  ────────────────────────  ──────────  ──────  ────────────
123   customer-data-gen     Customer Data Generator   Synthetic   4       2 hours ago
124   pii-masking-prod      PII Masking Production    Masking     8       1 day ago
125   test-data-staging     Test Data Staging         Synthetic   3       3 days ago
126   gdpr-anonymization    GDPR Anonymization        Masking     12      1 week ago
127   load-test-data        Load Test Data            Synthetic   6       2 weeks ago

Showing 5 of 12 routines
# Pagination
gomask routines list --limit 50
gomask routines list --limit 20 --offset 20

gomask routines show

Display detailed information about a specific routine.

Synopsis

gomask routines show ROUTINE_IDENTIFIER [OPTIONS]

Arguments

ArgumentDescription
ROUTINE_IDENTIFIERRoutine's numeric ID or string identifier

Options

OptionTypeDefaultDescription
--id INTintegernoneLook up by numeric ID
--name TEXTstringnoneLook up by name

Examples

# By identifier
gomask routines show customer-data-gen

Output:

Routine: customer-data-gen
──────────────────────────

General Information
  ID:          123
  Identifier:  customer-data-gen
  Name:        Customer Data Generator
  Type:        SyntheticRoutine
  Status:      active
  Version:     1.2.0

Description:
  Generates synthetic customer data including users, orders,
  products, and order items with realistic relationships.

Connector:
  Name:      prod-postgres
  Type:      postgresql
  Database:  myapp

Tables (4):
  ┌─────────────────┬────────┬──────────┬─────────────────┐
  │ Table           │ Level  │ Records  │ Columns         │
  ├─────────────────┼────────┼──────────┼─────────────────┤
  │ users           │ 0      │ 500      │ 12              │
  │ products        │ 0      │ 200      │ 15              │
  │ orders          │ 1      │ 1000     │ 8               │
  │ order_items     │ 2      │ 2500     │ 6               │
  └─────────────────┴────────┴──────────┴─────────────────┘
  Total: 4,200 records, 41 columns

Runtime Parameters (2):
  - record_count: integer (default: 500)
  - start_date: date (default: 2024-01-01)

Execution History:
  Last Run:      2024-01-25 08:00:00 (completed)
  Total Runs:    47
  Success Rate:  95.7%

Timestamps:
  Created:  2024-01-15 10:30:00
  Updated:  2024-01-24 14:45:00

Actions:
  Export:  gomask export customer-data-gen -o routine.yaml
  Run:     gomask run routine.yaml --watch
# By numeric ID
gomask routines show --id 123

# By name
gomask routines show --name "Customer Data"

Detailed View Sections

The detailed view includes:

SectionInformation
GeneralID, identifier, name, type, status, version
DescriptionFull description text
ConnectorDatabase connection details
TablesTable list with hierarchy, record counts, column counts
ParametersRuntime parameters with types and defaults
HistoryLast run, total runs, success rate
TimestampsCreation and update times
ActionsSuggested commands for export and run

Routine Status

StatusDescription
activeRoutine is ready for execution
inactiveRoutine is disabled
draftRoutine is incomplete or in development

Working with Routines

Create a New Routine

# Interactive setup (recommended)
gomask setup

# From example template
gomask example --type synthetic --name "My Routine"

Import/Update a Routine

# Import new routine
gomask import routine.yaml

# Update existing routine
gomask import routine.yaml --update

Export a Routine

# Export to file
gomask export customer-data-gen -o routine.yaml

# Export to stdout
gomask export customer-data-gen

Run a Routine

# Run from YAML
gomask run routine.yaml --watch

# Run with parameters
gomask run routine.yaml -p record_count=1000

Exit Codes

CodeDescription
0Command completed successfully
1Error (routine not found, permission denied, etc.)

See Also