GrainER MODELER

Products

Everything a modeling tool should have, built around Snowflake.

Grain covers the whole life of a warehouse model: scoping, conceptual and logical design, physical properties, deployment, governance and documentation. It comes three ways, Grain Desktop, the VS Code extension and, coming soon, the Snowflake app, with the same features in each. This page lists what is in the current release. Items marked Next release are finished and in testing. Items marked Patent pending are covered by U.S. patent applications.

Three products

The same modeler, three places to run it.

All three have the same features and the same diagram. They differ in where the model lives and who signs in. A model moves freely between them as the same folder of YAML files.

Every feature on this page is in all three, unless it says otherwise.
Snowflake appGrain DesktopVS Code extension
AvailableComing soon to Snowflake MarketplaceIn early access, freeIn early access, free
RunsIn a container inside your Snowflake account, opened from SnowsightOn macOS (Apple silicon and Intel) and WindowsInside Visual Studio Code
Where the model livesInside the app, shared by everyone who uses itA folder of YAML files on your computer, usually in GitYAML files in your workspace, usually in Git
Who you areThe signed-in Snowflake userYour computer's user nameYour VS Code or Git user name
Snowflake accessThe signed-in user's role, limited to the databases an administrator allowedYour own access token or single sign-on, kept encrypted by the systemYour own access token or single sign-on, kept in VS Code's secret storage
TeamworkLive: an edit by anyone reaches every open tab, each person with their own undoGit from the app (connect, clone, commit, pull, push), plus review, check-out and commentsGit, plus review, check-out and comments
ExportsDownloaded in the browserSaved where you chooseSaved where you choose
Installed byA Snowflake account administrator, from Snowflake MarketplaceEach modeler, on their own computer, from an installer we sendEach modeler, in their own VS Code, from a .vsix file we send
Licensed byYour Snowflake Marketplace subscriptionA license key from us, checked offlineThe same license key, on the same computer

Modeling

Conceptual, logical and physical, on one canvas.

A subject area is a named group of entities shown on one diagram. Switch between its three views without losing your selection, and move up to the context diagram for the whole warehouse.

  • Business and physical names for every entity and attribute, shown separately or together.
  • Relationships by dragging one attribute onto another. The dialog opens already filled in. Shift-drag copies attributes instead.
  • Optional, one-or-more, identifying and role-named relationships ("bill to"), with the foreign key column created for you.
  • Many-to-many resolved into an associative entity in one click.
  • Subtypes: exclusive or complete, with a discriminator, kept as separate tables or rolled up or down.
  • Alternate keys, defaults, identity, computed columns, checks and collation per column.
  • Four notations: crow's foot, Information Engineering, IDEF1X and Chen.
  • The entity editor: five tabs covering general details, the attribute grid, design rationale, physical properties and security.
  • Every edit is one undoable step, including edits Cortex proposes and you accept.
  • Scales to large models. Tested at 200 entities and 5,000 attributes.
dim_customer · Entity editor
The entity editor's Attributes tab for dim_customer, with keys, types, domains, lexicons, business attributes and change handling per column
The attribute grid. customer_email is linked to an approved PII business attribute, and Grain offers its standard type.

Patterns and standards

Templates that know what a Type 2 dimension needs.

Choose a design pattern and Grain adds the columns it requires, without ever adding a second primary key. Change the standard columns once in Settings and every new entity follows.

Dimensions

Conformed, Dimension, SCD Type 2

Type 2 adds start and end dates and a current-row flag. Every dimensional template ends with the standard housekeeping columns.

Facts

Transaction, Periodic and Accumulating Snapshot

Measures carry additivity, so the model says which ones can be summed across which dimensions.

Supporting

Cross-reference and Reference

Mapping tables and code lists, with their keys set up correctly.

Data Vault

Hub, Link and Satellite

Ending in load-audit columns. Generate Data Vault turns existing entities into hubs, links and satellites.

Naming standard

Your abbreviations turn business names into physical names. Apply the standard across a subject area in one step.

Lexicons

Named standard types such as Amount = Decimal(18,2). Edit a lexicon and every attribute that uses it changes too.

Multiple source systems

Tick one box and an entity gets your multi-source column set, for example source system code, record id and extract time.

Modeling principles, built in Next release

Normalization to BCNF, dimensional modeling, Data Vault 2.0, the layered warehouse, keys and naming, and Snowflake physical design, written for Grain. Cortex's completion and review are told the principles of the entity's pattern.

