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

Environment variables cannot be passed to extension #123

Open
ShaneMazur opened this issue Jan 22, 2024 · 0 comments
Open

Environment variables cannot be passed to extension #123

ShaneMazur opened this issue Jan 22, 2024 · 0 comments

Comments

@ShaneMazur
Copy link

Unable to provide a token stored as an environment variable to this extension (templater = dbt, dialect = databricks) :

  • The extension does not inherit environment variables defined by "terminal.integrated.env.osx" . DBT's vscode extension uses this. Ex:
        "terminal.integrated.env.osx": {
            "DATABRICKS_TOKEN": "${env:my_token}"
        }
  • The vscode settings for sqlfluff, specifically "sqlfluff.env.environmentVariables", don't seem to support pulling in environment variables. Ex:
        "sqlfluff.env.environmentVariables": [
            {
            "key": "DATABRICKS_TOKEN",
            "value": "${env:my_token}"
            }
        ],
  • Even using the "sqlfluff.env.useDotEnvFile": true does not work as intended using a .env file like below. Ex:
    # .env
    DATABRICKS_TOKEN=${my_token}

How can we configure the extension to inherit an environment variable in some way? (for obvious reasons I wouldn't want to hardcode a token in my settings.json)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant