Can substitution variables be used in a dataflow?

Unknown
Unknown Active Partner
edited April 2020 in Platform

I have a data reader that is reading data from a database. I have included it in a database process. I would like to add a data flow step in my process to save the @datetime to a text cube. We can then display the correct time that this process last run on appropriate screens to let users know when the load was last run. I thought something like the column algorithm below would work, but no luck so far. Thanks for your help!

 

image

Tagged:

Answers

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    500 Comments 250 Likes Fourth Anniversary 25 Answers

    Hi Bob Gill,

     

    you don't need to use the algorithm. You could just put

    <TargetCube>= @datetime

    in your dataflow.

    This solution works quite well in our projects.

     

    Regards,

    Helmut

  • Hello Bob Gill,

    If it still does not work, try also to take off the flag on "high performance mode" option.

     

    ciao,

    federico

  • Unknown
    Unknown Active Partner

    A side mark on this.

    In older versions (I believe before 10.1): this type of dataflow worked in high-performance mode.
    In newer versions: this type of dataflow works only when high-performance is disabled.

    Therefore, I would suggest you to immediately deactivate the high-performance mode, even when working with older versions to avoid problems when upgrading the software.

    All the best,
    Jonathan

  • Hi all,

     

    you can find more layout algorithms in this article BOARD Layout Algorithm Syntax

    These are available to be used both in algorithm blocks and in the dataflow.

     

    Hope this helps!

    Ciao,

    Gabriele

  • Unknown
    Unknown Active Partner
    edited March 2020

    It seems this works well for text datatypes, but I'm having a challenge saving the value as a date datatype. My goal is to save 2/1/2018 to my date cube as the last date this process ran.

     

    image

    • The first column algorithm (a) uses @datetime and returns 2/1/2018 6:48:06 PM as text
    • The second column algorithm (b) uses @date and returns 2/1/2018 as text
    • The third column algorithm (c) refers to (b) and doesn't return anything as a date
    • The fourth column algorithm (d) saves a date to a date cube

     

    I've been referring to the substitution formula reference to try and find a way to save the current date to a date cube, but no luck so far. Am I missing something? Thank you for your help.

     

      For now, I'll just use a text cube, but I thought I would pose the question to see if the community can help me learn the right way to do this.

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    500 Comments 250 Likes Fourth Anniversary 25 Answers

    Hi Bob Gill,

    in that case I'd propose you'd use something like <TargetCube> = today() - assuming your Target ist a Date-Cube.

     

    Best Reagrds

    Helmut