This discussion is locked
bustback

Q: PostgreSQL viewing/administration

We now know that Final Cut Server uses PostgreSQL for the database and that it's available on port 5443 (I think).

Two questions:

1. How can I connect to the database?
2. Has anyone tried to install phpPgAdmin into the Final Cut Server installation to check and review the database?

Also, separate but semi-related question from an administration standpoint...

Where is the documentation on importing/exporting XML definitions of assets in Final Cut Server?

I have to web-enable the Final Cut Server installation and am looking for resources on how I might go about this. I think there was a ruby/php driven web interface that was demoed at NAB but that it's currently unavailable and is an internal Apple project (why would that be... Artbox had some of those capabilities already?!).

Anyway, if anyone can point me in the right direction I'd appreciate it. There's no documentation on the low level capabilities of Final Cut Server (command-line, XML handling, etc.).

cheers,

jon

g5, Mac OS X (10.4.11)

Posted on Apr 28, 2008 5:16 AM

Close

Q: PostgreSQL viewing/administration

  • All replies
  • Helpful answers

Page 1 Next
  • by bustback,

    bustback bustback Apr 28, 2008 5:19 AM in response to bustback
    Level 1 (5 points)
    Apr 28, 2008 5:19 AM in response to bustback
    Additionally ....

    Has anyone tried to configure Final Cut Server to use a common installation of PostgreSQL and not one that's jerry-rigged into the Final Cut Server bundle?

    It's sort of backward that Apple didn't enable the PostgreSQL install to optionally use an existing database.
  • by AlexMedina,

    AlexMedina AlexMedina Apr 28, 2008 7:39 AM in response to bustback
    Level 1 (40 points)
    Apr 28, 2008 7:39 AM in response to bustback
    I'm not sure if this answers any questions for this post, but here is some info on the XML. If you configure FCS to output an XML file, it will show you the exact format that you need to use to format your XML files to be read in by FCS. So, here is what it looks like:

    <?xml version="1.0"?>
    <FinalCutServer>
    <getMdReply>
    *<entity entityType="asset" entityId="/asset/1046">*
    <metadata>
    <mdValue fieldName="Location" dataType="string">Orlando, Florida</mdValue>
    </metadata>
    </entity>
    </getMdReply>
    </FinalCutServer>



    To be able to read in XML data, however, you need to know the specific ID number of the asset and/or production that you are working with. That's under the EntityID line. Most likely, you will need to run a script or command search to find the production or asset that you want to work with and then have that script write out an xml file using this format.

    Keep in mind that the format above is an outputted XML file. For the bolded parts of the code, you will need to change it to the following to format an input XML data file:

    <request reqId="setMd" entityId = "/asset/153">
    <params>

    Make sure your closeout tags correspond to those as well. You can have as many mdValue tags as you want - but they all have to correspond to fields in FCS.

    To integrate with Ruby, PHP, or CGI for a web interface, I'm thinking that you'd need to either parse out this file using a program, or I'm sure there is an easier way to get around it. I know there are a wide range of command-line programs built into FCS that will output this data without having to parse out an XML file. The getMd command is available from the command line thought the unix FCS client, where the return is simply the value of the field you are looking for (much easier to work with). I'm really hoping that Apple comes out with some docs on this. I'm going to keep an eye on the developer site.
  • by AlexMedina,

    AlexMedina AlexMedina Apr 28, 2008 8:02 AM in response to AlexMedina
    Level 1 (40 points)
    Apr 28, 2008 8:02 AM in response to AlexMedina
    I just realized how confusing that read, so let me clarify about the input file. It would need to be formatted this way:

    <?xml version="1.0"?>
    <FinalCutServer>
    <request reqId="setMd" entityId = "/asset/153">
    <params>
    <mdValue fieldName="Location" dataType="string">Orlando, Florida</mdValue>
    </params>
    </request>
    </FinalCutServer>

    If I can find the specific commands for finding assets or productions based on certain criteria, I'll post here.
  • by bustback,

    bustback bustback Apr 28, 2008 8:35 AM in response to bustback
    Level 1 (5 points)
    Apr 28, 2008 8:35 AM in response to bustback
    Cool information, thanks!

    I'm definitely going for the more connected route where I don't have to deal with XML files in general. XML will be great for some uses. I love how there's no dev. documentation on that...there's Final Cut Studio XML docs on the ADC site, but that's not useful really for Final Cut Server.

    I'd really like to be able to just dump the PostgreSQL data from Final Cut Server to an external system, preferably taking on the data I need.

    Out of curiosity, what command-line clients are included in the FCS installation? I can't seem to locate any of them.

    thanks a ton.

    - jon
  • by Pro_Test,

    Pro_Test Pro_Test May 16, 2008 12:30 AM in response to bustback
    Level 1 (10 points)
    May 16, 2008 12:30 AM in response to bustback
    Hi, you can connect using this information:
    -port 5433
    -user postgres, password is blank
    -database px
    It works only on localhost, I'm using Navicat for PostgreSQL.
  • by inceptdate,

    inceptdate inceptdate May 21, 2008 3:38 PM in response to Pro_Test
    Level 1 (10 points)
    May 21, 2008 3:38 PM in response to Pro_Test
    right on... database is here...

    /var/db/finalcutserver

    my 2 cents
  • by goldcougar,

    goldcougar goldcougar May 22, 2008 9:54 AM in response to bustback
    Level 1 (0 points)
    May 22, 2008 9:54 AM in response to bustback
    The easiest way to build a web front-end to your PostgreSQL database is to use a tool like Servoy: http://www.servoy.com

    Servoy will let you connect to any SQL database with a JDBC driver, which PostgreSQL has, and build AJAX web-based or java-base front ends with a simple WYSIWYG environment. And of course, it will run on Mac
  • by DOSX,

    DOSX DOSX Jul 25, 2008 9:35 AM in response to goldcougar
    Level 1 (0 points)
    Jul 25, 2008 9:35 AM in response to goldcougar
    Wow, thanks for the information.

    here is my contribution.

    you can connect to the postgresSQL remotely using Navicats SSH Tunneling.
    -Enable Remote Access on the FCS
    -On Navicat use "Localhost" as the host on the General tab, then configure SSH Tunneling.

    Now to locate the Metadata Table.


    ---
    Ted Simbajon
  • by DOSX,

    DOSX DOSX Jul 25, 2008 10:16 AM in response to DOSX
    Level 1 (0 points)
    Jul 25, 2008 10:16 AM in response to DOSX
    Which table are the metadata located?

    Yikes!!!
  • by pc.huff,

    pc.huff pc.huff Nov 6, 2008 2:11 PM in response to DOSX
    Level 1 (0 points)
    Nov 6, 2008 2:11 PM in response to DOSX
    How exactly did you connect remotely? I have a FCS running, but no client. I saw no way to "enable remote access" in FCS. How did you configure SSH tunneling?

    Thanks!
  • by Will Griffith,

    Will Griffith Will Griffith Nov 7, 2008 6:12 AM in response to pc.huff
    Level 1 (65 points)
    Nov 7, 2008 6:12 AM in response to pc.huff
    Not "IN" FCS but "ON" the FCS.
    Go into sharing prefs and turn it on.
  • by A. Richards,

    A. Richards A. Richards Nov 8, 2008 10:47 AM in response to bustback
    Level 3 (625 points)
    Nov 8, 2008 10:47 AM in response to bustback
    bustback wrote:
    Where is the documentation on importing/exporting XML definitions of assets in Final Cut Server?

    I have to web-enable the Final Cut Server installation and am looking for resources on how I might go about this. I think there was a ruby/php driven web interface that was demoed at NAB but that it's currently unavailable and is an internal Apple project (why would that be... Artbox had some of those capabilities already?!).

    Anyway, if anyone can point me in the right direction I'd appreciate it. There's no documentation on the low level capabilities of Final Cut Server (command-line, XML handling, etc.).

    cheers,

    jon


    You can download the Rails app that Apple demoed at NAB2008 here. The documentation accompanying it has complete XML specs for the outgoing and incoming XML.
  • by pc.huff,

    pc.huff pc.huff Nov 10, 2008 6:45 AM in response to Will Griffith
    Level 1 (0 points)
    Nov 10, 2008 6:45 AM in response to Will Griffith
    I'm still confused. There is nothing in my System Preferences for FCS. Inside of preferences for FCS while using the client I find nothing related to sharing and there is nothing on the general FCS icon on the "Other" category of Sys Prefs.

    What am I missing? I'm not running Serverm but regular OS X.

    Thanks!
  • by Will Griffith,

    Will Griffith Will Griffith Nov 10, 2008 6:59 AM in response to pc.huff
    Level 1 (65 points)
    Nov 10, 2008 6:59 AM in response to pc.huff
    This is a SYSTEM option, not FCS.

    1. got to "System Prefs"
    2. click on "Sharing"
    3. select "Remote Login"

    Configure SSH for user that has admin rights for FCS.
Page 1 Next