field-mapping
FreeNo executable scriptsNot checkedField mapping and data extraction setup - find report types and validate fields
by tekliner★ 17 GitHub starsAbout this skill
Data Dictionary and Field Mapping
When users ask about field mapping, available fields for data extraction, or need to find the right report type:
- Follow the complete trajectory in field_mapping_validation_trajectory
- ALWAYS show at least 3 coverage options with dimension/metric breakdown
- Use BOTH Extract Templates Tool AND Data Dictionary for validation
- Extract Templates provide structure, Data Dictionary provides field details
CRITICAL RULES FOR DATA DICTIONARY USAGE
1. Always Show Multiple Coverage Options
- MANDATORY: Show at least 3 coverage options when 100% coverage is not available
- Order options by total coverage percentage (descending)
- Include dimension/metric breakdown for each option
2. Coverage Breakdown Requirements
- Dimensions/Properties: Show X/Y fields covered with percentage
- Metrics: Show X/Y fields covered with percentage
- Total Coverage: Show overall percentage
- Missing Fields: List key missing fields for each option
3. Integration with Extract Templates
- ALWAYS use Extract Templates Tool for template IDs and configuration
- ALWAYS use Data Dictionary (src_improvado_datasource_fields) for field validation and types
- Never rely on Extract Templates alone - validate fields with Data Dictionary
- Extract Templates provide structure, Data Dictionary provides field details
4. Field Search: NEVER Say "Not Found" Without Fuzzy Search
- MANDATORY: When searching for a field, try exact → partial → keyword matching
- Query Pattern: Use ILIKE with variations:
'%ad%group%','%adgroup%','%ad_group%' - Always show 3-5 alternatives if exact match fails, let user decide
- Only say "not found" after showing all partial matches = 0 results
0. CRITICAL: Determine Database Schema
Before querying src_improvado_datasource_fields, ALWAYS determine the correct database:
SELECT database, name
FROM system.tables
WHERE name = 'src_improvado_datasource_fields' LIMIT 1
Use the found database in ALL queries including subqueries. If the table is in a specific schema (e.g., common_db), use fully qualified names:
- In main queries:
{database}.src_improvado_datasource_fields - In subqueries:
{database}.src_improvado_datasource_fields(REQUIRED to avoid errors)
User might ask you to perform a Field Mapping and Validation per specific data source. This trajectory guides you through the process of mapping fields from external data sources to Improvado's data model and validating the mappings.
IMPORTANT: Common datasource name mappings you should know:
- "YouTube organic" → youtube_organic
- "YouTube paid", "YouTube ads" → google_ads_ql (Google Ads contains YouTube paid data)
- "Google Analytics 4", "GA4" → analyticsdata
- "Facebook", "Meta" → facebook
- "Google Campaign Manager" → google_cm
- "Google DV360" → google_dbm
- "TikTok" → tiktok_ads
- "Pinterest" → pinterest_ads
- Input: List of Original Fields When starting with a list of original fields from an external data source (API, export, or requirements), you should:
Document each field name exactly as provided Note any metadata provided (types, descriptions, etc.) Identify required vs optional fields Document any known validation rules or constraints
- Identify Data Source in Improvado To find the correct data source in Improvado:
SELECT DISTINCT datasource_name, datasource_title FROM src_improvado_datasource_fields Select the appropriate datasource_name for your target (e.g., 'tiktok_ads') Verify the selection with available documentation Note any specific version or API requirements
- Get Distinct Fields for the Data Source Query the data dictionary for the selected data source:
SELECT field_title, field_sql_name, field_kind, field_type, groupArray(DISTINCT report_type) as report_types FROM src_improvado_datasource_fields WHERE LOWER(datasource_name) = '{your_data_source}' GROUP BY field_title, field_sql_name, field_kind, field_type ORDER BY field_title
- Analyze Field Coverage Across Reports Determine which reports provide the best coverage for the requested fields:
WITH requested_fields AS ( SELECT 'field_name_1' AS original_field UNION ALL SELECT 'field_name_2' AS original_field UNION ALL -- Add all requested fields ), mappings AS ( -- Define mappings between original fields and Improvado fields SELECT 'field_name_1' AS original_field, 'improvado_field_1' AS field_name UNION ALL SELECT 'field_name_2' AS original_field, 'improvado_field_2' AS field_name -- Add all possible mappings including alternatives )
SELECT report_type, COUNT(DISTINCT rf.original_field) AS matching_fields_count, COUNT(DISTINCT rf.original_field) / (SELECT COUNT(*) FROM requested_fields) * 100 AS coverage_percentage, groupArray(DISTINCT rf.original_field) AS fields_covered FROM requested_fields rf JOIN mappings m ON rf.original_field = m.original_field JOIN src_improvado_datasource_fields bdf ON (m.field_name != '' AND bdf.field_sql_n
Install field-mapping in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the field-mapping skill do?
Field mapping and data extraction setup - find report types and validate fields
How do I install the field-mapping skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the field-mapping skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic