Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2023, 05:03 PM   #1
anoukaimee
Enthusiast
anoukaimee began at the beginning.
 
anoukaimee's Avatar
 
Posts: 30
Karma: 10
Join Date: Aug 2017
Location: USA
Device: Kobo Clara, Pixel 6 (Moon Reader/Calibre Companion), Amazon Fire 10
bulk copy from one column to another: is it ok to delete original column?

This might be a stupid question, but I know very little about regex--just what I've taught myself; please bear with me.

I figured out how to do a mass search and replace to move my old GoodReads "F_rating" data (plugin deprecated, I think) into a new one that pulls from the Goodreads metadata plugin, thereby consolidating all data in one column.

I would like to now delete the original "F_rating" data column, but I want to be sure that won't also delete the data that is now in the new column. I don't know Python, but I do use Excel a ton, if you just delete a cell that has been replicated it will delete the content of the replicated cell--because you're deleting the underlying formula (unless you copy the value of an item from one cell to another).

I don't think this is the case with the Calibre language but would like to be sure before I delete the source column: has the data actually been copied, so that I can delete the original column, or is it still dependent on the contents of the original column?

Thanks much.
anoukaimee is offline   Reply With Quote
Old 10-21-2023, 08:33 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
As long as the new column is not a Calculated column that depends on the old...
Backups are always in order BEFORE doing a sever procedure
theducks is online now   Reply With Quote
Old 10-22-2023, 07:52 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,656
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Yes. My usual method of 'changing' column-type (since you can't actually do that) is this:

1. Create #columnname2 with the desired type.
2. Run a search & replace to copy the contents of #columnname to #columnname2.
3. Confirm the contents are correct. (One example: If you're copying a datetime column, you need to use raw_field to preserve the exact timestamp.)
4. Delete #columnname. Restart.
5. Rename #columnname2 to #columnname.

Last edited by ownedbycats; 10-22-2023 at 07:56 PM.
ownedbycats is offline   Reply With Quote
Old 10-24-2023, 07:38 PM   #4
anoukaimee
Enthusiast
anoukaimee began at the beginning.
 
anoukaimee's Avatar
 
Posts: 30
Karma: 10
Join Date: Aug 2017
Location: USA
Device: Kobo Clara, Pixel 6 (Moon Reader/Calibre Companion), Amazon Fire 10
thank you! will help me clean things up. You confirmed my concern and also gave me clear instructions on how to do this. appreciate it!
anoukaimee is offline   Reply With Quote
Reply

Tags
custom columns, goodreads, regex, search & replace


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to regex bulk update the Title column from another column? halloleo Library Management 10 04-16-2021 02:27 AM
Is it possible to copy an Excel column into Calibre column? stardot Calibre 3 01-07-2021 02:40 PM
bulk custom column assignment procyon Library Management 1 11-27-2017 06:01 AM
Copy Column Margot1975 Library Management 1 08-21-2016 10:36 AM
Bulk Edit Comments column Jade Aislin Library Management 0 10-27-2011 03:18 AM


All times are GMT -4. The time now is 09:44 AM.


MobileRead.com is a privately owned, operated and funded community.