-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write database-specific sample profiles.yml file in dbt init
#2533
Write database-specific sample profiles.yml file in dbt init
#2533
Comments
dbt init
I'm happy to take this, if still available @drewbanin |
I'm trying to set up a try-catch with the possible adapter options, but can't seem to find a 'list' of possible adapters. I found some stuff in My idea is to create a template profiles.yml in each adapter folder and create a dictionary such that How does that sound? |
There is no formal list of possible adapters, because users can write their own adapter plugins.
In #2590, I added a You'd have to do something like: factory.load_plugin(args.adapter)
path = factory.get_include_paths(args.adapter)[0]
sample_path = path / 'sample_profiles.yml'
if not sample_path.exists():
raise RuntimeException(f'No sample profile for {args.adapter}')
shutil.copy_file(sample_path, dest) If the chosen adapter is installed and has a sample profile, it should behave okay. |
makes sense, it would indeed make it easier. I'm trying to checkout the branch |
@brunomurino you might have to set up
That will probably drop you into a detached HEAD state, so then you'll need to use |
Describe the feature
Let's add a flag to
dbt init
which controls the sample contents of the~/.dbt/profiles.yml
file.Example usage:
dbt's adapter plugins should provide their own sample profiles .yml contents. Presently, dbt writes out a Redshift-specific profile.
Additional context
Hi Felipe :)
Who will this benefit?
BQ/Snowflake/Postgres/Spark/Presto users!
The text was updated successfully, but these errors were encountered: