> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/licensable-features/enterprise-data-interface/configuring-an-interface/defining-the-source-data-format.md).

# Defining the source data format

### Introduction

This procedure describes how to define the data format of your expected source data.

### Procedure

#### Importing from a source file

It is important that you define all the field names in your source file. You can select which fields to import at a later stage. You can either import the field names directly from the header row of your source file, or you can enter the field names manually.

**Note:** The order of the fields configured on the Data Format tab, must match the order of the fields in the source file.

1. Click the **Data Format** tab.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-d708cf8f44789dd5549d7ff06126efe1edeaee8d%2Fdataformattab.png?alt=media)
2. Click the **Format type** drop-down list and select the format type of your source file, either **Delimited** or **Fixed Width**.

   **Note**: The Fixed Width field limit is 1-255.
3. If you have selected delimited, define the delimiter used:

   <table><thead><tr><th width="96">If...</th><th>then...</th></tr></thead><tbody><tr><td>comma</td><td><p>ensure the <strong>Comma</strong> radio button is selected.</p><p>This button is selected by default.</p></td></tr><tr><td>tab</td><td>select the <strong>Tab</strong> radio button.</td></tr><tr><td>other</td><td>select the <strong>Other</strong> radio button and enter the delimiter used into the field opposite.</td></tr></tbody></table>
4. Enter the number of header rows contained in your source file. The interface will import only the rows below the header rows.
5. To import field names from a file:

   1. Click the **Field Import** button. The 'Import fields from file' window displays.
   2. Navigate to the file you wish to use, select the file and click the **Open** button.
      * If the Header Rows field is populated with either "0" or "1" the first row of this file will be imported as field names.
      * If the Header Rows field is populated, for example with "10" the tenth row of this file will be imported as the field names.

   **Note:** If you are using a file other than the source file to import field names, ensure the fields are the same as the source file fields that will be used.
6. To manually add a field name, click the **Add** button.

   The Add Field window displays.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-0120a739a77a5f4a5d9254d59a29cc6738f23ca3%2Faddfield.png?alt=media)

   1. Enter the field name into the **Field Name** field.

      **Notes:**

      * The field name entered is arbitrary. This field is referenced by the column identifier displayed to the left of the field name.
      * If this field is a Fixed Width field, enter the field width (maximum 255 characters).
   2. If this field uses a date and/or time format, check the "Field uses a specific date/time format" check-box and enter the date and/or time format used by this field.

      The components of the date/time format are; **dd** is a two digit day, **MM** is a two digit month, **yyyy** is a four digit year, **hh** is the number of hours in 12 hour form, **HH** is the number of hours in 24 hour form, **mm** is the number of minutes, **ss** is the number of seconds, **tt** is the am pm designator.

      **Notes:**

      * If you specify a format string that doesn't contain time (e.g. "d-MM-yyyy") and the field contains a date/time string such as "13-12-2009 23:59:59 pm", then the record will fail to import.
      * If the source field only contains time values and the format string is only for times, the date will be assumed to be today.
   3. Click the **Save** button. This field name will be added to the Fields grid.
7. If you wish to change a field name, select the field name you wish to change then click the **Edit** button. The Edit Field window displays. Edit the field name and format details as required.
8. If you wish to delete a field name, select the field name you wish to delete then click the **Delete** button.
9. If a field name is in the wrong location, you can move the field name either up or down.
   * To move a field name up, select the field name you wish to move then click the **Move up** button.
   * To move a field name down, select the field name you wish to move then click the **Move down** button.
10. If Enterprise Data Interface cannot detect the encoding used by your source file, select either: ANSI / UTF-8, Unicode or Unicode (big endian).

#### Importing from a database

You will need to define the name of each field you want to import from the database. When importing from a database, the field is identified by the field’s name and not its position.

1. Click the **Data Format** tab.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-568326ffbb52f888914d2ad631ace66bf9cc1c7e%2Fdataformat_tabdatabase.png?alt=media)
2. To import field names from a database, click the **Field Import** button. Command Centre will connect to the database and retrieve all columns from the configured **Data Source Name** (as specified on the Data Location tab).
3. To manually add a field, click the **Add** button.

   The Add Field window displays.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-0120a739a77a5f4a5d9254d59a29cc6738f23ca3%2Faddfield.png?alt=media)

   1. Enter the field name into the **Field Name** field.

      **Note:** The field name entered must be an exact match to the field name in the database. With an Oracle database, you can create a field name of two words with a single space in between, (e.g. First Name). Command Centre will not accept more than two words, (e.g. The First Name), or a double space, (e.g. First Name), or an apostrophe in the name, (e.g. First's Name). With a Microsoft SQL Server database, Command Centre does accept all these variations.
   2. If this field is a text field, and contains date data of a particular format, check the "Field uses a specific date/time format" check-box and enter the date and/or time format used by this field.

      The components of the date/time format are; **dd** is a two digit day, **MM** is a two digit month, **yyyy** is a four digit year, **hh** is the number of hours in 12 hour form, **HH** is the number of hours in 24 hour form, **mm** is the number of minutes, **ss** is the number of seconds, **tt** is the am pm designator.

      **Notes:**

      * If you specify a format string that doesn't contain time (e.g. "d-MM-yyyy") and the field contains a date/time string such as "13-12-2009 23:59:59 pm", then the record will fail to import.
      * If the source field only contains time values and the format string is only for times, the date will be assumed to be today.
   3. Click the **Save** button. This field will be added to the Fields grid.
4. If you wish to change a field, select the field you wish to change then click the **Edit** button. The Edit Field window displays. Edit the field and format details as required.
5. If you wish to delete a field, select the field you wish to delete then click the **Delete** button.
6. If you wish to add a field from a different data table/view, click the **Add Related Data** button. The Add Related Data window displays.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-55f1afcc1923dfee4783fb0a26e96f1b7f2d79f1%2Faddrelateddatatable.png?alt=media)

   **Note:** When using a related data table, bookings cannot accept multiple source values for a record for any of the Booking fields.
7. From the **Related data table/view** drop-down list, select the data table/view that contains the field you want to add.
8. From the **Use data from field** drop-down list, select the column containing the field you want to add.
9. From the **Where related table/view field** drop-down list, select a field that will be used to identify cardholders or bookings, (e.g. unique cardholder ID or bookable resource name) in the related data table/view.

   **Note:** This list is populated with only the fields, as determined by the related data table/view selected above.
10. From the **Matches primary table/view field** drop-down list, select a field that matches the field selected above, (e.g. unique cardholder ID or bookable resource name).

    **Note:** This list is populated with only the fields, as shown on the Data Format tab.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/configuration-client/licensable-features/enterprise-data-interface/configuring-an-interface/defining-the-source-data-format.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
