Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Square Box CatDV Proper way to import Data for Multi Grouping Fields // XML Batch Import // CLI // Worker

  • Proper way to import Data for Multi Grouping Fields // XML Batch Import // CLI // Worker

    Posted by Leonid Nekrasov on October 10, 2013 at 10:34 am

    Hi Everybody,

    I am a bit confused about the way semicolon separated lists of values being imported by Worker, when I use the CatDV XML Sidecar File.

    I have a USERFIELD “keywords”: (Multigrouping), with a Picklist (Extensible, Remember values, Keep Sorted) that looks like:

    Red
    Blue
    Yellow

    I import a videoclip providing the Metadata with the CatDV XML File, where the values for “keywords” are stored in the way:

    Green; Red; Blue; Yellow

    They appear in the CatDV Pro as coma separated List of tags. So far so good.

    PROBLEM: When I then check the Picklist I see following:

    Red
    Blue
    Yellow
    Green, Red, Blue, Yellow

    The last one is a mess.

    QUESTION:

    Is there a way to deliver a list of metadata values in a XML, so they properly populate the Picklist of a USERFILED? Like this:

    Red
    Blue
    Yellow
    Green

    “Green” is a new value then.

    I studied all posts on the forum. Also the Docu of CatDV Pro could not give the answer.
    I am on CatDV Pro 9.0.6

    Thanx and Regards
    Leo

    LinkedIn: https://goo.gl/CPSnl

    Leonid Nekrasov replied 12 years, 7 months ago 3 Members · 5 Replies
  • 5 Replies
  • Bryson Jones

    October 10, 2013 at 4:49 pm

    This is not a supported or documented thing, from what I can see.

    We’ve done a ton of work on this in the backend with various levels of success, but I’m not able to share this due to both Squarebox and North Shore NDA restrictions.

    If SB wants to address it, I’d contact support but what I can say publicly is that the values are escaped in the SQL db in a different way than they are displayed in the GUI, which is different from the way that they are expressed/escaped in the XML. Interesting stuff, but most likely a side effect of the long term evolution of CatDV.

    Hope this saves you some time/trouble on dev.

    bryson

    bryson “at” northshoreautomation.com

    northshoreautomation.com

  • Rolf Howarth

    October 15, 2013 at 12:03 am

    Internally a “multi” user field stores the values separated by a newline value. It converts the newlines to semicolons for display purposes as that takes up less space. I’m not sure whether reading mutliple values via XML is supported in CatDV 9 but you could try placing a newline entity ( 
 ) in the xml file and see if that works.

  • Leonid Nekrasov

    October 15, 2013 at 2:37 pm

    That works great now. Thank You!

    LinkedIn: https://goo.gl/CPSnl

  • Bryson Jones

    October 15, 2013 at 4:45 pm

    Rolf,

    Thanks for making that “official.”

    bryson

    bryson “at” northshoreautomation.com

    northshoreautomation.com

  • Leonid Nekrasov

    October 17, 2013 at 9:14 am

    now, where I know the solution, I changed the Format of the Import Batch XML, so the new files will be imported in the right way. I now try to figure out, how to edit my old clips in the Database. We are talking about ca. 10.000 Clips. So the Select and Replace Solution is great! But it will take a while until I am ready.

    What did I try:

    Worker

    I tried to edit the fields using Worker. Like this: {U4}{s/, /n/g}

    This is what I got: RednBluenYello (for Red, Blue, Yellow) – fail

    Also using & #10; didn’t help

    CLI
    Now I am about to edit fields with an bash script, that get the value of the Userfield. Replaces the commas using SED and wright the new values back. There are several disadvanteges in this solution. For example the problem with handling HTML Hexadecimal Codes for special characters (In Germany we have all this funny letters like ü,ö,ä). CLI give me something like Fu& #223;ball out. I have to convert it to “Fußball” to bring it back to the Database. And so on.

    Question
    Is there a way to do it using Worker?
    Is there a way to use utf-8 while handling with CLI or Worker?

    Thanks and Regards
    Leo

    LinkedIn: https://goo.gl/CPSnl

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy