How to connect a GitLab repository
Whether you’re looking to build pipelines from GitLab to dbt, Tableau, Looker, etc. or looking for an additional layer of data governance, on top of PopSQL’s in-app version history, PopSQL has you covered with our two-way GitLab sync. Once you connect a repo to PopSQL, if you make a change in PopSQL, it gets pushed to GitLab and vice versa.
The benefit of this integration is that it gives you more control of your data. For example, imagine you have thousands of queries and need to swap a table name due to a schema change. Without GitLab, your end users would have to manually make these changes one by one. However, with our two-way sync, you can persist all your PopSQL queries in GitLab, clone the repo in a free code editor tool like VS Code, do a global bulk find and replace, push to GitLab, and the changes will be reflected in all the relevant queries in PopSQL -- saving hours of time and eliminating the risk of inaccurate reports.
Here’s how to get started once you have GitLab enabled
This feature is available in our Enterprise plan. Please contact us if you're interested in learning more or trialing the integration.
Step 1: Create a new GitLab repo, e.g.
Step 2: Visit your PopSQL settings page and click the button to open a form.
Step 3: Enter required data:
- We recommend using a project access token to limit permissions so that PopSQL can only access that project. Personal access tokens are also tied to a user and can be accidentally revoked if that user is edited or removed. Note that project access tokens are only available on paid GitLab plans.
- Please ensure your token has "Maintainer" or "Owner" permissions to the project so that PopSQL can push and pull from the default branch. Alternatively, you can change the permissions of the default branch to allow any user to push or pull from them: Protected Branches.
- You can find the project ID on the main project page in GitLab:
Step 4: Click
Connect GitLab repository and you’re all set!
Spread the wordTweet