CTRL + K
Tooling
GitHub Action Server

GitHub Action Server

ℹī¸

grai-actions-server runs on the server, alternatively see GitHub Actions which runs inside the GitHub Action.

Getting Started

A basic example:

name: Example Push Action
 
on: push
 
jobs:
  create_run:
    runs-on: ubuntu-latest
    name: Update Grai
    steps:
      - name: Checkout
        uses: actions/checkout@v2
 
      - name: Create Run
        uses: grai-io/grai-actions-server@master
        with:
          api-key: ${{ secrets.GRAI_API_KEY }}
          action: update
          connection_id: ${{ secrets.GRAI_DATABASE_CONNECTION_ID }}

See the three example pull requests here (opens in a new tab) for more examples.

Fields

Api Key

Set to a Grai Api Key. To generate an Api key, go to settings from the profile menu, followed by Api Keys and choose Add API Key.

Action

An optional value which must be either update or tests. Defaults to update.

Connection Id

Set to the UUID of an existing Connection. To find the connection id, navigate to connections and click on a connection, you can find the id at the top of the connection properties. Connection Id is optional, if you don't have an existing connection you can use the following fields instead.

Connection Name

Required if a connection id is not provided. Choose from the available connections.

Connection Namespace

You can supply a namespace for the connection, if no value is provided the field defaults to default.

Connection Metadata

Provide a JSON string representing the connection metadata. The required keys varies for each connection, see below.

Connection Secrets

Provide a JSON string representing the connection secrets. The required keys varies for each connection, see below.

Connection Metadata and Secrets

Google Bigquery

FieldValueExample
projectGCP project idgrai-demo
datasetBigquery Dataset Idjaffle_shop
credentialsJSON credentials for service account, see Credentials

Microsoft SQL Server

FieldValueExample
hostDatabase hostsample-database.cudyk77thtpt.us-west-2.rds.amazonaws.com
portDatabase port5432
databaseDatabase namejaffle_shop
userDatabase user
passwordDatabase password

MySQL

FieldValueExample
hostDatabase hostsample-database.cudyk77thtpt.us-west-2.rds.amazonaws.com
portDatabase port5432
dbnameDatabase Namejaffle_shop
userDatabase user
passwordDatabase password

PostgreSQL

FieldValueExample
hostDatabase hostsample-database.cudyk77thtpt.us-west-2.rds.amazonaws.com
portDatabase port5432
dbnameDatabase Namejaffle_shop
userDatabase user
passwordDatabase password

Snowflake

FieldValueExample
accountSnowflake account, the characters in front of .snowflakecomputing.comhujwihs-hab96881
userDatabase user
roleSnowflake role to useREAD_ONLY
warehouseSnowflake warehouse to useCOMPUTE_WH
databaseSnowflake database
schemaSnowflake schema to use (optional)
passwordDatabase password

Fivetran

FieldValueExample
api_keyFivetran api key, see below
namespacesOptional
endpointOptional endpoint if self-hosting fivetran
limitLimit the number of rows returned, optional10000
parallelizationRun integration in parallel, optional10
api_secretFivetran api secret, see below

See https://fivetran.com/docs/rest-api/getting-started (opens in a new tab) to generate an api key.