Clarity

  • 1.  File upload and loading?

    Posted Apr 04, 2012 04:00 PM
    Currently we have a setup where we get a file from a business customer, I load it to a custom table, and then a process or job picks it up from there and does whatever. It has worked fine for ages and is perfect.

    But now as we are getting more of these, we are wondering how some other people have done similar things?

    1) I assume Clarity has a table that shows file uploads and their location, date, etc. This would be helpful.
    2) If you are on multiple servers, do files go randomly to servers or do they live on one or the other?
    3) Can you FTP using GEL to transfer a file from say the app server to the database server?

    I am sure I will have more questions but this is good for a start.

    Thanks all!


  • 2.  RE: File upload and loading?
    Best Answer

    Posted Apr 05, 2012 03:21 AM
    1) I assume Clarity has a table that shows file uploads and their location, date, etc. This would be helpful.

    clb_dms_files
    clb_dms_folders
    clb_dms_flat_hierarchy

    Relationship
    clb_dms_folders.id = clb_dms_flat_hierarchy.ancestor_id
    clb_dms_files.parent_folder_id = clb_dms_flat_hierarchy.child_id
    clb_dms_folders.assoc_obj_id = inv_investments.id
    clb_dms_folders.assoc_obj_type = 'Projects'


    2) If you are on multiple servers, do files go randomly to servers or do they live on one or the other?

    they would go randomly.


    3) Can you FTP using GEL to transfer a file from say the app server to the database server? not sure, but guess, you can do that.


    NJ


  • 3.  RE: File upload and loading?

    Posted Apr 05, 2012 04:02 AM

    chris_shaffer wrote:

    3) Can you FTP using GEL to transfer a file from say the app server to the database server?
    Yes you can.

    A quick search on the boards for "FTP GEL" will give you a few threads (like this one) - the general theme of the threads is just that "the details are in the Integration Guide" (explicit details for FTP tags within GEL).

    (In theory you can do "anything" in GEL since it can call Java, OS commands etc etc... the trick is just working out the most appropriate way of doing stuff, but thats why we get paid I guess! cool))


  • 4.  RE: File upload and loading?

    Posted Apr 05, 2012 05:05 PM
    Hmmmmm so what is the logic to the folder structure?

    I see
    filestore / 210 / 007 / 7210013 (as file name)
    But on the tables I do not see anything that spells out the 210 / 007 directory structure?

    Thanks for the help, I will continue to dig.


  • 5.  RE: File upload and loading?

    Posted Apr 05, 2012 05:17 PM

    chris_shaffer wrote:

    Hmmmmm so what is the logic to the folder structure?
    Aha, Sundars post in THIS thread might help you here! cool)


  • 6.  Re: File upload and loading?

    Posted Jun 17, 2016 07:02 AM

    Hi Dave_3.0,

     

    May I ask you to share your old link/post again? I'm searching for pretty the same "answer" like Chris before,

    so how/where to find precise document path for random project attachments. Thanks!

     

    Matej



  • 7.  Re: File upload and loading?

    Posted Jun 17, 2016 08:08 AM

    Wasn't my comment, just a link (which Jive has broken )

     

    It was possibly to here though ; Urgently need 2 Queries



  • 8.  Re: File upload and loading?

    Posted Jun 21, 2016 02:47 AM

    Hi Dave,

     

    Thanks, that's it. Modifying this query I was able to retrieve Attachment path and name within the project. Final query is like this:

     

    select oi.id as Project_ID, oi.code, oi.name,
    cdfd.PATH_NAME,
    cdf.name as File_name,
    SUBSTR(CDV.ID,2,3)||'/00'||SUBSTR(CDV.ID,1,1)||'/'||CDV.ID as
    folder_name,
    cdh.VERSION_ID AS F_name
    FROM inv_investments oi
    INNER JOIN CLB_DMS_FOLDERS CDFD ON (CDFD.Assoc_obj_id = oi.ID)
    inner join CLB_DMS_FILES CDF on (CDF.PARENT_FOLDER_ID = CDFD.ID)
    inner join CLB_DMS_VERSIONS CDV on (CDF.id = CDV.file_id)
    INNER JOIN CLB_DMS_HISTORIES CDH ON (CDV.ID = CDH.version_id)
    where CDFD.Assoc_obj_id = 5147393
    

     

    Matej