Checked, not just suggested Next release

Twelve principles are model health rules: a fact without a grain, a measure without an additivity, a fact related to a fact, a Type 2 dimension without its history columns, a repeating group, a hub with descriptive columns, and more. What Cortex proposes is checked by the same rules.

Layers Patent pending

One logical model, stored as many layers as you need.

Most tools make you pick between designing tables and designing documents. Grain keeps one logical model and stores it in each layer you define, such as Raw, Core and Mart.

  • Relational: the normalized tables as you draw them.
  • Lake: Snowflake-managed Iceberg tables or VARIANT landing tables. A child identified by its parent is nested inside it as ARRAY(OBJECT(…)).
  • One big table: a wide table per anchor entity, with parents joined in. Anything that multiplies rows needs an explicit choice: aggregate, array or exclude.
  • Per-layer choices: leave columns out, rename them, or name the table differently. Renames in the model carry into those choices.
  • Load SQL included: Generate DDL and Deploy add the SQL that fills each layer from the one before, with LATERAL FLATTEN out of the lake and dynamic tables for one big tables by default.
  • JSON Schemas for a lake layer, exported in one step.
Customer 360 · Layer: Raw
The Raw layer of Customer 360, with order_line nested inside sales_order
The layer lens: the same model, redrawn as the Raw layer stores it.

Snowflake

Read it, compare it, deploy it, trace it.

Reading or changing your databases always runs as you: in the Snowflake app, as the signed-in user with their role, only on the databases your administrator allows; in Grain Desktop and the VS Code extension, with your own token or single sign-on and your role. Every Snowflake action happens only when you ask, and each one tells you what it is about to do.

  • Read Snowflake (read-only): databases, schemas, tables, columns, keys, defaults, identity, unique keys, view queries, comments and clustering.
  • Create missing entities from tables that have none yet. Grain works out the pattern from prefixes like dim_ and fact_, or from the columns.
  • Suggest subject areas: Cortex groups whole schemas into business areas, each table with a reason. Tables shared across areas go into Conformed.
  • Compare: differences per column, including type equivalence, NULL versus NOT NULL and column order. Choose a side for each one.
  • Environments such as Dev, Test and Prod, each a database and schema with its own role and warehouse. Generate DDL and Deploy target one by name, and a production environment is named as such before anything runs.
  • Environment drift: every entity in sync, different or missing in each environment, in one grid, with tables no entity stands for. Export it as a report, or open Generate DDL on what differs.
  • Import DDL from Snowflake or another database, with types mapped to Snowflake's.
  • Import erwin and PowerDesigner models saved as XML, with business names, keys and relationships.
  • Generate DDL without deploying anything, for Snowflake, PostgreSQL, SQL Server, Oracle, MySQL, BigQuery or Databricks.
  • Deploy in dependency order. Only safe type changes are allowed, each destructive statement is acknowledged on its own, and the run stops at the first failure.
  • Keep the design's column order: for a table whose columns ALTER would leave out of order, rebuild it instead, from a zero-copy backup, with keys, comments, policies and grants declared again. Every rebuild says what it does not carry over.
  • Snowflake objects: databases, schemas with future grants, sequences, file formats, stages and streams, scripted before the tables that need them.
  • Functions, stored procedures and tasks in SQL, JavaScript or Python. Redeploying keeps their grants. Task graphs are paused while they change and resumed only if you marked them enabled.
  • Security in the model: masking policies per column or for every PII column, row access policies, grants and owning role.
  • Lineage from SNOWFLAKE.CORE.GET_LINEAGE: flows drawn on the diagram, downstream impact listed before you drop or retype a column. Requires Snowflake Enterprise Edition.
Model settings · Snowflake objects
A scheduled task, NIGHTLY_LOAD, that calls the LOAD_DAILY_SALES procedure on the TRANSFORM_WH warehouse, with the DDL Grain will run: suspend the task, create or alter it, then resume it
A nightly task that calls a procedure. The script pauses the task, updates it, and resumes it because it is marked enabled.

Cortex

An assistant that proposes. Nothing is saved until you approve it.

