mainsequence-simple-tables

Define and validate Main Sequence SimpleTable schemas and SimpleTableUpdater rules.

6|1|Updated Nov 14, 2024
One-click install
npx skills add https://github.com/mainsequence-sdk/mainsequence-sdk --skill mainsequence-simple-tables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mainsequence-simple-tables
Source: https://github.com/mainsequence-sdk/mainsequence-sdk/tree/main/docs/astro/data_publishing/simple_tables
Command: npx skills add https://github.com/mainsequence-sdk/mainsequence-sdk --skill mainsequence-simple-tables

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps define, change, query, and review Main Sequence SimpleTables and SimpleTableUpdaters, clarifying ownership of row schemas, backend-managed ids, insert versus overwrite behavior, filtering, foreign keys, and validation rules. It also clarifies which aspects are owned by core Table definitions versus downstream DataNode logic, API routes, scheduling, or sharing policies.

Core Features & Use Cases

  • Define row-oriented table schemas and the corresponding SimpleTableUpdater logic
  • Decide insert-only versus overwrite/upsert behavior and manage backend IDs
  • Establish indexes, foreign keys, and typed filter expressions
  • Review and validate code for correct id usage and proper data-node vs table modeling
  • Validate mutation semantics and dependency relationships before integration with pipelines

Quick Start

Define or modify a SimpleTable and its updater in your project to enable row-based data storage with backend-managed IDs.

Frequently Asked Questions about mainsequence-simple-tables

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a row schema and backend-managed IDs for a SimpleTable?

To define a row schema and backend-managed IDs for a SimpleTable, you specify the row-oriented table structure and corresponding updater logic, enforcing schema rules and ID constraints. This clarifies ownership boundaries between core table definitions and downstream logic.

What is the difference between insert-only and overwrite behavior in table updaters?

Insert-only behavior appends new records without modifying existing rows, while overwrite or upsert behavior updates existing records. You decide this behavior within the SimpleTableUpdater logic to manage backend IDs and validate mutation semantics correctly.

How do I validate mutation semantics and foreign keys before pipeline integration?

You validate mutation semantics and foreign keys by reviewing code for correct ID usage and proper data-node versus table modeling. This enforces typed filter expressions, indexes, and dependency relationships before integrating with downstream pipelines.

Can I establish typed filter expressions and indexes on SimpleTable row schemas?

Yes, you can establish indexes, foreign keys, and typed filter expressions on SimpleTable row schemas. The schema definition process allows you to enforce these constraints and validate the corresponding updater rules for robust data modeling.

When should I separate table modeling from downstream DataNode logic?

You should separate table modeling from downstream DataNode logic to clarify ownership of row schemas, backend-managed IDs, and mutation behavior. The table definition owns the schema and validation, while DataNode logic handles API routes and scheduling.

What are the limitations of using SimpleTableUpdaters for data mutations?

SimpleTableUpdater limitations involve strict adherence to schema validation and backend-managed ID rules. You must ensure proper insert versus overwrite behavior and validate dependency relationships, as incorrect ID usage or mutation semantics will fail review workflows.