Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mapping of structured metadata fields (from labels to external ids) #3

Open
mgriff opened this issue Jul 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mgriff
Copy link
Collaborator

mgriff commented Jul 24, 2023

Problem

When importing structured metadata, Cloudinary requires you to use the external_ids for the field and field options (for enum and set fields). This is currently possible for the field names but becomes cumbersome for the field options.

I believe building in functionality to automatically map labels to external ids will be a good addition to the help speed up the migration process

Potential solutions

There are a number of possible solutions (my initial thoughts listed below):

  1. Low touch: Pass a metadata object to input2ApiPayload to allow the user to map the external ids (without the need to call the Admin API on each load)
  2. Medium touch: Create helper functions to get the external ids, for example getFieldExternalId and getFieldValueExternalId
  3. Higher touch: Create a function that takes a JSON object and converts of the metadata (using labels) and converts it to external ids. This object can then be merged with other metadata values input2ApiPayload
  4. Highest touch: Somehow we preprocess the row and pass the "initial" upload parameters that the user can then modify in input2ApiPayload. This could review each column in the CSV and try to map it to the expected upload parameters, this could be used for metadata but also Display name, resource type etc.
@mgriff mgriff added the enhancement New feature or request label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant