One of the nice things about working with software is that there is always something new to explore. Now, I'm looking into the possibillities of DBeaver and the integration with Git. The reason is that I want to explore connecting Snowflake and DBeaver/Git for my (local) development environment. This way I have version controlled code locally and I can deploy the code to Snowflake. I have a richer GUI instead of the webbased editor of Snowflake itself. But, it's experiment with DBeaver and Git to learn how it works and whether it is usable for projects I'm involved.
Now it seems that Git is not fully integrated into DBeaver but you have to install a plugin into DBeaver to have Git integration. Now it was kind of puzzle but I managed to install the plugin. Here is the walkthrough.
There seems to be more Git plugins, one of Dbeaver itself and one Eclipse and it seems that the Eclipse plugin is breaking the Dbeaver code, but as you may see later in this blogpost, when I select the DBBeaver Git support a couple of Eclipse code is installed. Not sure whether this is the right one.
Let's walkthrough the steps I took in order to make it work. A small disclaimer, I'm not stating that I executed the most efficient steps to configure the setup with Git, DBeaver, DevOps. May be there is a better sequence of steps to perform the configuration. Try out yourself.
1. First start DBeaver, select "Help" and then select "Install New Software".
This will open the install new software window.
2. In the next step a window opens and here you can choose the repository. I chose the DBeaver Git integration.
5. Press on finish when the licenses are reviewed and then a warning appears that authenticy can not be established.
7. Press on the "Create a new local Git repository" and enter a directory name for Git in a folder. In my case it is D:\tmp\git.
I saved the script "Script.sql" that I have created in this folder and with Git status I'm notified that the file is untracked.
13. Change something in the code and check if the configuration of Git is correctly done.
Okay, that seems to be working well.
But why did I need to install the Plugin in DBeaver? I configured Git but I didn't use any functionality of the Git plug-in in DBeaver. Let's take a closer look at DBeaver and the Git plug in.
15. Now in the projects pane there is a little icon, and if you look closely it says "Git". Press on the icon with your mouse.
17. Select the folder where the Git repository resides. In my case D:\tmp\Git.
20. One step is to check whether the code is commited from DBeaver. I Changed something in the code and committed the code the remote repository
25. And voila! The change is commited into Git and Azure DevOps shows this perfectly.
This blogpost is about building a develpoment environment with Git, Azure DevOps and DBeaver. I learned something new and hopefully it can help you too.