Skip to content
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

sqlmesh init <database> should dynamically generate a specific template config #3459

Open
sungchun12 opened this issue Dec 3, 2024 · 0 comments
Labels
Feature Adds new functionality

Comments

@sungchun12
Copy link
Contributor

sungchun12 commented Dec 3, 2024

When I initialize a new sqlmesh project, I want to see template configs beyond the standard duckdb one. It should be specific to the database specified and should be commented out yaml lines. It makes it easier as I have one less browser tab to open in docs to update the config as needed.

Internal slack thread

sqlmesh init bigquery
bat config.yaml 
───────┬───────────────────────────────────────────────────────────────────────────
       │ File: config.yaml
───────┼───────────────────────────────────────────────────────────────────────────
   1   │ gateways:
   2   │   local:
   3   │     connection:
   4   │       type: duckdb
   5   │       database: db.db
   6   │ 
   7   │ default_gateway: local
   8   │ 
   9   │ model_defaults:
  10   │   dialect: bigquery
  11   │   start: 2024-12-01

Future Output

  gateways:
      local:
          type: bigquery
          method: service-account-json
          concurrent_tasks: 5
          register_comments: true
          keyfile_json: {{ env_var('GOOGLE_SQLMESH_CREDENTIALS') }} # it'll be nice to even include env var placeholders as I've seen users accidentally include plain text passwords in their configs
          project: your-project

  default_gateway: local

  model_defaults:
      dialect: bigquery
@sungchun12 sungchun12 added the Feature Adds new functionality label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Adds new functionality
Projects
None yet
Development

No branches or pull requests

1 participant