Data360 Analyze

 View Only
  • 1.  Output file with customized timestamp

    Employee
    Posted 12-27-2019 01:18

    In File property, I understand we can specify the runtime timestamp via Property References --> run properties --> CurrentDateTime.

    How can I format this timestamp? By default is yyyy-MM-dd HH:mm:ss

    What if I want yyyyMMddHHmmss? Where can I find the configuration? thanks.

     

    I want something like this : testing_yyyyMMddHHmmss.txt



  • 2.  RE: Output file with customized timestamp

    Employee
    Posted 12-27-2019 15:28

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    You can achieve this with python's os module. You can write out the file to some generic file name and then clock the output node to a Generate Data node and immediately rename (os.rename) it with some manipulated value. Screenshot of a simple example attached.

     

    Attached files

    rename.png

     



  • 3.  RE: Output file with customized timestamp

    Employee
    Posted 01-03-2020 05:11

    If you are using Data360 Analyze v.3.5.1 or above you can use the PathSafe set of built-in Run* property values which are the replacement for Current* run properties. See the following topic in the Help documentation 

    'Advanced topics' > 'Using derived property values' > 'Run property substitution'

    This information is also available online for the latest version of the product here.

    https://d3sa-preview.infogixsaas.com/docs/dist/help/Default.htm#d-advanced-topics/substituting-run-properties.htm

     



  • 4.  RE: Output file with customized timestamp

    Employee
    Posted 01-23-2020 20:50

    Thanks Gerry and Adrian! Ya, I find that Data360 Analyze v.3.5.1 has the path safe properties for timestamp. However, I have to stick to v.3.5.0 for enterprise purpose. Regarding Gerry solution, it works totally fine via running the entire process manually. However, I try to schedule the process and find that there may have arbitrary failures on the Generate Data node.

    Error Code: brain.nodes.script.jython.scriptExecError

    ERROR:OSError:(0,"Couldn't rename file") Error Executing "CreateRecords" at line "10"

    Line 10 : os.rename(genName, newFileName)

    Is it the OS level access right problem? But I can run the process successfully sometimes.

    For example, I have 3 batches(5pm,530pm,6pm) running for 3 days, there may  be none, 1 or 2 times of success, out of 3 day.

     

    Thank you so much for helping.



  • 5.  RE: Output file with customized timestamp

    Employee
    Posted 01-29-2020 09:45

    When scheduled, do you have multiple data flows running at the same time? The file name of the temporary file that is created by the Output Excel node (e.g. GenericName.xlsx in Gerry's example) needs to be unique else it could be deleted (or overwritten) by another scheduled data flow execution.