The DDE is in private preview. Therefore, the service may be unavailable for periods of time. There also may be occasions where service elements are rebuilt, and things like your stored credentials are removed, and you will need to re-add. This poses no risk to the rest of DataOps and is completely isolated.
As good development practice dictates, whether developing on local machines or in the cloud, never rely on these for safe storage of configuration/code. Always create a new branch before any changes, and regularly commit your changes to this branch.
What is DDE DevPod?
If your organization prefers to avoid allowing the DDE DevReady workspace container to connect to Snowflake, you can deploy the workspace container to your organization's environment.
DataOps.live enables you with two different options:
- Run both the VS Code frontend and the workspace container on your developer machine
- Run the VS Code frontend on your developer machine yet the workspace container on a shared Docker environment
Looking at the first option with everything on your developer machine:
With just your computer, you can accelerate development using the DDE DevPod and keep your development credentials on your local machine. Please note the known issues for MAC Users.
The only additional prerequisite is to install Docker on your machine. However, if installing Docker locally is not an option, consider running the actual execution environment on a remote server (usually Linux):
The simplest way to do this is to use the Remote SSH extension in VS Code to connect to the remote computer and clone your repo that contains your
devcontainer.json file or create a new one as described in setting up and configuration.
On your local machine, you must:
SSH automatically from your local to your remote machine
- Install the VS Code Remote SSH extension.
Configure your SSH client. Find more help on using the SSH config file.~/.ssh/config
Confirm that you can connect to the remote machine from your local machine through VS Code.
Prerequisites for the machine running the workspace container
Authenticate to Docker Hub for DataOps images:
On your command line, run the following command:
docker login --username dataopsread --password dckr_pat_82FQ4O6N4yb6fXJc15kIvX4Qrtg
Confirm that you can successfully run:
docker run -it dataopslive/dataops-development-workspace:5-stable bash -c "date"
And see a result like:
ubuntu@ip-172-31-7-62:~$ docker run -it dataopslive/dataops-development-workspace:5-stable bash -c "date"
Mon 20 Feb 2023 12:26:48 PM UTC
Setting up and configuration
Open or clone your desired repository.
Create a folder called
.devcontainer/in your repository root
This change is inside the repository, so if another user uses the DDE, you may already see this folder.
Create a file called
This change is inside the repository, so if another user uses the DDE, you may already see this file. Here is a minimal example:.devcontainer/devcontainer.json
This enables your project to be opened as a dev container by VS Code. After you have opened the devcontainer you can continue on to the initial setup of credentials.
For more information on developing using dev containers and developing on a remote host see here: https://code.visualstudio.com/remote/advancedcontainers/develop-remote-host
Giving DevPod access to Snowflake
The DataOps.live extension provides a step-by-step guide to help you set up the Snowflake connection for DevPod, simplifying your experience in the development environment.
The setup walkthrough offers detailed instructions on how to give access to your Snowflake account. It also offers a more secure way of storing your credentials.
When you open the development environment for the first time without setting any credentials beforehand, a notification message prompts you to open the setup walkthrough.
A two-step getting started displays on the VS Code. Following the on-screen guidance lets you:
- Choose the dbt version for your workspace
- Set your Snowflake credentials
The GIF below provides a visual walkthrough, followed by a step-by-step procedure.
Click Choose dbt Version → Set dbt Version.
On top of the VS Code, select from the dropdown the dbt version for the workspace.
Available versions correspond to those in the MATE orchestrator used in pipelines. You can also enter a custom dbt version bundled with MATE.
Click Setup Snowflake Connection → Run Setup Wizard.
Enter your Snowflake credentials following the on-screen instructions.
These credentials are for tools like dbt in DDE to connect with your Snowflake. Once you enter them, the DDE setup will configure your environment. You only need to do this once for each workspace.
In DevPod, you can only store credentials in VS Code secrets. This means your credentials are only stored on your local machine and will not be stored in your DataOps.live account.
Configuring Git credentials
When trying to do your first commit, VS Code might prompt you to set your Git username and email. The commands it suggests need to be modified to remove the
--global flag, as the change will not persist if the container is recreated.
Instead, your commands should look like this:
git config user.email "firstname.lastname@example.org"
git config user.name "Your Name"
Your Git config is set locally on the files mounted from the host computer and will persist.
You can extend your container environment to your needs, but you will always benefit from building on top of the built-in tooling provided by the DDE. Read the
devcontainer.json reference for what you can configure through the file.