{"id":53760,"plugin_id":"plugins_6ac012b82680819195f8a26cbe32c246","kind":"skill","collection_source":"skill_api","comparison_source":null,"observed_at":"2026-10-24T13:54:59.170Z","digest":"023254488df83166267d08364e9c63ac3c36a6b9ab68e112d5626f09a148ce94","against":null,"payload":{"description":"Create Domino Launchers - parameterized web forms for self-service job execution. Enable business users to run analyses, generate reports, and trigger batch predictions without coding. Covers parameter types, email notifications, result delivery, and access control. Use when building self-service data products or enabling non-technical users.","included_files":[],"name":"domino-launchers","skill_md_contents":"---\nname: domino-launchers\ndescription: Create Domino Launchers - parameterized web forms for self-service job execution. Enable business users to run analyses, generate reports, and trigger batch predictions without coding. Covers parameter types, email notifications, result delivery, and access control. Use when building self-service data products or enabling non-technical users.\n---\n\n# Domino Launchers Skill\n\n## Description\nThis skill helps users create and use Domino Launchers - web forms that allow non-technical users to run parameterized jobs and receive results.\n\n## Activation\nActivate this skill when users want to:\n- Create self-service data products\n- Build parameterized job interfaces\n- Enable business users to run analyses\n- Generate reports on demand\n- Share reproducible workflows\n\n## What is a Launcher?\n\nA Launcher is:\n- **Web Form**: UI for entering parameters\n- **Job Trigger**: Runs a script with user inputs\n- **Results Delivery**: Sends output via email/dashboard\n- **Self-Service**: Business users can run without coding\n\n## Use Cases\n\n- **Report Generation**: Parameterized business reports\n- **Batch Predictions**: Score data on demand\n- **Data Exports**: Custom data extracts\n- **Analysis Requests**: Ad-hoc analytics\n- **Model Testing**: Test models with different inputs\n\n## Creating a Launcher\n\n### Via Domino UI\n1. Go to your project\n2. Navigate to **Deployments** > **Launchers**\n3. Click **New Launcher**\n4. Configure:\n   - **Name**: Descriptive name\n   - **Description**: What the launcher does\n   - **Command**: Script to run\n   - **Parameters**: Input fields\n   - **Hardware Tier**: Resources\n   - **Environment**: Compute environment\n\n### Launcher Script (Python)\n```python\n# generate_report.py\nimport argparse\nimport pandas as pd\n\n# Parse launcher parameters\nparser = argparse.ArgumentParser()\nparser.add_argument('--start-date', required=True)\nparser.add_argument('--end-date', required=True)\nparser.add_argument('--region', default='all')\nargs = parser.parse_args()\n\n# Generate report\ndf = generate_report(args.start_date, args.end_date, args.region)\n\n# Save results (will be available to launcher user)\ndf.to_csv('/mnt/results/report.csv', index=False)\ndf.to_html('/mnt/results/report.html', index=False)\n```\n\n### Launcher Script (R)\n```r\n# launcher.R\nargs <- commandArgs(trailingOnly = TRUE)\na <- as.integer(args[1])\nb <- as.integer(args[2])\n\nif (is.na(a)) {\n  print(\"A is not a number\")\n} else if (is.na(b)) {\n  print(\"B is not a number\")\n} else {\n  paste(\"The sum of\", a, \"and\", b, \"is:\", a + b)\n}\n```\n\nCommand: `launcher.R ${A} ${B}`\n\n### Launcher Command\n```bash\n# Python script with named arguments\npython generate_report.py --start-date ${start_date} --end-date ${end_date} --region ${region}\n\n# Python script with positional arguments\nmy_script.py -x=1 ${file} ${start_date}\n\n# R script with positional arguments\nlauncher.R ${A} ${B}\n```\n\n**Note:** Parameter values are enclosed in single quotes, preserving special characters. File parameters pass the file path. Multi-select parameters pass comma-separated values.\n\n## Parameter Types\n\n### Text Input\n```yaml\nname: customer_name\ntype: text\nlabel: Customer Name\nrequired: true\ndefault: \"\"\n```\n\n### Dropdown/Select\n```yaml\nname: region\ntype: select\nlabel: Region\noptions:\n  - North America\n  - Europe\n  - Asia Pacific\ndefault: North America\n```\n\n### Date Picker\n```yaml\nname: start_date\ntype: date\nlabel: Start Date\nrequired: true\n```\n\n### Number\n```yaml\nname: quantity\ntype: number\nlabel: Quantity\nmin: 1\nmax: 1000\ndefault: 100\n```\n\n### File Upload\n```yaml\nname: input_file\ntype: file\nlabel: Input File\naccept: .csv,.xlsx\n```\n\n## Generating Results\n\n### File-Based Results\nAny files created in `/mnt/results/` are available as results:\n\n```python\n# Save multiple output formats\ndf.to_csv('/mnt/results/data.csv')\ndf.to_excel('/mnt/results/data.xlsx')\nfig.savefig('/mnt/results/chart.png')\n```\n\n### HTML Email Content\nCreate `email.html` for custom email body:\n```python\n# Generate HTML for email\nhtml_content = f\"\"\"\n<html>\n<body>\n<h1>Report for {args.start_date} to {args.end_date}</h1>\n<p>Summary: {summary}</p>\n{df.to_html()}\n</body>\n</html>\n\"\"\"\n\nwith open('/mnt/results/email.html', 'w') as f:\n    f.write(html_content)\n```\n\n### Rich Reports\nUse notebooks for rich reports:\n```python\n# Use papermill to execute parameterized notebook\nimport papermill as pm\n\npm.execute_notebook(\n    'report_template.ipynb',\n    '/mnt/results/report.ipynb',\n    parameters={\n        'start_date': args.start_date,\n        'end_date': args.end_date\n    }\n)\n```\n\n## Notifications\n\n### Email Configuration\nConfigure notification recipients:\n1. In launcher settings\n2. Add email addresses\n3. Results sent automatically on completion\n\n### Email Contents\n- Link to results in Domino\n- Attached files (if enabled)\n- Custom HTML body (if email.html created)\n\n## Access Control\n\n### Who Can Run Launchers\n- **Contributors**: Can create and run launchers\n- **Launcher Users**: Can run launchers only\n- **Results Consumers**: Can view results only\n\n### Setting Permissions\n1. Go to Project Settings\n2. Add users with appropriate roles\n3. Share launcher URL with users\n\n## Running a Launcher\n\n### Via UI\n1. Go to launcher page\n2. Fill in parameters\n3. Click **Run**\n4. Wait for results (email notification)\n\n### Via API\n```python\nimport requests, os\n\nTOKEN = requests.get(\"http://localhost:8899/access-token\").text.strip()\nBASE = os.environ[\"DOMINO_API_HOST\"]\n\nresponse = requests.post(\n    f\"{BASE}/v4/launchers/{{launcher_id}}/run\",\n    headers={\"Authorization\": f\"Bearer {TOKEN}\"},\n    json={\n        \"parameters\": {\n            \"start_date\": \"2024-01-01\",\n            \"end_date\": \"2024-01-31\",\n            \"region\": \"North America\"\n        }\n    }\n)\n\nrun_id = response.json()[\"runId\"]\n```\n\n## Viewing Results\n\n### Via Email\nResults link sent to configured recipients.\n\n### Via Jobs Dashboard\nEach launcher run creates a job:\n1. Go to **Jobs** in project\n2. Find the launcher job\n3. View results in job details\n\n### Programmatic Access\n```python\n# Get launcher run results\nresults = domino.runs_get_results(run_id)\n```\n\n## Example: Scoring Launcher\n\n### Script (score_data.py)\n```python\nimport argparse\nimport pandas as pd\nimport joblib\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--input-file', required=True)\nparser.add_argument('--output-format', default='csv')\nargs = parser.parse_args()\n\n# Load model\nmodel = joblib.load('/mnt/artifacts/model.joblib')\n\n# Load and score data\ndf = pd.read_csv(args.input_file)\npredictions = model.predict(df)\ndf['prediction'] = predictions\n\n# Save results\nif args.output_format == 'csv':\n    df.to_csv('/mnt/results/predictions.csv', index=False)\nelse:\n    df.to_excel('/mnt/results/predictions.xlsx', index=False)\n```\n\n### Launcher Configuration\n```yaml\nname: Score Customer Data\ncommand: python score_data.py --input-file ${input_file} --output-format ${output_format}\nparameters:\n  - name: input_file\n    type: file\n    label: Customer Data (CSV)\n    required: true\n  - name: output_format\n    type: select\n    label: Output Format\n    options: [csv, xlsx]\n    default: csv\n```\n\n## Best Practices\n\n### 1. Clear Parameter Names\nUse descriptive labels users understand.\n\n### 2. Input Validation\n```python\n# Validate inputs in script\nif args.end_date < args.start_date:\n    raise ValueError(\"End date must be after start date\")\n```\n\n### 3. Progress Logging\n```python\nprint(\"Loading data...\")\nprint(f\"Processing {len(df)} records...\")\nprint(\"Generating report...\")\nprint(\"Complete!\")\n```\n\n### 4. Error Handling\n```python\ntry:\n    process_data()\nexcept Exception as e:\n    # Save error message as result\n    with open('/mnt/results/error.txt', 'w') as f:\n        f.write(f\"Error: {str(e)}\")\n    raise\n```\n\n### 5. Documentation\nInclude help text in launcher description.\n\n## Troubleshooting\n\n### Launcher Fails\n- Check script runs manually first\n- Verify file paths are correct\n- Review job logs for errors\n\n### No Email Received\n- Check email addresses configured\n- Verify email server settings (admin)\n- Check spam folder\n\n### Wrong Results\n- Verify parameter passing\n- Check variable substitution syntax\n- Test with known inputs\n\n## Documentation Reference\n- [Use Launchers](https://docs.dominodatalab.com/en/latest/user_guide/f4e1e3/use-launchers/)\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}