cld-migrate-remote-assets-in-bulk's People
cld-migrate-remote-assets-in-bulk's Issues
Support mapping of structured metadata fields (from labels to external ids)
Problem
When importing structured metadata, Cloudinary requires you to use the external_id
s 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):
- Low touch: Pass a
metadata
object toinput2ApiPayload
to allow the user to map the external ids (without the need to call the Admin API on each load) - Medium touch: Create helper functions to get the external ids, for example
getFieldExternalId
andgetFieldValueExternalId
- 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
- 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.
Explicitly assign status (& operation)
Having "MIGRATED' as the default feels risky to me.
Should this not be set after we have the response?
I see there being 4 status':
- MIGRATED = New upload of an asset
- OVERWRITTEN = Public id already existed and
overwrite
was set totrue
(overwritten
is in the response object) - ALREADY EXISTED = Public id already existed and
overwrite
was set tofalse
(existing
is in the response object) - FAILED = Error occurred
Originally posted by @mgriff in #7 (comment)
Add support for reading compressed CSV files
Some customers may have very large manifest files. In such a case, it may be useful to consider reading from the compressed manifest file and save disk space.
This could be an optional flag for the CLI.
Support auto generation of the log folders
When running the migration I don't want to have to set the log folder each time, I end up using a numbering system (i.e. run1, run2, run3) which doesn't add much value.
I propose we add an option to use a default folder path, initially still using the output-folder
parameter but potentially making it the default in the future.
I propose we use the following format: logs/<cloud_name>/<todays_date>/<current_time>
Allow for configuration of the delimiter used in the CSV file
Despite the name, CSV files do not always use commas as the delimiter. For example, the default for Excel in a number of EU countries is the semicolon.
We should add an option to configure the delimiter used in the CSV file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.