Generating
Using sgr cloud stub
You can generate a stub splitgraph.yml
file using
sgr cloud stub
.
For example:
sgr cloud stub dbt my-username/transformed-data
credentials:
dbt: # This is the name of this credential that "external" sections can reference.
plugin: dbt
# Credential-specific data matching the plugin's credential schema
data:
git_url: "" # REQUIRED. dbt model Git URL. URL to the Git repo with the dbt project, for example,`https://uname:pass_or_token@github.com/organisation/repository.git`.
repositories:
- namespace: my-username
repository: transformed-data
# Catalog-specific metadata for the repository. Optional.
metadata:
readme:
text: Readme
description: Description of the repository
topics:
- sample_topic
# Data source settings for the repository. Optional.
external:
# Name of the credential that the plugin uses. This can also be a credential_id if the
# credential is already registered on Splitgraph.
credential: dbt
plugin: dbt
# Plugin-specific parameters matching the plugin's parameters schema
params:
git_branch: master # Git branch. Branch or commit hash to use for the dbt project.
sources: # dbt source map. Describe which Splitgraph image to use for each dbt source (defined in sources.yml).
- dbt_source_name: "" # REQUIRED. Source name. Source name in the dbt model
namespace: "" # REQUIRED. Namespace
repository: "" # REQUIRED. Repository
hash_or_tag: latest # Hash or tag
tables:
sample_table:
# Plugin-specific table parameters matching the plugin's schema
options: {}
# Schema of the table. If set to `[]`, will infer.
schema:
- name: col_1
type: varchar
# Whether live querying is enabled for the plugin (creates a "live" tag in the
# repository proxying to the data source). The plugin must support live querying.
is_live: false
# Ingestion schedule settings. Disable this if you're using GitHub Actions or other methods
# to trigger ingestion.
schedule:
This stub file is generated based on the specific plugin's settings schema.
Using sgr cloud dump
If you already have an existing repository that you wish to use as a template,
you can dump its settings to a splitgraph.yml
file and use that file as a
starting point
(documentation):
sgr cloud dump sample/repo