GrainER MODELER

Get started

Choose how you'll run Grain, then model in one sitting.

Grain Desktop and the VS Code extension are set up by each modeler on their own computer, with a license key from us. The Snowflake app, coming soon, will be installed once per account by an administrator and opened from Snowsight. The full user manual is built into all three: ? Help in the sidebar, and every screen has a ? that opens the part about that screen.

A Snowflake accountFor the Snowflake app, in a region where Snowpark Container Services is available.
An administrator, onceFor the Snowflake app only: to install it, grant access and start it.
CortexOptional. Needed for the modeling assistant.
Enterprise EditionOptional. Needed only for Snowflake lineage.

Three ways to run Grain

Start where your team already works.

The features are the same in all three, and a model moves between them as the same folder of YAML files. Compare them side by side.

Coming soon

Snowflake app

A Snowflake Native App. An administrator will install it once from Snowflake Marketplace; your modelers open it from Snowsight.

Preview the setup
macOS · Windows

Grain Desktop

Each modeler installs it on their own computer and opens a model folder, usually in Git.

Set up Grain Desktop
Visual Studio Code

VS Code extension

Each modeler adds it to VS Code and models in the folder they already have open.

Set up the extension

The Snowflake app · Coming soon · For the administrator

Install and set up, once per account.

The Snowflake app isn't on Snowflake Marketplace yet. These are the steps it will take, so your administrator can plan ahead. Tell us you want it and we'll let you know when it's listed.

These steps use GRAIN_ER_MODELER as the app's name. Replace it with the name you install under, and ANALYTICS and MODELING_WH with your own database and warehouse.

Grain can never do more than the signed-in user's role allows. The grants below set an outer limit on top of that.

  1. Get Grain from Snowflake Marketplace

    In Snowsight, open Data Products > Marketplace, search for Grain ER Modeler, and choose Get.

  2. Let the app call Cortex

    Used for descriptions, design help and suggested subject areas. Skip this if you don't use Cortex.

    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER
      TO APPLICATION GRAIN_ER_MODELER;
  3. Choose the databases it may work in

    Repeat for each database your modelers work in. Leave out OBJECT MANAGEMENT to keep Grain read-only.

    -- read schemas: Read Snowflake, Compare, Suggest subject areas
    GRANT CALLER USAGE ON DATABASE ANALYTICS TO APPLICATION GRAIN_ER_MODELER;
    GRANT CALLER OBJECT DISCOVERY ON DATABASE ANALYTICS TO APPLICATION GRAIN_ER_MODELER;
    -- deploy tables and governance tags
    GRANT CALLER OBJECT MANAGEMENT ON DATABASE ANALYTICS TO APPLICATION GRAIN_ER_MODELER;
    -- the warehouse those queries run on
    GRANT CALLER USAGE ON WAREHOUSE MODELING_WH TO APPLICATION GRAIN_ER_MODELER;
  4. Start the app

    This creates an extra-small warehouse, a one-node compute pool and the web service, all inside your account.

    CALL GRAIN_ER_MODELER.app_public.start_app();
  5. Choose who may use it

    GRANT APPLICATION ROLE GRAIN_ER_MODELER.app_user  TO ROLE DATA_MODELER;
    GRANT APPLICATION ROLE GRAIN_ER_MODELER.app_admin TO ROLE SYSADMIN;
  6. Set the warehouse in the app

    Open Grain from Data Products > Apps in Snowsight, choose Snowflake settings… in the sidebar, and enter the warehouse from step 3.

The Snowflake app · Coming soon · Running costs

What it uses in your account, and how to pause it.

Snowflake bills these to your account as normal consumption, separately from the Grain subscription.

ResourceWhat it doesWhen it runs
Compute pool (one CPU_X64_XS node)Runs Grain's web service.Suspends after an hour with no requests and resumes on the next one.
The app's own XS warehouseStores the model and calls Cortex.Suspends after a minute idle.
Your warehouseReads schemas, deploys and sets tags, as the signed-in user.Only when someone runs one of those actions.
CortexThe modeling assistant.One request per entity you select.
-- stop everything until it's needed again, then resume
CALL GRAIN_ER_MODELER.app_public.stop_app();
CALL GRAIN_ER_MODELER.app_public.resume_app();

Grain Desktop · For each modeler

A model folder on your computer, in Git.

Grain Desktop runs on macOS, on Apple silicon and Intel, and on Windows. The model is an er-model folder of YAML files, the same as the VS Code extension uses, so you can open a folder a colleague keeps in either.

