Rename the API outputs when table column names are updated

Hey,

We are using the Tulip API extensively to pull data from the platform into other tools. One pain point we have found is the keys dont dynamically change even if columns are renamed. The keys follow the format below:

[unique 6 charcter identifier] _ [column name with spaces replaced by β€˜_’ ]

The issue is when the column name is updated, this key doesnt change. I could see keeping that identifier as the source of truth for the field (much like how IDs are immutable), but there is no reason that the second half cant dynamically change.

What this would allow is the software we are using to talk to the API to either:

  • reference the immutable part of the key so table changes dont break the logic
    or
  • Reference the part that changes, but it would actually reflect what the field contains

Currently we are stuck with a lookup table of essencially:
image
This mapping is completely manual and presents a massive risk of runtime errors that are hard to catch.

Thanks,
Peter

Hey Peter,

If what you’re after is a way to reference record values by the column name instead of the ID, there are ways to accomplish that automatically. If you know the column name (sprue_size), you could use the Table information returned by the GET /tables/{tableId} endpoint to look up what the column ID is by searching through the list of columns for one with a matching name. Let me know if you want me to explain that further.

Perhaps the fact that the column ID uses the initial column name in its value is a bit misleading to its purpose. Columns IDs are primarily meant to be unique and immutable. We decided to include the column name in them with the secondary goal of making them easier to identify. If you want to reference a column by some other property that might change, like the name, you should do so by using the name to look up the column ID in the list of column definitions.

Thanks,
Daniel, Tulip Platform Engineer

1 Like