The GitLab extractor pulls raw data from GitLab's REST API and extracts the following resources from GitLab:
For more information you can check the documentation for tap-gitlab.
In order to access your GitLab data, you will need the Private Token that GitLab extractor will use to connect to GitLab, the Groups and Projects you want to extract from and the Start Date you want the extracted data set to start from.
Full access to GitLab's API requires a personal access token that will authenticate you with the server. This is very simple to do:
Navigate to your profile's access tokens.
Fill out the personal access token form with the following properties:
Click on Create personal access token
to submit your request.
You should see your token appear at the top of your screen.
Copy and paste the token into the Private Token
field. It should look something like this: I8vxHsiVAaDnAX3hA
This property allows you to scope the project that the service fetches, but it is completely optional. If this is left blank, the extractor will try to fetch all projects that it can grab.
If you want to configure this, the format for it is group/project
. Here are a couple examples:
meltano/meltano
- The core Meltano projectmeltano/tap-gitlab
- The project for the GitLab ExtractorThis property allows you to scope data that the extractor fetches to only the desired group(s). The group name can generally be found at the root of a repository's URL. If this is left blank, you have to at least provide a project.
For example, https://www.gitlab.com/meltano/tap-gitlab
has a group of meltano
. This can be confirmed as well by visiting https://gitlab.com/meltano
and noting the Group ID below the header.
Configuration options for Groups and projects
This property allows you to configure where you want your data set to start from. Otherwise, if left blank, it will try to fetch the entire history of the groups or projects specified.
Open your Meltano instance and click "Pipelines" in the top navigation bar. You should now see the Extractors page, which contains various options for connecting your data sources.
Let's install tap-gitlab
by clicking on the Install
button inside its card.
On the configuration modal we want to enter the Private Token the GitLab extractor will use to connect to GitLab, the Groups and Projects we are going to extract from and the Start Date we want the extracted data set to start from.
TIP
Ready to do more with data from GitLab?
Check out our GitLab API + Postgres tutorial to learn how you can create an analytics database from within Meltano, and start analyzing your GitLab data.
meltano add extractor tap-gitlab
If you are successful, you should see Added and installed extractors 'tap-gitlab'
in your terminal.
.env
file in a text editorRequired:
export GITLAB_API_TOKEN="private access token"
export GITLAB_API_GROUPS="myorg mygroup"
export GITLAB_API_PROJECTS="myorg/repo-a myorg/repo-b"
export GITLAB_API_START_DATE="YYYY-MM-DDTHH:MM:SSZ" # e.g. 2019-10-31T00:00:00Z
Optional:
export GITLAB_API_ULTIMATE_LICENSE="true"
If ultimate_license
is true (defaults to false), then the GitLab account used has access to the GitLab Ultimate or GitLab.com Gold features. It will enable fetching Epics, Epic Issues and other entities available for GitLab Ultimate and GitLab.com Gold accounts.
Check the README for details.