connect
Usage
prism connect is used to connect your Prism project to third-party adapters (e.g., Snowflake, Redshift, dbt, etc.)
Usage: prism connect [-h] --type TYPE [--full-tb] [-l] [--vars [A=a B=b ...]] [--context '{}']
Connect your Prism project to third-party adapters (e.g., Snowflake, Redshift, dbt, etc.)
Options:
-h, --help show this help message and exit
Command Options:
--type TYPE Connection type. One of `bigquery`,`dbt`,`postgres`,`pyspark`,`redshift`,`snowflake`,`trino`
General Options:
--full-tb Display the full traceback for errors in the project; default is False
-l, --log-level Log level, must be one of `info`, `warn`, `error`, or `debug`. Default is `info`
--vars [A=a B=b ...] Prism variables as key-value pairs `key=value`. These overwrite any variable definitions in `prism_project.py`. All values are read as strings.
--context '{}' Prism variables as JSON. Cannot co-exist with --vars. These overwrite any variable definitions in `prism_project.py`.Here's what prism connect does under the hood:
Parses the
prism_project.pyfile and gets thePROFILE_YML_PATHvalue. If this value isn't specified, then it defaults to the project directory.It checks to see if
PROFILE_YML_PATHexistsIf it doesn't, it creates a new YML file at
PROFILE_YML_PATHand populates it with a profile of type--typeIf it does, it then adds a profile of type
--typeto the existing file.
Example
Here's what the output will look like in Terminal (if there are no errors in the project):
Here's what the profile.yml file looks like after running the above command:
Last updated