Snowflake features connect as you, with your own role. Your token or sign-in is kept encrypted by the system and never written into the model folder.

  1. Install Grain Desktop

    Early-access teams get the installer for macOS or Windows from us. Request it here.

  2. Enter your license key

    Help > Licence… takes the key we sent you, a 90-day trial key or the key for your plan. The same key covers the VS Code extension on this computer. Without one, the model opens read-only.

  3. Open a model folder

    File > Open Model Folder… opens an er-model folder, or the folder that holds one, such as a Git repository. An empty folder starts a new model, and the home page can load a sample model to explore.

  4. Connect to Snowflake

    File > Snowflake Connection… takes your account, a warehouse and either a programmatic access token or Sign in with browser for single sign-on. Test checks it before you save.

  5. Keep it in Git

    File > Git… connects the folder to a repository, and commits, pulls and pushes from the same dialog. File > Clone Git Repository… opens a model a colleague has shared.

VS Code extension · For each modeler

Model beside your code, in the folder you already have open.

The extension keeps the model as YAML files in your workspace, so it is reviewed in pull requests next to your dbt project. Edits made to those files in a text editor, or by a Git checkout, show up on the diagram.

Your token or single sign-on session is kept in VS Code's secret storage, never in settings, files or logs.

  1. Install the extension

    Early-access teams get the extension from us as a .vsix file. In VS Code, run Extensions: Install from VSIX… and choose it. Request it here.

  2. Enter your license key

    Run Grain: Enter Licence Key… from the Command Palette and paste the key we sent you. The same key covers Grain Desktop on this computer. Without one, the model opens read-only.

  3. Open Grain in your folder

    Open a folder in VS Code and click the Grain ER Modeler icon in the activity bar.

  4. Connect to Snowflake

    In a diagram, Settings > Snowflake connection… takes your account, warehouse and role, and either a personal access token or Sign in with browser for single sign-on.

  5. Connect your AI agents

    Settings > AI agents > Connect an agent… adds Grain's MCP server to VS Code's agent mode, Claude Code or Cursor, or copies its command line for another client. Agents read the model and check their SQL; they never change it. More

For modelers, in any of the three

Your first subject area.

The first time you open Grain it asks how you want to start: Read from Snowflake, Describe your business and get a third-normal-form design from Cortex, or Start from a template. Press ⌘K (Ctrl+K) at any time to search the model or run any command.

  1. Open Grain

    In the Snowflake app, go to Data Products > Apps in Snowsight and open Grain ER Modeler; you're signed in as yourself, with your own role, and there is nothing else to sign in to. In Grain Desktop, open your model folder; in VS Code, the Grain ER Modeler icon in the activity bar.

  2. Create a subject area

    Click + next to Subject areas in the sidebar. A subject area is a named group of entities shown together on one diagram.

  3. Add entities from templates

    Add > New entity… offers a design pattern for each entity, such as SCD Type 2 or Transaction Fact. Drag from one attribute to another to relate entities, or run Detect relationships to match foreign keys to dimension keys by name.

  4. Or start from what's deployed

    Snowflake > Read Snowflake… brings in a schema, read-only, and can create entities for the tables it finds.

  5. Review and deploy

    Review and deploy opens the Changes drawer: the comparison with Snowflake, the generated DDL, and Deploy, which runs only after you've reviewed each statement.

Already have a model, or want one in Git?

Import it, download it, any time.

Every Grain model is an er-model folder of YAML files. In Grain Desktop and the VS Code extension the model simply is that folder, so commit it to Git like any other code. In the Snowflake app it lives in a table inside the app, shared by everyone who uses it, as the same set of YAML documents, so it moves in and out freely.

  • Download model (YAML) in the Snowflake app's sidebar gives you a zip of the er-model folder. Commit it to Git for review or history.
  • Import model folder… loads an er-model folder into the Snowflake app, for example one from Grain Desktop, the VS Code extension or another account.
  • In the Snowflake app, edit the model through the app. To change the YAML by hand, download it, edit, and import it back. In Grain Desktop and VS Code, edits made to the files directly show up on the diagram.
er-model/
  workspace.yml            groups, naming standard, rules, settings
  entities/<entity>.yml    one per entity, shared across subject areas
  subject-areas/<name>.yml entities on a diagram, positions, notes
  glossary/<id>.yml        terms and business attributes
  concepts/<id>.yml        concepts and their relations
  context/<id>.yml         nodes on the context diagram
  lexicons/<id>.yml        named standard types
  objects/<id>.yml         schemas, sequences, stages, policies…
  decisions/<id>.yml       design decisions and their reasons
  comments/<entity>.yml    comment threads
  templates/<id>.yml       optional custom templates

Stuck, or want a guided start?

Early access teams get a first session with us, modeling one of their own subject areas.