Introduction
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.
Git plug-in
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.
Configure
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".
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.
Next, when I try to push the code to the remote repository, I recieved the following error message because the remote repository contains work that I haven't included in my local repository. It seems that Git thinks that I 'm mixing up repositories.
13. Change something in the code and check if the configuration of Git is correctly done.
Okay, that seems to be working well.
DBeaver
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.
16. Select the "Existing local repository" and press Next.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.
Final Thoughts
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.
Hennie
Geen opmerkingen:
Een reactie posten