-
Notifications
You must be signed in to change notification settings - Fork 1
Field Mappings
Here's the rules for the field mappings document
Each field in Airtable is linked to an attribute in one or more scripts, they may be linked to a column in Excel as well. The field_mappings.json
file maps the links between these entities, like this:
{
"ObjectClass_or_Table": {
"attribute_name": {
"xlsx": "column letter in Excel",
"atbl": "field name in Airtable"
}
}
}
There are three exceptions to the above notation. The first is when the Airtable field is anything besides "text" - for those, an extra bit of JSON is inserted to provide the name and field type, like so:
{
"ObjectClass_or_Table": {
"attribute_name": {
"xlsx": "column letter in Excel",
"atbl": {
"name": "field name in Airtable",
"type": "fieldType"
}
}
}
}
Field types use camelCase, per the pyAirtable documentation.
The second exception is when the field being described is a linked field from another table. Those fields will generally have their own object classes in the script and for a bunch of reasons they need to be handled differently internally. These are noted with a capital letter and to start the attribute name and wher enecessary are written in camelCase, like so:
{
"ObjectClass_or_Table": {
"AttributeName":
"xlsx": "column letter in Excel",
"atbl": "field name in Airtable"
}
}
}
The third exception is for Broadcast Wave File attributes. These attributes do double duty as flags for BWFMetaEdit and thus they follow the naming conventions for that software. Specifically, they have leading capital letters, unless they contain two words, in which case they are camelCase. For more info, use bwfmetaedit -h
in your terminal.
{
"BroadcastWaveFile": {
"Originator": {},
"originatorReference": {}
}
}