Skip to content

GIT - DATA SOURCE

Description

The GIT data source is designed to retrieve data from files stored in a Git repository. This method is particularly useful for accessing and processing data that is version-controlled and stored in a Git repository, allowing for easy updates and tracking of changes. The GIT data source supports various configuration options to customize the data retrieval process, including specifying the Git repository URL, branch, path to the file within the repository, and authentication details for accessing the repository.


Config

REQUIRED


Config Parameters

Name Description
password The password for authentication with the Git repository. This is a required parameter.
gitURL The URL of the Git repository where the data is stored. This is a required parameter.
branch The branch of the Git repository from which the data will be retrieved. This is a required parameter.
pathPrefix The path to the file within the Git repository. This is a required parameter.
username The username for authentication with the Git repository. This is a required parameter.
discriminator A unique identifier for the data source. This is an optional parameter, only used when sourcing an excel file

Config Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="UTF-8"?>
<apiroConf version="1" xmlns="http://apiro.com/apiro/v1/root">
    <loadOrder>10</loadOrder>
    <dataSources>
        <dataSource definition="GIT" execPriority="10" name="TEST_GIT_SOURCE">
            <config>
                <![CDATA[
                    {
                      "password": "${SYS:APIRO_GITHUB_PW}",
                      "gitURL": "https://github.com/redapiro/apiro_engine_test_feeds.git",
                      "branch": "demo7",
                      "pathPrefix": "/internal/internal_asx20_pricing.xlsx",
                      "username": "apirobot",
                      "discriminator" : "ASX20_Prices"
                    }
                ]]>
            </config>
        </dataSource>
    </dataSources>
</apiroConf>

Common Mistakes

  • Incorrect Repository URL or Branch: Ensure that the gitURL and branch parameters are correct and correspond to an existing Git repository and branch.
  • Authentication Issues: Verify that the username and password parameters are correct and have the necessary permissions to access the specified Git repository.
  • File Path Errors: If you encounter issues with file retrieval, ensure that the pathPrefix parameter correctly points to the file within the Git repository.
  • Discriminator Usage: If you have configured a discriminator, ensure it is unique and correctly identifies the data source for processing and retrieval.