GitHub Action
Sling Run Action
v1
Latest version
Slings from a data source to a data target.
- Somewhere in your repo, create a Replication YAML file, something like this:
source: MY_POSTGRES
target: MY_SNOWFLAKE
# default config options which apply to all streams
defaults:
mode: full-refresh # valid choices: incremental, truncate, full-refresh, snapshot
# specify pattern to use for object naming in target connection, see below for options
object: '{target_schema}.{stream_schema}_{stream_table}'
# source_options: # optional for more advanced options for source connection
# target_options: # optional for more advanced options for target connection
streams:
finance.accounts:
finance.users:
disabled: true
finance.departments:
object: '{target_schema}.finance_departments_old' # overwrite default object
source_options:
empty_as_null: false
finance."Transactions":
mode: incremental # overwrite default mode
primary_key: id
update_key: last_updated_at
-
Add your Connection credentials to your Github Secrets. In our example above, we need to set the connection URL strings as secrets in
MY_POSTGRES
andMY_SNOWFLAKE
. See here for examples. -
Add this step to your Github Actions workflow:
steps:
- uses: slingdata-io/sling-action@v2
with:
command: run -r my-replication.yaml
env:
MY_POSTGRES: ${{ secrets.MY_POSTGRES }}
MY_SNOWFLAKE: ${{ secrets.MY_SNOWFLAKE }}
- Run your action! Reach out to
[email protected]
if facing any issues.