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

Add support for .env file and environment variable replacement #18498

Open
yorek opened this issue Dec 11, 2024 · 1 comment
Open

Add support for .env file and environment variable replacement #18498

yorek opened this issue Dec 11, 2024 · 1 comment

Comments

@yorek
Copy link
Member

yorek commented Dec 11, 2024

It would be great to be able to use environment variables in T-SQL Scripts, for example I could write

SELECT * FROM ${table}

and when executing the code, the ${table} will actually be replaced with the value set in the table environment variable.

Environment variables would be loaded from and .env file. If more than one .env file is present, I should be able to choose which .env file to use, and such value should be store in the .vscode folder so that I don't have to specify it every time I run the script

Ideally the support for environment variables substitution in T-SQL Script will be extended to SqlPackage.exe so that I can generate a deployment package using the .env file (or injecting environment variables using export or set)

@yorek
Copy link
Member Author

yorek commented Dec 11, 2024

Issue on the same topic: #1696

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