Grain uses Snowflake Cortex in your own account. It sends the entity's design, its relationships, your lexicons and your house standards. It never sends rows from your tables.

  • Complete the design: missing attributes, types, NOT NULL and a grain, each ticked with a reason.
  • Review the design: findings marked Issue, Warning or Suggestion. A review changes nothing.
  • Draft descriptions for the data dictionary.
  • Design from requirements: plain language in, a checked third-normal-form design out. Patent pending
  • Cortex context and an organization profile (industry, business areas, regulations) go in front of every request, so answers fit your business.
  • Your model choice: pick the Cortex COMPLETE model in settings.
Design from requirements
Design from requirements: four entities certified in third normal form
Grain computes and checks the decomposition itself. The language model only proposes the dependencies.

AI agents Patent pending

Give your AI agents the model, and check their SQL before it runs.

An agent that writes SQL for a business question can produce a valid query that returns the wrong number: revenue counted twice through a join, a rate summed, every version of a customer counted. Snowflake runs it anyway. Grain knows the grain, the joins and the measures, so it can tell the agent before the query runs.

  • Check SQL before it runs. Joins that repeat rows under a SUM or COUNT, measures that cannot be summed (or not across time), history tables read without choosing the current row, sensitive columns, columns and tables the model doesn't have, joins the model doesn't know, and anything that writes. The agent gets PASS, REVIEW or FAIL, and what to change.
  • The context agents lack. What one row of a table is, how two tables join and whether the join repeats rows, how each measure adds up, what a business term means here.
  • Your approval process decides what agents trust. Optionally, a table whose design is not approved is flagged to the agent, which tells the user.
  • Guardrails you write once. House rules in plain language ("Revenue means fact_order.amount, net of tax"), and how strict to be about personal data.
  • Where your agents already are. An MCP server for VS Code's agent mode, Claude Code and Cursor; SQL functions inside Snowflake for Cortex Agents; and the guardrails written into your semantic view and Cortex Analyst model.
  • Design help, graded by Grain. Agents can ask which modeling principles answer a design question, have a table or a proposed design graded PASS, REVIEW or FAIL with each finding and its principle, and get third-normal-form tables with their certificate. The language model proposes; Grain's rules decide. Next release
  • Read-only. Agents read the model; they never change it, and Snowflake's own masking, row access and grants still decide what they can see.
Analyze · Check SQL against the model
Check SQL fails a query that counts customers and sums revenue in one join: each dim_customer row is repeated once per order, so the count of customers is too high
Counting customers and summing revenue in one query: the customer count is inflated once per order. The check says so, and how to fix it.
Model settings · AI agents
The AI agents settings: house rules, the sensitive-data policy, and a describe_table call on fact_order showing what an agent receives
House rules and guardrails, and exactly what an agent receives when it asks about fact_order.

Governance

Business meaning, attached to the columns that carry it.

  • Context diagram: subject areas, source systems, consumers and actors, joined by labeled arrows such as "CRM feeds Sales".
  • Concepts with named relations and "is a" links. A concept no entity realizes is flagged.
  • Glossary of terms and business attributes, each Draft, In review or Approved.
  • Business attributes with a definition, a standard type and a classification. A linked column with a different type shows both and offers a one-click fix.
  • Propose glossary from columns: finds column names that repeat across entities and drafts links or new terms.
  • Governance tags: creates DATA_CLASSIFICATION and BUSINESS_ATTRIBUTE tags and sets them on every column linked to an approved attribute.
Customer 360 · Conceptual
Conceptual view: Account, Customer and Order concepts with named relations, and Party not realized yet
The conceptual view. Party is dashed because no entity realizes it yet.

Knowledge graph

Everything the model knows, and how it connects.

Tables, columns, glossary terms, concepts, rules, decisions and lineage are already in the model. The knowledge graph shows them together. Start from any of them and follow the links.

  • Linked items: what an item references, what references it, what it means, where it is shown, one to three links out.
  • What depends on it: before you change a term or a table, see every table, column, rule and decision that would feel it, nearest first.
  • How it relates to…: pick two items and see the shortest chain of links between them.
  • Nothing extra to maintain. The graph is built from the model each time you open it. Columns fold into their tables until you want them.
  • Export as JSON-LD for catalog and knowledge-graph tools.
Knowledge graph · dim_customer
The knowledge graph around dim_customer: the Customer concept it realizes, fact_order that references it, the view that reads from it, and the glossary terms its columns carry, with every link listed on the right
dim_customer and what it links to. The panel on the right lists every link, and each one can be followed.

Design decision memory Patent pending

Remember why the model is the way it is.

