Attributes: how to move from one to another?

Started by Robvog, August 24, 2022, 02:02:19 PM

Previous topic - Next topic

Robvog

I have a set attributes to change. Suppose I have a set with 3 columns "A"; "B"; "C" 
All the attributes in column "C" has to move to column B en Column "C" has to delete.
Hou to do that in a save way, for the whole database?
I tried to edit the exported IMAS-file (attributes and data), bu I'm very unsure to do that.

Mario

Per-file Attributes (I assume you work with that) are stored, as the name implies, per file.
There is no operation which replaces the value of B with the value of C for all files in the database. Such are thing is very, very rarely needed.

QuoteAll the attributes in column "C" has to move to column B en Column "C" has to delete.
Why not delete column B, then rename C to B?

Make a backup copy of your database before you do anything potentially harmful. So you can go back safely.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Robvog

"Why not delete column B, then rename C to B?"

My problem with that is: there are data in column B and in column C. I want add the data of C to B and after that delete C.
Is there a way to open and edit the exported IMatchAttributes.imas? So I can do it manual?
   

Mario

#3
QuoteI want add the data of C to B and after that delete C.

"add" as in "add what's in C to what's already in B"?
In that case my suggestion cannot work. What you actually want to do is not clear from your initial post.

QuoteIs there a way to open and edit the exported IMatchAttributes.imas? So I can do it manual?
The native Attribute Export format is XML. It is designed to transfer Attribute data between IMatch and other applications.
See Importing and Exporting Attribute Schemas and Data

IMatch can re-import schema and data from IMatch Attribute schema files, but IMatch assumes that the data has been written by IMatch and is unmodified.
There are limited amounts of error checking and plausibility checks in place.
If you feel comfortable editing XMP and you have the proper tools (e.g. an editor with XML syntax checks) in place, you can of course manually edit the exported file and re-import it.
Note that I don't support importing manually modified Attribute schemata.

You can also export and re-import CSV data. See the same help page for more information.

Or use the Text Exporter (Import & Export panel) to export a custom CSV and then the Attribute Importer app to re-import it again after making your changes.

Many ways to achieve this.

Whatever you do: MAKE A BACKUP COPY OF YOUR DATABASE BEFORE. If you mess things up, you can rollback to the original database file and retry.
Just do a Ctrl+C, Ctrl+V in Windows Explorer for the database file while IMatch is not running.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Could you not simply create a metadata-template to add the data from C to a empty metadata-field.
And then another template to merge this new filled field to the attributes - B.

It is only a idea ...
Best wishes from Switzerland! :-)
Markus

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Robvog

Thanks for the advices! I tried to work with export to CSV, edit the CSV and import after that.
All succeeds, I'm happy with the results!

sinus

Quote from: Robvog on August 26, 2022, 01:33:44 PM
Thanks for the advices! I tried to work with export to CSV, edit the CSV and import after that.
All succeeds, I'm happy with the results!

Finally we can see:
With IMatch, different roads lead to Rome .. äh, to a solution.  ;D
Best wishes from Switzerland! :-)
Markus