Buckets:
| #!/usr/bin/env python3 | |
| import json | |
| from typing import List, Dict | |
| # ---- CONFIG ---- | |
| OUTPUT_FILE = "training_generated.json" | |
| TABLE_NAMES_RAW = """ | |
| academic_terms | |
| accommodations | |
| activities | |
| addresses | |
| agenda_item_approvals | |
| agenda_item_files | |
| agenda_items | |
| agenda_workflow_steps | |
| agenda_workflows | |
| alembic_version | |
| alignments | |
| ap_vendors | |
| approvals | |
| asset_parts | |
| assets | |
| assignment_categories | |
| assignments | |
| attendance | |
| attendance_codes | |
| attendance_daily_summary | |
| attendance_events | |
| audit_logs | |
| behavior_codes | |
| behavior_interventions | |
| bell_schedules | |
| buildings | |
| bus_routes | |
| bus_stop_times | |
| bus_stops | |
| calendar_days | |
| calendars | |
| channels | |
| class_ranks | |
| comm_search_index | |
| committees | |
| compliance_records | |
| consents | |
| consequence_types | |
| consequences | |
| contacts | |
| course_prerequisites | |
| course_sections | |
| courses | |
| curricula | |
| curriculum_units | |
| curriculum_versions | |
| data_quality_issues | |
| data_sharing_agreements | |
| deduction_codes | |
| deliveries | |
| department_position_index | |
| departments | |
| document_activity | |
| document_links | |
| document_notifications | |
| document_permissions | |
| document_search_index | |
| document_versions | |
| documents | |
| earning_codes | |
| education_associations | |
| ell_plans | |
| embeds | |
| emergency_contacts | |
| employee_deductions | |
| employee_earnings | |
| entity_tags | |
| evaluation_assignments | |
| evaluation_cycles | |
| evaluation_files | |
| evaluation_questions | |
| evaluation_reports | |
| evaluation_responses | |
| evaluation_sections | |
| evaluation_signoffs | |
| evaluation_templates | |
| events | |
| export_runs | |
| external_ids | |
| facilities | |
| family_portal_access | |
| feature_flags | |
| fees | |
| files | |
| final_grades | |
| fiscal_periods | |
| fiscal_years | |
| floors | |
| folders | |
| frameworks | |
| gl_account_balances | |
| gl_account_segments | |
| gl_accounts | |
| gl_segment_values | |
| gl_segments | |
| goals | |
| google_accounts | |
| governing_bodies | |
| gpa_calculations | |
| grade_levels | |
| grade_scale_bands | |
| grade_scales | |
| gradebook_entries | |
| grading_periods | |
| guardians | |
| health_profiles | |
| hr_employees | |
| hr_position_assignments | |
| hr_positions | |
| iep_plans | |
| immunization_records | |
| immunizations | |
| incident_participants | |
| incidents | |
| initiatives | |
| invoices | |
| journal_batches | |
| journal_entries | |
| journal_entry_lines | |
| kpi_datapoints | |
| kpis | |
| leases | |
| library_checkouts | |
| library_fines | |
| library_holds | |
| library_items | |
| maintenance_requests | |
| meal_accounts | |
| meal_eligibility_statuses | |
| meal_transactions | |
| medication_administrations | |
| medications | |
| meeting_documents | |
| meeting_files | |
| meeting_permissions | |
| meeting_publications | |
| meeting_search_index | |
| meetings | |
| memberships | |
| message_recipients | |
| messages | |
| meters | |
| minutes | |
| motions | |
| move_orders | |
| notifications | |
| nurse_visits | |
| objectives | |
| order_line_items | |
| orders | |
| organizations | |
| pages | |
| part_locations | |
| parts | |
| pay_periods | |
| paychecks | |
| payments | |
| payroll_runs | |
| periods | |
| permissions | |
| person_addresses | |
| person_contacts | |
| personal_notes | |
| persons | |
| plan_alignments | |
| plan_assignments | |
| plan_filters | |
| plan_search_index | |
| plans | |
| pm_plans | |
| pm_work_generators | |
| policies | |
| policy_approvals | |
| policy_comments | |
| policy_files | |
| policy_legal_refs | |
| policy_publications | |
| policy_search_index | |
| policy_versions | |
| policy_workflow_steps | |
| policy_workflows | |
| post_attachments | |
| posts | |
| project_tasks | |
| projects | |
| proposal_documents | |
| proposal_reviews | |
| proposal_standard_map | |
| proposals | |
| publications | |
| report_cards | |
| requirements | |
| resolutions | |
| retention_rules | |
| review_requests | |
| review_rounds | |
| reviewers | |
| reviews | |
| role_permissions | |
| roles | |
| rooms | |
| round_decisions | |
| scan_requests | |
| scan_results | |
| schools | |
| scorecard_kpis | |
| scorecards | |
| section504_plans | |
| section_meetings | |
| section_room_assignments | |
| sis_import_jobs | |
| space_reservations | |
| spaces | |
| special_education_cases | |
| staff | |
| standardized_tests | |
| standards | |
| state_reporting_snapshots | |
| states | |
| student_guardians | |
| student_program_enrollments | |
| student_school_enrollments | |
| student_section_enrollments | |
| student_transportation_assignments | |
| students | |
| subjects | |
| subscriptions | |
| tags | |
| teacher_section_assignments | |
| test_administrations | |
| test_results | |
| ticket_scans | |
| ticket_types | |
| tickets | |
| transcript_lines | |
| unit_standard_map | |
| user_accounts | |
| users | |
| vendors | |
| votes | |
| waivers | |
| warranties | |
| webhooks | |
| work_order_parts | |
| work_order_tasks | |
| work_order_time_logs | |
| work_orders | |
| """.strip() | |
| TEMPLATES = [ | |
| "List all {}", | |
| "Show all {}", | |
| "Get all {}" | |
| ] | |
| def humanize(name: str) -> str: | |
| """Convert snake_case → human readable names""" | |
| return name.replace("_", " ") | |
| def build_training_examples() -> List[Dict]: | |
| tables = [t.strip() for t in TABLE_NAMES_RAW.splitlines() if t.strip()] | |
| data = [] | |
| for table in tables: | |
| pretty = humanize(table) | |
| for tmpl in TEMPLATES: | |
| data.append({ | |
| "text": tmpl.format(pretty), | |
| "intent": "action", | |
| "domain": "data_systems", | |
| "topics": [table] | |
| }) | |
| return data | |
| if __name__ == "__main__": | |
| examples = build_training_examples() | |
| with open(OUTPUT_FILE, "w", encoding="utf-8") as f: | |
| json.dump(examples, f, indent=2) | |
| print(f"✔ Wrote {len(examples)} training records to {OUTPUT_FILE}") | |
Xet Storage Details
- Size:
- 4.67 kB
- Xet hash:
- a26d500787a2c80a7ba8fcfa9d8798411634a3208785a29cbdad3f4abdf2bca1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.