Skip to content
graycoreioPublic

About

Build Fabric Terraform Pipelines from Github Actions-like YAML syntax

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

FTAC

Fabric pipelines, written like GitHub Actions.

Fabric Terraform Actions Compiler

FTAC compiles Microsoft Fabric pipeline definitions from YAML written in a GitHub Actions-style syntax.
You edit a *-pipeline.yaml and FTAC generates the pipeline-content.json, no more editing and code-reviewing json.

Build Status npm version Pre-release

Why FTAC?

A typical Fabric pipeline is a few hundred lines of nested JSON with SQL and ADF expressions buried inside string literals. Reviewing a change in Git means diffing that JSON and manually editing and reviewing potentially long-form SQL queries. FTAC is designed to generate the pipeline-json that the microsoft/fabric terraform provider expects, but generates it from sources you can actually read:

  • SQL stays SQL
  • expressions are ${{ }} with inputs, vars and steps.x.outputs
  • The activity graph is a list of steps with needs.

Install

npm install --save-dev @graycore/ftac

FTAC is published as @graycore/ftac.

See Getting started for the project wiring.

Quickstart

The smallest pipeline that exercises the compiler end to end lives in examples/hello:

name: Hello_Pipeline
output: hello.json
inputs:
  date: { type: string, default: '' }
vars:
  date: String
env:
  POSTGRES: 00000000-0000-0000-0000-000000000000
datasets:
  out:
    csv: { lakehouse: brz_lakehouse, folder: Hello, file: hello.csv }
steps:
  - id: set_date
    uses: fabric/set-variable
    with: { name: date, value: "${{ if(empty(inputs.date), formatDateTime(utcNow(), 'yyyy-MM-dd'), inputs.date) }}" }
  - id: load
    needs: set_date
    uses: fabric/copy
    with:
      source:
        postgres:
          connection: ${{ env.POSTGRES }}
          query: SELECT 1 AS one WHERE ${{ sql(vars.date) }}::date <= CURRENT_DATE
      sink:
        csv: out

Documentation

License

FTAC is released under the MIT License.

Think FTAC is the bees-knees? Give our repo a star ⭐ ❤️.

About

Build Fabric Terraform Pipelines from Github Actions-like YAML syntax

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages