Graphics

 View Only
Expand all | Collapse all

Scripting DataLinq

  • 1.  Scripting DataLinq

    Posted 02-25-2014 20:04
    For starters, this is in a newsroom environment, and scenes are built via the MOS Plugin in iNews. I appreciate feedback, but am not looking for help on doing this on the software itself, rather how to make it easier on both the design team (in XPression) and the content team (in the newsroom).

    When building for elections, we always have a heck on a time on the design side. Our results come in via DataLinq RSS, which is pointing to a web address that holds an xml file with all of our data. It's a live updating feed, and it's pretty cool.

    Typically, we use a combination of 4 scenes per race (sometimes only two), 2 variations of full screens and 2 variations of an overlay/lower 4th. When pointing the text fields to the correct data node, the DataLinq piece ends up looking something like:

    RACE````CANDIDATE_INFO``CANDIDATE````FIRST_NAME

    Once the template scene is built, we then duplicate out dozens of that scene, and for each scene, we update every objects' data to point to RACE``, where X is how far into the feed the race data is found. Nothing else needs to change. This then leads to a large volume of scenes (upwards of 300 for some races), as up to 4 scenes are needed per race we cover on-air.

    So we had a light bulb moment. What if we could script that change, and just use the template scene. Have a published text object, and the ability to just put "32" into that object if it's race #32, and all the objects update for us. It would look something like:

    DataLinqField="RACE````CANDIDATE_INFO``CANDIDATE````FIRST_NAME"

    ...and on and on as we needed them to.

    Is this possible? Is there a way to easily use DataLinq Keys in a MOS/Remote Sequencer workflow that would allow for this?

    As always, thanks in advance for any advice or answers. You guys all rock.


  • 2.  RE: Scripting DataLinq

    Posted 02-25-2014 22:47
    Hi Dan,

    Scripting with the datalinq keys is only available in recent beta versions of 5.4.

    Which version are you currently running?

    Version 5.11 or above should allow you to modify datalinq keys from within the MOS plugin. If you add a datalinq key to the Scene, do you see it in your MOS plugin?

    Brian

    #XPression


  • 3.  RE: Scripting DataLinq

    Posted 02-25-2014 23:15
    We're in version 5.0 build 2312. Not sure if what I want to do is possible in that version. But man, I'd love it.

    While we're on the topic, is there a guide to DataLinq keys, similar to XPression-U? I find myself to be lacking information there that I would like to have.

    #XPression


  • 4.  RE: Scripting DataLinq

    Posted 02-26-2014 00:03
    Hi Dan,

    Contact Ross tech support and you should be able to move to version 5.15. I suggest trying it out when you have some downtime and see if the new datalinq in the MOS plugin will achieve what you need. (I believe it should)

    I sent you a private message regarding Datalinq tutorials. We hope to get some up on XPression-U in the future.

    Brian

    #XPression


  • 5.  RE: Scripting DataLinq

    Posted 02-26-2014 01:00
    Is there a planned release date for v5.4?

    I started working with DataLinq a lot recently and can't wait for the "DataLinq Key in the Table" feature and combine it with some scripts.

    #XPression


  • 6.  RE: Scripting DataLinq

    Posted 02-26-2014 15:49
    So I've been trying to get this up and running using the DataLinq Keys for xml, and I happen to be hitting a wall. Our xml is online (-local server address-/WREXexportElections.pl), so we've always had that brought in through the RSS option. When I DataLinq an object, it only fills out the Column line (http://imageshack.com/a/img197/2931/m2uw.png), which may be an issue. Not sure.

    Anyway, the tag is `RACE/CANDIDATE_INFO/CANDIDATE/FIRST_NAME`

    Then I create the DataLinq key - we'll call it RACE_ID, as every race has a unique ID from 0-633. We'll arbitrarily use 300 as an example. I set the value to 300 for the template.

    I go back to my object, and change the RACE field to `RACE` and I get nada out of it. It comes up blank.

    My first question is to make sure I understand it correctly. XPression is going to look for the RACE, where the RACE_ID equals the DataLinq key input. So if the RACE_ID=300, and that's race #1, when I put 300 into the DataLinq key, it's going to replace `` with 1.

    My second question is if that's not correct, what's actually happening. And the follow up is how do I make that work for what I'm trying to do?

    Some info that may be helpful:

    The RACE_IDs are not sequential. They are grouped based on county/area the race is run. e.g., every race in county A gets RACE_IDs 100-199; county B gets 200-299, etc.

    The output of the xml is alphabetical by race name, as this is also feeding our webpage and ticker system, that way county A races all display next to each other before county B, before federal, before state, etc...

    This scrambles the RACE_IDs pretty badly, so I'm trying to find a way to easily find the race I'm looking for out of this list. I know the RACE_ID for every race is unique, so I figured I'd use that.

    #XPression


  • 7.  RE: Scripting DataLinq

    Posted 02-26-2014 15:57
    Hi Dan, is it possible to provide a copy of your xml file? (maybe a dropbox link?)

    #XPression


  • 8.  RE: Scripting DataLinq



  • 9.  RE: Scripting DataLinq

    Posted 02-26-2014 16:15
    Hi Dan,

    The reason it's not working is actually due to the formatting of the XML file.

    When you have something like Race(RACE_ID=%RACE_ID_KEY%) (I changed the datalinq key name to RACE_ID_KEY to make it more clear in this example)

    it is expecting to find an xml attribute called RACE_ID in the Race element of the xml. something like this

    (Race Race_ID="300")

    (CandidateInfo)

    (/CandidateInfo)

    (RaceInfo)

    (/RaceInfo)

    (/Race)

    However, your XML is actually structured where the Race_ID is an element (not an attribute) member of the sub-element Race_Info, like this:

    (Race)

    (CandidateInfo)

    (/CandidateInfo)

    (RaceInfo)

    (Race_ID)300(/Race_ID)

    (/RaceInfo)

    (/Race)

    Unfortunately this is not possible for the datalinq to search for. It can only search on attributes at the same level.

    If you guys generate those xml's yourselves hopefully it is possible for you to add that attribute to the Race tag.

    If not, you could still make use of datalinq keys to easily change all datalinqs in a page to a different race number; but it wouldn't be able to search for a specific race by it's ID. You would be limited to selecting them based on the order with which they appear in the XML.

    In this case you could use a datalinq string like this: RACE(%Race_ID_Key%)RACE_INFORACE_NAME1

    Setting the Key to 1 would give you the first race in the file (300) , 2 is the second race (319) etc..

    That way all datalinqs in the page change be changed by only changing the one datalinq key value.

    Hope this all makes sense.

    #XPression


  • 10.  RE: Scripting DataLinq

    Posted 02-26-2014 16:25
    I got it now. Not quite as seamless as I'd wanted (RACE_ID would have been awesome). I'll need to just print the file in alphabetical order, then number them out 1-227 to get the input line for the race.

    Assuming my DataLinq Key is called RACE_NUMBER, my input into the DataLinq fields would then be:

    RACE(%RACE_NUMBER%)/CANDIDATE_INFO/CANDIDATE(1)/FIRST_NAME

    RACE(%RACE_NUMBER%)/CANDIDATE_INFO/CANDIDATE(1)/LAST_NAME

    RACE(%RACE_NUMBER%)/CANDIDATE_INFO/CANDIDATE(1)/PIC_ID


    and etc, then I input 1-227 into the DataLinq Key field of the scene for each race to display, depending on where they fall in the xml.

    EDIT: so I know the forum doesn't like greater-than/less-than, but it appears to remove back-slashes, as well, I have replaced my back-slashes with slashes.

    #XPression


  • 11.  RE: Scripting DataLinq

    Posted 02-26-2014 18:24
    Yes, that looks like the right formatting to me.

    #XPression


  • 12.  RE: Scripting DataLinq

    Posted 02-26-2014 19:35
    Beautiful, works like a charm.

    Final follow-up (hopefully):

    This is not a published object through the MOS Gateway plug-in for iNews. If we upgraded to a new version of the plug-in or MOS Gateway, would it be possible to do this via iNews instead of needing to build a scene with the default number for each race?

    We could try just updating the MOS Gateway software, or updating the MOS Gateway plug-ins on the client PCs.

    This may seem like a lot of up-front work, but we still haven't gotten to the point of "so much time spent that it makes it not worth it compared to doing it the hard way."

    #XPression


  • 13.  RE: Scripting DataLinq

    Posted 02-26-2014 19:37
    You would need to upgrade all components (mos gateway, plugins, and playout/preview engines).

    Then the "datalinq key" would appear in the plugin just like a published text field.

    #XPression


  • 14.  RE: Scripting DataLinq

    Posted 02-26-2014 19:42
    Eek, that's a bit more of a project. I'll run it past my chief engineer. Are there any release notes from 5.0-2313 to 5.1-whatever is stable? Also, any possible conflicts between the two. If this is a seamless swap, we're more than likely good-to-go, but we had some issues in our last update that we don't want to encounter right before an election night.

    Specifically we had problems getting BlueBox to run as an application instead of as a service (needs to have network drive access).

    I'm also on the lookout for any reason scenes might not work between versions, and any problem with scene IDs, as we have LOTS of pre-built rundown skeletons that would need to be updated if the scene IDs were changed.

    #XPression