# GitLab

GitLab is an all-in-one platform designed for software development and DevOps.

GitLab integration replicates data using the [GitLab REST API](https://docs.gitlab.com/ee/api/README.html).

See the [Schema](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#Schema) section for a list of objects available for replication.

## Preparing for authentication

To access your data, you need to authenticate the connection with your account credentials.

Information noteMake sure that the account you use has read access to the tables you want to fetch.

To create a private token:

1. Log into your [GitLab](https://gitlab.com/users/sign_in?redirect_to_referer=yes) account.
2. In the upper-right corner, click your user icon.
3. Select Settings.
4. On the left sidebar, select Personal access tokens &gt; Add new token.
5. In Token name, enter an identifiable name for the token.
6. In the Scopes section, check the api box.
7. Click Create personal access token.
8. Copy and paste your private token into a secured file, as it is displayed only once.

## Creating the connection

For more information, see [Connecting to SaaS applications](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/Landing/connecting-web-applications.htm).

1. Fill in the required connection properties.

2. Provide a name for the connection in Connection name.

3. Select Open connection metadata to define metadata for the connection when it has been created.

4. Click Create.

Connection settings

| Setting | Description |
| --- | --- |
| Data gateway | Select a Data Movement gateway if required by your use case.<br><br>Information note<br><br>This field is not available with the Qlik Talend Cloud Starter subscription, as it does not support Data Movement gateway. If you have another subscription tier and do not want to use Data Movement gateway, select None.<br><br>For information on the benefits of Data Movement gateway and use cases that require it, see [Qlik Data Gateway - Data Movement](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Gateways/replication-gateway.htm). |
| Start Date | Enter the date, in the format `MM/DD/YYYY`, from which the data must be replicated from your source to your target. |
| API URL | API URL. |
| Private Token | Private token. |
| Projects to track | Enter the projects you want to track separated by spaces. |
| Groups to track | Enter the groups you want to track separated by spaces. |

## Schema

Information note

Schemas and naming conventions can change from version to version. It is recommended to verify your version before continuing.

Depending on your destination, table and column names may not appear as they are outlined below.

### branches

The `branches` table contains high-level info about repository branches in your projects.

**Note**: To replicate branch data, you must set this table and the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table to replicate. Data for this table will only be replicated when the associated project (in the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table) is also updated.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | project\_id<br><br>name |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/branches.html#list-repository-branches "Opens in new tab: GitLab API method") |

branches table foreign keys

| Join branches with | on |
| --- | --- |
| [commits](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#commits) | ```<br>branches.project_id = commits.project_id<br>```<br><br>```<br>branches.commit_id = commits.id<br>``` |
| [issues](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#issues) | ```<br>branches.project_id = issues.project_id<br>``` |
| [milestones](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#milestones) | ```<br>branches.project_id = milestones.project_id<br>``` |
| [projects](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) | ```<br>branches.project_id = projects.project_id<br>``` |

branches table schema

| **commit\_id**<br><br><br>STRING |
| --- |
| **developers\_can\_merge**<br><br><br>BOOLEAN |
| **developers\_can\_push**<br><br><br>BOOLEAN |
| **merged**<br><br><br>BOOLEAN |
| **name**<br><br><br>STRING |
| **project\_id**<br><br><br>INTEGER |
| **protected**<br><br><br>BOOLEAN |

### commits

The `commits` table contains info about repository commits in a project.

**Note**: To replicate commit data, you must set this table and the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table to replicate. Data for this table will only be replicated when the associated project (in the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table) is also updated.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/commits.md#list-repository-commits "Opens in new tab: GitLab API method") |

commits table foreign keys

| Join commits with | on |
| --- | --- |
| [branches](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#branches) | ```<br>commits.project_id = branches.project_id<br>```<br><br>```<br>commits.id = branches.commit_id<br>``` |
| [issues](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#issues) | ```<br>commits.project_id = issues.project_id<br>``` |
| [milestones](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#milestones) | ```<br>commits.project_id = milestones.project_id<br>``` |
| [projects](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) | ```<br>commits.project_id = projects.project_id<br>``` |

commits table schema

| **allow\_failure**<br><br><br>BOOLEAN |
| --- |
| **author\_email**<br><br><br>STRING |
| **author\_name**<br><br><br>STRING |
| **committer\_email**<br><br><br>STRING |
| **committer\_name**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **message**<br><br><br>STRING |
| **project\_id**<br><br><br>INTEGER |
| **short\_id**<br><br><br>STRING |
| **title**<br><br><br>STRING |

### groups

The `groups` table contains info about the groups in your GitLab account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [GitLab API method](https://docs.gitlab.com/ee/api/groups.html#list-groups "Opens in new tab: GitLab API method") |

groups table schema

| **avatar\_url**<br><br><br>STRING |
| --- |
| **description**<br><br><br>STRING |
| **full\_name**<br><br><br>STRING |
| **full\_path**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **lfs\_enabled**<br><br><br>BOOLEAN |
| **name**<br><br><br>STRING |
| **path**<br><br><br>STRING |
| **projects**<br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>id: INTEGER</li></ul> |
| **request\_access\_enabled**<br><br><br>BOOLEAN |
| **visibility\_level**<br><br><br>INTEGER |
| **web\_url**<br><br><br>STRING |

### issues

The `issues` table contains info about issues contained within projects.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/issues.md#list-project-issues "Opens in new tab: GitLab API method") |

issues table foreign keys

| Join issues with | on |
| --- | --- |
| [branches](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#branches) | ```<br>issues.project_id = branches.project_id<br>``` |
| [commits](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#commits) | ```<br>issues.project_id = commits.project_id<br>``` |
| [milestones](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#milestones) | ```<br>issues.project_id = milestones.project_id<br>```<br><br>```<br>issues.milestone_id = milestones.id<br>``` |
| [projects](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) | ```<br>issues.project_id = projects.project_id<br>``` |

issues table schema

| **assignee\_id**<br><br><br>INTEGER |
| --- |
| **author\_id**<br><br><br>INTEGER |
| **confidential**<br><br><br>BOOLEAN |
| **created\_at**<br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **due\_date**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **iid**<br><br><br>INTEGER |
| **labels**<br><br><br>ARRAY<br><br>This is a nested data structure. |
| **milestone\_id**<br><br><br>INTEGER |
| **project\_id**<br><br><br>INTEGER |
| **state**<br><br><br>STRING |
| **subscribed**<br><br><br>BOOLEAN |
| **title**<br><br><br>STRING |
| **updated\_at**<br><br>DATE-TIME |
| **user\_notes\_count**<br><br><br>INTEGER |
| **web\_url**<br><br><br>STRING |

### milestones

The `milestones` table contains info about project milestones.

**Note**: To replicate milestone data, you must set this table and the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table to replicate. Data for this table will only be replicated when the associated project (in the [`projects`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) table) is also updated.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/milestones.md#list-project-milestones "Opens in new tab: GitLab API method") |

milestones table foreign keys

| Join milestones with | on |
| --- | --- |
| [branches](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#branches) | ```<br>milestones.project_id = branches.project_id<br>``` |
| [commits](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#commits) | ```<br>milestones.project_id = commits.project_id<br>``` |
| [issues](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#issues) | ```<br>milestones.project_id = issues.project_id<br>```<br><br>```<br>milestones.id = issues.milestone_id<br>``` |
| [projects](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) | ```<br>milestones.project_id = projects.project_id<br>``` |

milestones table schema

| **created\_at**<br><br><br>DATE-TIME |
| --- |
| **description**<br><br><br>STRING |
| **due\_date**<br><br><br>STRING |
| **group\_id**<br><br><br>INTEGER |
| **id**<br><br><br>INTEGER |
| **iid**<br><br><br>INTEGER |
| **project\_id**<br><br><br>INTEGER |
| **start\_date**<br><br><br>STRING |
| **state**<br><br><br>STRING |
| **title**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |

### projects

The `projects` table contains info about specific projects.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | last\_activity\_at |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/projects.md#list-all-projects "Opens in new tab: GitLab API method") |

projects table foreign keys

| Join projects with | on |
| --- | --- |
| [branches](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#branches) | ```<br>projects.project_id = branches.project_id<br>``` |
| [commits](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#commits) | ```<br>projects.project_id = commits.project_id<br>``` |
| [issues](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#issues) | ```<br>projects.project_id = issues.project_id<br>``` |
| [milestones](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#milestones) | ```<br>projects.project_id = milestones.project_id<br>``` |
| [users](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#users) | ```<br>projects.creator_id = users.id<br>``` |

projects table schema

| **approvals\_before\_merge**<br><br><br>INTEGER |
| --- |
| **archived**<br><br><br>BOOLEAN |
| **avatar\_url**<br><br><br>STRING |
| **builds\_enabled**<br><br><br>BOOLEAN |
| **container\_registry\_enabled**<br><br><br>BOOLEAN |
| **created\_at**<br><br>DATE-TIME |
| **creator\_id**<br><br><br>INTEGER |
| **default\_branch**<br><br><br>STRING |
| **description**<br><br><br>STRING |
| **forks\_count**<br><br><br>INTEGER |
| **http\_url\_to\_repo**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **issues\_enabled**<br><br><br>BOOLEAN |
| **last\_activity\_at**<br><br>DATE-TIME |
| **lfs\_enabled**<br><br><br>BOOLEAN |
| **merge\_requests\_enabled**<br><br><br>BOOLEAN |
| **name**<br><br><br>STRING |
| **name\_with\_namespace**<br><br><br>STRING |
| **namespace**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>id: INTEGER</li><li>kind: STRING</li><li>name: STRING</li><li>path: STRING</li></ul> |
| **only\_allow\_merge\_if\_all\_discussions\_are\_resolved**<br><br><br>BOOLEAN |
| **only\_allow\_merge\_if\_build\_succeeds**<br><br><br>BOOLEAN |
| **open\_issues\_count**<br><br><br>INTEGER |
| **owner\_id**<br><br><br>INTEGER |
| **path**<br><br><br>STRING |
| **path\_with\_namespace**<br><br><br>STRING |
| **permissions**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>group_access: OBJECT, which is also a nested data structure.</li><li>project_access: OBJECT, which is also a nested data structure.</li></ul> |
| **public**<br><br><br>BOOLEAN |
| **public\_builds**<br><br><br>BOOLEAN |
| **request\_access\_enabled**<br><br><br>BOOLEAN |
| **shared\_runners\_enabled**<br><br><br>BOOLEAN |
| **shared\_with\_groups**<br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>group_access_level: INTEGER</li><li>group_id: INTEGER</li><li>group_name: STRING</li></ul> |
| **snippets\_enabled**<br><br><br>BOOLEAN |
| **ssh\_url\_to\_repo**<br><br><br>STRING |
| **star\_count**<br><br><br>INTEGER |
| **tag\_list**<br><br>ARRAY<br><br>This is a nested data structure. |
| **visibility\_level**<br><br><br>INTEGER |
| **web\_url**<br><br><br>STRING |
| **wiki\_enabled**<br><br><br>BOOLEAN |

### users

The `users` table contains info about the users in your GitLab account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [GitLab API method](https://gitlab.com/help/api/users.md#list-users "Opens in new tab: GitLab API method") |

users table foreign keys

| Join users with | on |
| --- | --- |
| [projects](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-GitLab.htm#projects) | ```<br>users.id = projects.creator_id<br>``` |

users table schema

| **avatar\_url**<br><br><br>STRING |
| --- |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **state**<br><br><br>STRING |
| **username**<br><br><br>STRING |
| **web\_url**<br><br><br>STRING |