Skip to main content
Retrieve Mapping Information
Elisa Dinsmore avatar
Written by Elisa Dinsmore
Updated over 9 months ago

This article is for the latest version of the Flatfile Data Exchange Platform.

In the latest version of the Flatfile Data Exchange Platform, you are now able to to retrieve mapping details to let you know how your users have mapped columns on their incoming file to the fields you've specified in your template.

To access mapping information for a workbook or environment:

  1. Get Jobs - you can specify an environmentId, spaceId, or workbookId to narrow down which jobs you'll receive. Here, you'll want to retrieve the job Ids that are returned. You can't filter the search for just mapping jobs, but will be able to filter the results on "operation": "mapping" to get just the mapping jobs.

  2. Get a Job's Execution Plan - Use your job id for a mapping job to retrieve the execution plan of that job.

An example execution plan here would look like this:

{
"data": {
"job": {
"id": "us_jb_rmPBI1Hc",
"createdAt": "2023-07-19T14:31:40.086Z",
"updatedAt": "2023-07-19T14:31:49.868Z",
"startedAt": "2023-07-19T14:31:49.000Z",
"finishedAt": "2023-07-19T14:31:49.867Z",
"type": "workbook",
"operation": "map",
"source": "us_wb_j5pEw0Gk",
"destination": "us_wb_nE3PYkNV",
"managed": true,
"config": {
"sourceSheetId": "us_sh_mBHsvtYh",
"destinationSheetId": "us_sh_JhFIsjaG"
},
"trigger": "manual",
"status": "complete",
"mode": "foreground",
"progress": 100
},
"plan": {
"fieldMapping": [
{
"sourceField": {
"key": "first",
"type": "string"
},
"destinationField": {
"key": "first_name",
"type": "string",
"label": "First name",
"constraints": [
{
"type": "required"
}
]
},
"preview": [
"Blake",
"Calvin",
"Michael",
"Mabel",
"Callie",
"Nicholas",
"Adelaide",
"Manuel",
"Austin",
"Jacob"
],
"metadata": {
"certainty": "strong",
"source": "us_usr_JUf4lC7C"
}
},
{
"sourceField": {
"key": "last",
"type": "string"
},
"destinationField": {
"key": "last_name",
"type": "string",
"label": "last name"
},
"preview": [
"Pierce",
"Alvarado",
"Diaz",
"Herrera",
"Wagner",
"Alvarado",
"Bell",
"Reid",
"Rice",
"Hammond"
],
"metadata": {
"certainty": "strong",
"source": "us_usr_JUf4lC7C"
}
},
{
"sourceField": {
"key": "name",
"type": "string"
},
"destinationField": {
"key": "full_name",
"type": "string",
"label": "full name"
},
"preview": [
"Amelia Allison",
"Aiden Briggs",
"Katharine Moreno",
"Barry Copeland",
"Derek Hines",
"Sally Turner",
"Walter Montgomery",
"Sadie Ballard",
"Eula Bowman",
"Angel McBride"
],
"metadata": {
"certainty": "strong",
"source": "us_usr_jWtAAByi"
}
},
{
"sourceField": {
"key": "bool",
"type": "string"
},
"destinationField": {
"key": "test_value",
"type": "boolean",
"label": "Test Value"
},
"preview": [
true,
true,
false,
false,
false,
true,
true,
true,
true,
true
],
"metadata": {
"certainty": "strong",
"source": "us_usr_JUf4lC7C"
}
}
],
"unmappedSourceFields": [
{
"sourceField": {
"key": "department",
"type": "string"
},
"preview": [
"engineering",
"engineering",
"engineering",
"engineering",
"engineering",
"engineering",
"engineering",
"engineering",
"engineering",
"engineering"
]
},
{
"sourceField": {
"key": "salary",
"type": "string"
},
"preview": [
"60000",
"60000",
"60000",
"60000",
"60000",
"60000",
"60000",
"60000",
"60000",
"90000"
]
},
{
"sourceField": {
"key": "startDate",
"type": "string"
},
"preview": [
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2022",
"05/10/2020"
]
}
],
"unmappedDestinationFields": []
}
}
}
Did this answer your question?