|
| 1 | +--- |
| 2 | +title: Initial Configuration |
| 3 | +sidebar_position: 88 |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | +# How to Configure your VS Code in the Datacoves Transform tab |
| 8 | + |
| 9 | +When you first log into Datacoves, you will see that VS Code is disabled. |
| 10 | + |
| 11 | +We need to connect to your git repository and to your data warehouse and configure your dbt profiles.yml. To do this, you need to update your user settings. |
| 12 | + |
| 13 | +## Open Your User Settings |
| 14 | + |
| 15 | +At the top right corner of the page, click the User icon and select _Settings_ |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Setup git connection credentials |
| 20 | + |
| 21 | +On the settings page scroll down to the Git SSH keys section. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +Click the Add drop down and select whether you want to provide an existing private key or have Datacoves auto generate one for you. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +Datacoves will generate and display the corresponding public key, you will need to configure the public key for your git provider. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +Click the _Copy_ button and follow the instructions to configure the public key for your git server. |
| 34 | + |
| 35 | +[Github SSH Key Configuration Instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) |
| 36 | + |
| 37 | +[Gitlab SSH Key Configuration Instructions](https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-configure-GitLab-SSH-keys-for-secure-Git-connections#:~:text=Configure%20GitLab%20SSH%20keys,-Log%20into%20GitLab%20and%20click) |
| 38 | + |
| 39 | +[Bitbucket SSH Key Configuration Instructions](https://dev.to/jorge_rockr/configuring-ssh-key-for-bitbucket-repositories-2925) |
| 40 | + |
| 41 | +Once your public SSH key has been added to your git server, test your connection. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +If Datacoves is able to connect to your Git repository, you will see _Tested_ next to the repository url. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +# Set up Database Connection |
| 50 | + |
| 51 | +:::note |
| 52 | +Below you will see a reference chart with the information you will need based on your data warehouse provider. **Select your data warehouse provider from the table below to see the how to guide.** |
| 53 | +::: |
| 54 | + |
| 55 | +<details> |
| 56 | + <summary><strong>BigQuery Setup Instructions</strong></summary> |
| 57 | + |
| 58 | + # BigQuery Setup |
| 59 | + |
| 60 | + In the Database Connection Section, click `Add` |
| 61 | + |
| 62 | +  |
| 63 | + |
| 64 | + Give the connection a name. |
| 65 | + |
| 66 | + :::tip |
| 67 | + This will be used as your dbt target name and is typically `dev`. |
| 68 | + ::: |
| 69 | + |
| 70 | + Next select a connection template. A connection template will have defaults pre-configured by your administrator. |
| 71 | + |
| 72 | + ## Fill in connection details |
| 73 | + |
| 74 | + Datacoves will test the connection and display `Tested` next to the connection if successful. |
| 75 | + |
| 76 | +  |
| 77 | + |
| 78 | + Click `Save` |
| 79 | + |
| 80 | +</details> |
| 81 | + |
| 82 | +<details> |
| 83 | + <summary><strong>Databricks Setup Instructions</strong></summary> |
| 84 | + |
| 85 | + # Databricks Setup |
| 86 | + |
| 87 | + In the Database Connection Section, click `Add` |
| 88 | + |
| 89 | +  |
| 90 | + |
| 91 | + Give the connection a name. |
| 92 | + |
| 93 | + :::tip |
| 94 | + This will be used as your dbt target name and is typically `dev`. |
| 95 | + ::: |
| 96 | + |
| 97 | + Next select a connection template. A connection template will have defaults pre-configured by your administrator. |
| 98 | + |
| 99 | + ## Fill in connection details |
| 100 | + |
| 101 | + Datacoves will test the connection and display `Tested` next to the connection if successful. |
| 102 | + |
| 103 | + |
| 104 | +  |
| 105 | + |
| 106 | + Click `Save` |
| 107 | + |
| 108 | + |
| 109 | +</details> |
| 110 | + |
| 111 | +<details> |
| 112 | + <summary><strong>Redshift Setup Instructions</strong></summary> |
| 113 | + |
| 114 | + # Redshift Setup |
| 115 | + |
| 116 | + In the Database Connection Section, click `Add` |
| 117 | + |
| 118 | +  |
| 119 | + |
| 120 | + Give the connection a name. |
| 121 | + |
| 122 | + :::tip |
| 123 | + This will be used as your dbt target name and is typically `dev`. |
| 124 | + ::: |
| 125 | + |
| 126 | + Next select a connection template. A connection template will have defaults pre-configured by your administrator. |
| 127 | + |
| 128 | + ## Fill in connection details |
| 129 | + |
| 130 | + Datacoves will test the connection and display `Tested` next to the connection if successful. |
| 131 | + |
| 132 | + |
| 133 | +  |
| 134 | + |
| 135 | + Click `Save` |
| 136 | + |
| 137 | +</details> |
| 138 | + |
| 139 | +<details> |
| 140 | + <summary><strong>Snowflake Setup Instructions</strong></summary> |
| 141 | + |
| 142 | + # Snowflake Setup |
| 143 | + |
| 144 | + ## Setup Snowflake with Key Pair |
| 145 | + |
| 146 | + When connecting to Snowflake, you can use either key based authentication or username/password authentication. |
| 147 | + |
| 148 | + :::note |
| 149 | + To enable key-pair authentication, you admin must select `Inferred from user info using a custom template` when setting up the [Connection Template ](/how-tos/datacoves/how_to_connection_template.md). The Snowflake username must match the username associated with the email used to authenticate with Datacoves for example `some_user` would be the snowflake username for `[email protected]`, please let us know if your username is different. |
| 150 | + ::: |
| 151 | + |
| 152 | + If using key based authentication, you will need to provide or generate a key which will need to be added to Snowflake manually or contact us for information on how to automate this integration with Snowflake. |
| 153 | + |
| 154 | + Provide or automatically generate your keys. Then add the public key to Snowflake. |
| 155 | + |
| 156 | +  |
| 157 | + |
| 158 | + ## Assign the public key to the Snowflake User |
| 159 | + |
| 160 | + ``` |
| 161 | + alter user <username> set rsa_public_key='<public key>'; |
| 162 | + ``` |
| 163 | + |
| 164 | + More information can be found in the [Snowflake Documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth.html#step-4-assign-the-public-key-to-a-snowflake-user) |
| 165 | + |
| 166 | + ## Complete the connection |
| 167 | + |
| 168 | + In the Database Connection Section, click `Add` |
| 169 | + |
| 170 | +  |
| 171 | + |
| 172 | + Give the connection a name. |
| 173 | + |
| 174 | + :::tip |
| 175 | + This will be used as your dbt target name and is typically `dev`. |
| 176 | + ::: |
| 177 | + |
| 178 | + Next select a connection template. A connection template will have defaults pre-configured by your administrator. |
| 179 | + |
| 180 | +  |
| 181 | + |
| 182 | + ## Fill in connection details |
| 183 | + |
| 184 | + Datacoves will test the connection and display `Tested` next to the connection if successful. |
| 185 | + |
| 186 | + :::note |
| 187 | + You can create additional dbt targets as shown below. This will allow you to execute dbt commands passing a specific target such as `dbt run my_model -t prd` |
| 188 | + ::: |
| 189 | + |
| 190 | +  |
| 191 | + |
| 192 | + ### Key Pair |
| 193 | + |
| 194 | + If using key pair, you will need to change the auth method to key-pair. |
| 195 | + |
| 196 | +  |
| 197 | + |
| 198 | + Select the drop down and your key you configured earlier should populate. |
| 199 | + |
| 200 | +  |
| 201 | + |
| 202 | + Click `Save` |
| 203 | + |
| 204 | + |
| 205 | +</details> |
| 206 | + |
| 207 | +## Once your data warehouse is configured you are now ready to transform your data with dbt |
| 208 | + |
| 209 | +- Scroll to the top of the screen, click `Launchpad` or the Datacoves logo. |
| 210 | + |
| 211 | +- Click `Open` to go into your development environment. |
| 212 | + |
| 213 | +:::note |
| 214 | +Datacoves will take a couple of minutes to apply the new settings, clone your repo, and finish setting up your environment for the first time. |
| 215 | +::: |
| 216 | + |
| 217 | + |
0 commit comments