Skip to content

Syncing data models from Git

TIP

Make sure you first read the intro to Managing the data model

Most data teams choose to manage their Supersimple data models through Git, and usually GitHub specifically.

The recommended workflow is to have your main branch sync your model YAML file directly to Supersimple.

For this, we have a handy GitHub Action that you can use, that uses the Supersimple CLI to sync the configuration over to the chosen account on Supersimple.

Setting up environment

You'll first need to store an environment variable and a secret in your GitHub repository settings (Settings -> Secrets and variables).

You can get the values for both from your account settings page.

  1. Secret SUPERSIMPLE_TOKEN
  2. Variable SUPERSIMPLE_ACCOUNT_ID

GitHub Action file

Then create a file .github/workflows/model-import.yaml in your repo:

yaml
name: Upload Models to Supersimple

on:
  push:
    branches:
      - main

jobs:
  upload:
    name: Upload to Supersimple

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      # Make sure you use the latest version on the above link
      - uses: gosupersimple/upload-configuration@v2.7.1
        with:
          account_id: ${{ vars.SUPERSIMPLE_ACCOUNT_ID }}
          token: ${{ secrets.SUPERSIMPLE_TOKEN }}
          config_files: models.yaml

To import multiple model YAML files, specify them like this:

yaml
config_files: models1.yaml models2.yaml models3.yaml