In this document, we’ll be discussing how you can move a Git repository to a remote server via Astera Data Stack. Here’s how you can do so:
Open the local repository by clicking on Git in the main toolbar and selecting Open Repository from the drop-down menu.
This will open the local repository.
Astera Data Stack provides the user with the ability to move a repository from the local machine to a remote server.
Configure the remote settings from the Git option on the main toolbar and select Settings from the drop-down menu.
A new window will open.
Committer Info –
Name: The name of the user performing the connection.
Email: The email address of the user performing the connection.
Authentication –
Security Type: This displays the type of authentication to establish the connection.
Access Token: The token generated from the remote server to establish a secure connection.
Click OK and the connection will be configured.
To sync a local repository to the remote server, select the Push option present in the Git Branches Browser of the Astera client.
The repository has been successfully moved to the remote server.
A conflict arises in Git when two separate branches have made edits to the same line in a file, or when a file has been deleted in one branch but edited in the other.
In the Git functionality of Astera Data Stack, a conflict can occur if two files of the same name are merged from two different branches or while pulling the branch from the remote. If the files on the remote and the local have differences, a conflict will occur.
For our conflict and resolution use case, let us look at the following branches.
As you can see in the Git Branches Browser, we have two branches available.
In Branch01, we have a dataflow present by the name of GitDataflow01.
In Branch02, we have a dataflow present with the name of GitDataflow01.
Note: The use cases of both flows are different, but the name is the same.
Now, we right-click on the first branch and select Merge Into Current Branch from the context menu.
Doing so is going to create a conflict between the branches and will produce an error.
As you can see in the Git Changes Browser, a new node has appeared underneath Staged and Unstaged: Conflicted.
To resolve a conflict in Git in Astera, right-click on the affected file in the Conflicted node.
Note: The conflict has emerged because Git in Astera compared both the files and found similarities with the name of the file.
Firstly, you can preview each of the files in the two branches to compare them. If we expand the Preview option, we can see two further options,
Current (Local): Selecting this will preview the conflicting file in the current branch.
Incoming (Remote): Selecting this will preview the conflicting file in the second branch which is to be merged into the current branch.
Secondly, you can expand the Resolve option and two further options can be seen,
Keep Current (Local): Selecting this option will keep the conflicting file in the current branch and exclude the second one.
Take Incoming (Remote): Selecting this option will keep the conflicting file in the second branch and exclude the local one.
Note: When we are resolving a conflict, Astera compares both conflicting files and keeps whichever one we select as our application.
At any time during this process, you can abort the merge simply by selecting the button at the bottom of the Git Changes Browser.
This will roll back the entire process to before the merge option selection.
For our use case, we will keep the current branch file when resolving the conflict,
Note: The merge is not complete until a commit is made.
We write a summary and commit.
The two branches have successfully merged.
As you can see now, the file from the current branch remains after the merge is complete.
This concludes the accessing and resolution of conflicts in Git in Astera Data Stack.
Astera Data Stack provides the user with the ability to clone a repository from a remote server.
Select Git from the main toolbar and click on Clone Repository from the drop-down menu.
A new window will open.
Note: You can also open an existing repository or create a new repository from the above context menu.
Local Repository –
Path: This is where the user will provide the destination path of the cloned repository from the remote server.
Remote –
Url: This is where the user defines the URL resource of the remote repository.
Once done, you can provide the remote connection by clicking the Authenticate button.
This will open a new window.
Committer Info –
Name: The user performing the commits on a repository.
Email: The email address of the user performing the commits on a repository.
Authentication –
Security Type: This is where we select the type of authentication for the remote connection.
Note: For now, Astera offers No Authentication and Bearer Token.
Selecting Bearer Token lets the user enter the Access token and then establish a connection.
Enter Access Token and click OK.
You will be led to the previous screen.
Click OK and the repository will be cloned.
It can be seen in the Remote Branches Section of the Git Branches Browser.
To check out any branch to perform changes and commits on it, select the branch, right-click and select Checkout Branch from the context menu.
Now, to add any file to the repository, simply open a new dataflow or a workflow designer and create an ETL pipeline.
To commit the changes, you can open Git Changes browser by clicking on the Changes option under Open Browsers.
Here, you can see that any flow you saved to the repository will be Unstaged.
Right-click on any of the flows and select Stage from the context menu.
Once the flows have been staged, you can decide whether to commit or push the changes to the repository.
To access the history of changes on each branch, simply right-click on that particular branch and select View Branch History from the context menu.
This concludes the functionality of Git repositories in Astera.