$npx -y skills add datarobot-oss/datarobot-agent-skills --skill datarobot-data-preparationTools and guidance for data upload, dataset management, data validation, and preparing data for DataRobot projects. Use when uploading datasets, managing data, or validating data for DataRobot.
| 1 | # DataRobot Data Preparation Skill |
| 2 | |
| 3 | This skill provides guidance for preparing and managing data in DataRobot, including uploading datasets, validating data quality, and managing dataset versions. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | **Most common use case**: Upload and validate a dataset |
| 8 | |
| 9 | 1. **Upload dataset**: `upload_dataset(file_path, dataset_name)` to upload data |
| 10 | 2. **Validate data**: `validate_dataset(dataset_id)` to check data quality |
| 11 | 3. **Check schema**: `get_dataset_schema(dataset_id)` to review structure |
| 12 | |
| 13 | **Example**: "Upload sales_data.csv and check if it's ready for training" |
| 14 | |
| 15 | ## When to use this skill |
| 16 | |
| 17 | Use this skill when you need to: |
| 18 | - Upload datasets to DataRobot |
| 19 | - Validate data before project creation |
| 20 | - Manage dataset versions and updates |
| 21 | - Check data quality and completeness |
| 22 | - Prepare data for training or predictions |
| 23 | - Handle data format conversions |
| 24 | - Connect to external data sources |
| 25 | |
| 26 | ## Key capabilities |
| 27 | |
| 28 | ### 1. Dataset Upload |
| 29 | |
| 30 | - Upload CSV, Parquet, and other file formats |
| 31 | - Connect to databases and data warehouses |
| 32 | - Handle large datasets efficiently |
| 33 | - Manage dataset metadata and descriptions |
| 34 | |
| 35 | ### 2. Data Validation |
| 36 | |
| 37 | - Validate data formats and schemas |
| 38 | - Check for missing values and data quality issues |
| 39 | - Verify column types and formats |
| 40 | - Identify potential data problems |
| 41 | |
| 42 | ### 3. Dataset Management |
| 43 | |
| 44 | - List and search datasets |
| 45 | - Update dataset metadata |
| 46 | - Create dataset versions |
| 47 | - Delete or archive old datasets |
| 48 | |
| 49 | ### 4. Data Preparation |
| 50 | |
| 51 | - Clean and preprocess data |
| 52 | - Handle missing values |
| 53 | - Format data for DataRobot requirements |
| 54 | - Prepare prediction datasets |
| 55 | |
| 56 | ## Workflow examples |
| 57 | |
| 58 | ### Example 1: Upload and validate dataset |
| 59 | |
| 60 | **User request**: "Upload my sales_data.csv file and check if it's ready for training." |
| 61 | |
| 62 | **Agent workflow**: |
| 63 | 1. Upload the CSV file to DataRobot |
| 64 | 2. Validate the dataset structure and format |
| 65 | 3. Check for missing values and data quality issues |
| 66 | 4. Verify column types are appropriate |
| 67 | 5. Check for potential issues (leakage, formatting) |
| 68 | 6. Report validation results and recommendations |
| 69 | |
| 70 | ### Example 2: Prepare prediction dataset |
| 71 | |
| 72 | **User request**: "Prepare a prediction dataset based on the training data structure from project abc123." |
| 73 | |
| 74 | **Agent workflow**: |
| 75 | 1. Get the training dataset structure from the project |
| 76 | 2. Identify required columns and data types |
| 77 | 3. Create a template with the same structure |
| 78 | 4. Validate the template matches requirements |
| 79 | 5. Provide guidance on filling in prediction values |
| 80 | |
| 81 | ## Using DataRobot SDK |
| 82 | |
| 83 | This skill guides you to use the DataRobot Python SDK directly. Install the SDK if needed: |
| 84 | |
| 85 | ```bash |
| 86 | pip install datarobot |
| 87 | ``` |
| 88 | |
| 89 | ### Key SDK Operations |
| 90 | |
| 91 | Use these DataRobot SDK methods for data management: |
| 92 | |
| 93 | **Dataset Operations**: |
| 94 | - `dr.Dataset.create_from_file(file_path, name)` - Upload dataset |
| 95 | - `dr.Dataset.get(dataset_id)` - Get dataset details |
| 96 | - `dr.Dataset.list()` - List all datasets |
| 97 | - `dataset.row_count` - Get row count |
| 98 | - `dataset.column_count` - Get column count |
| 99 | |
| 100 | **Dataset Information**: |
| 101 | - `dataset.name` - Dataset name |
| 102 | - `dataset.id` - Dataset ID |
| 103 | - `dataset.created_at` - Creation timestamp |
| 104 | |
| 105 | See the [Common Patterns](#common-patterns) section below for complete examples. |
| 106 | |
| 107 | ## Helper Scripts |
| 108 | |
| 109 | This skill includes executable helper scripts that Claude can run directly: |
| 110 | |
| 111 | - `scripts/upload_dataset.py` - Upload a dataset file to DataRobot |
| 112 | |
| 113 | **Usage example**: |
| 114 | ```bash |
| 115 | # Upload dataset |
| 116 | python scripts/upload_dataset.py sales_data.csv "Sales Data Q4 2024" |
| 117 | ``` |
| 118 | |
| 119 | Claude can run this script directly or use it as reference when writing code. |
| 120 | |
| 121 | ## Best practices |
| 122 | |
| 123 | 1. **Data quality**: Clean and validate data before upload |
| 124 | 2. **File formats**: Use appropriate formats (CSV for small, Parquet for large) |
| 125 | 3. **Naming conventions**: Use clear, descriptive dataset names |
| 126 | 4. **Metadata**: Add descriptions and tags for better organization |
| 127 | 5. **Versioning**: Create versions for important datasets |
| 128 | 6. **Data validation**: Always validate data before using in projects |
| 129 | |
| 130 | ## Common patterns |
| 131 | |
| 132 | ### Pattern 1: Upload and validate |
| 133 | ```python |
| 134 | import datarobot as dr |
| 135 | import os |
| 136 | |
| 137 | # Initialize client |
| 138 | client = dr.Client( |
| 139 | token=os.getenv("DATAROBOT_API_TOKEN"), |
| 140 | endpoint=os.getenv("DATAROBOT_ENDPOINT") |
| 141 | ) |
| 142 | |
| 143 | # Upload dataset |
| 144 | dataset = dr.Dataset.create_from_file( |
| 145 | file_path="sales_data.csv", |
| 146 | name="Sales Data Q4 2024" |
| 147 | ) |
| 148 | |
| 149 | print(f"Dataset ID: {dataset.id}") |
| 150 | print(f"Rows: {dataset.row_count}, Columns: {dataset.column_count}") |
| 151 | |
| 152 | # Get dataset details |
| 153 | dataset_info = dr.Dataset.get(dataset.id) |
| 154 | print(f"Dataset name: {dataset_info.name}") |
| 155 | print(f"Created: {dataset_info.created_at}") |
| 156 | ``` |
| 157 | |
| 158 | ### Pattern 2: Dataset management |
| 159 | ```python |
| 160 | import datarobot as dr |
| 161 | |
| 162 | # List all datasets |
| 163 | datasets = dr.Dataset.list() |
| 164 | print(f"Found {len(datasets)} datasets") |
| 165 | |
| 166 | # Search for specific dataset |
| 167 | for dataset in dat |