Two years from now someone will ask why order_line has its own key. Grain keeps the answer next to the entity.

  • Decisions with their reasons, the options considered, a status and a review date.
  • Business rules and where each one is enforced.
  • Business processes and which entities each step creates, reads, updates or deletes.
  • Meeting transcripts (WebVTT, SRT or plain text): Cortex proposes decisions, rules and open questions, each with its confidence and the passage it came from. You adopt only what you tick.
  • Guardrails: an edit that touches an accepted decision or rule names it before you save.
Model settings · Design decision memory
Design decision memory settings with a business rule: customer email is unique
Rules, decisions and processes, each linked to the entities and columns they affect.

Teamwork

One model your whole team works on and reviews.

One shared model, live

In the Snowflake app, everyone who opens Grain works on the same model, and an edit by anyone appears in every open tab. Each person has their own undo, and undoing a step someone else has since built on is refused rather than overwriting their work.

Git, built in

In Grain Desktop and the VS Code extension the model is a folder of YAML files. Grain Desktop connects it to a repository and commits, pulls and pushes from the app; edits that arrive from Git, or from a text editor, show up on the diagram.

Signed in as yourself

There is no separate Grain login. Every edit, comment, review and check-out is attributed to you: your Snowflake user in the Snowflake app, your computer's or Git user name in Grain Desktop and VS Code.

Review and check-out

Draft, In review and Approved on every entity. Editing an approved entity sends it back to review. Check an entity out and other people's edits to it are refused until you check it in.

Comments and read-only mode

Threaded comments on entities and columns. Turn on read-only mode for everyone during a review period, so people can look without changing anything.

Versions and merge

Save a named version of the whole design, compare with it, or restore it. Or take only the differences you tick from a version, a Git revision or another model, in one step you can undo.

Plain YAML, in and out

The model is YAML files, one per entity, glossary item, concept and subject area. In the Snowflake app, download it as a zip to review in a pull request or keep in Git, and import a model folder back at any time. The same folder opens in Grain Desktop and the VS Code extension.

Compare and merge, one difference at a time

A colleague has added two columns and widened another on their copy. Instead of restoring their whole model over yours, tick the three changes you want. A relationship you take brings along the column and table it needs, and if the merge would leave a broken reference, Grain names it.

Compare and merge
Compare and merge with another model folder: six differences, of which three are ticked, discount_amount and currency_code added to fact_order and customer_email widened
Six differences from another copy of the model; three ticked to take.

Coming from erwin or PowerDesigner

Bring the model you already have.

If years of your design work live in another modeling tool, save the model as XML there and import it here. Nothing in your model is overwritten: an entity Grain already has keeps what you added and gains what it lacked.

  • erwin Data Modeler models saved as XML: logical and physical names, definitions, keys, relationships (role names included) and subject areas.
  • PowerDesigner physical, logical and conceptual models (.pdm, .ldm, .cdm) saved as XML: tables, views, keys, references, and each diagram as a subject area, laid out as it was.
  • Told, not guessed. Anything the import leaves out, such as a many-to-many relationship that needs an associative table, is listed with the reason.
  • Familiar notations: Information Engineering and IDEF1X, alongside crow's foot and Chen.

We have tested the importers on sample models. If an export from your version doesn't come in cleanly, send it to us and we'll fix it.

Import an erwin or PowerDesigner model
Importing sales.pdm, a PowerDesigner model: customer and sales_order update existing entities, v_big_orders is a new view, and the file's diagram becomes the Sales subject area
A PowerDesigner model: two tables Grain already had are updated, a view is added, and the diagram becomes a subject area.

Quality and exports

Check the model, then take it everywhere it's needed.

Model health

  • 24 configurable rules, each with a severity you choose, counted on every entity.
  • Type differences, links to draft terms, unrealized concepts, entities with no owner, and unlinked columns.
  • Pattern conformance: checks every entity against its design pattern.
  • Search the model (⌘K or Ctrl+K) across entities, attributes, glossary and decisions, and run any command from the same box.

Exports, as files you keep

  • Diagrams as PNG, PDF or SVG.
  • Data dictionary as HTML or Markdown.
  • Attributes to Excel or CSV and back, for bulk editing.
  • Source-to-target mapping.
  • dbt schema.yml, a Snowflake semantic view, and a Cortex Analyst semantic model.
  • Catalog spreadsheet for tools such as Collibra and Alation, and Horizon comments.

See it on your own schema.

Point Grain at one Snowflake schema and it will propose subject areas, create entities, and show you how the tables relate.