How to explore Workflow script (preview) functionality

Karthik_Anbusekar
edited August 26 in General

Recently we upgraded to experian 3.1, and i would like to try Workflow Scripting (preview). But i unable to find those feature. Can anyone please help me with this?

Comments

  • Josh Boxer
    Josh Boxer Administrator
    edited August 28

    Hello Karthik

    The Workflow scripting feature is in Preview, but you can enable it by creating a text file called devfeatures.properties containing the line workflowscripting=true and saving this file where your server.properties file is located (by default, this will be C:\Program Files\Experian\Aperture Data Studio {version}) then restart the service Experian Aperture Database Server.

    Once enabled you will see a script box option on the Create Workflows screen:

    image.png

    The script language to use is PRQL, reference: https://prql-lang.org/book/
    The following PRQL commands/transforms are supported:

    PRQL transform

    Purpose

    Workflow step

    from

    Specify data source (using External Label)

    Source

    derive

    Compute new columns

    Transform

    select

    Select, compute and rename columns

    Transform

    filter

    Select rows based on their value

    Filter

    sort

    Order rows based on the value of columns

    Sort

    join

    Match two sources

    Join

    take

    Pick rows based on their position

    Sample

    group

    Partition rows in to groups

    Group

    aggregate

    Summarise many rows in to one row

    Group

    append

    Concatenates two sources

    Union

    Also the PRQL variables let and into. Plus the following Workflow steps that are are not in the standard PRQL definition: takesnapshot <existing Dataset external label> and export csv/txt/xls/xlsx/json

  • Josh Boxer
    Josh Boxer Administrator
    edited August 28

    A few examples

    from SODetail 
    derive Total_Value = Price * Quantity
    sort {-Total_Value}
    take 20
    

    from SODetail
    derive Total_Value = Price * Quantity
    sort {-Total_Value}
    take 20

    from Customers
    filter Country == "United Kingdom"
    into UKCustomers let HighValueCustomers = (
    from Customers
    filter Country != "United Kingdom" && Sales Last Year > 1000000
    ) from UKCustomers
    append HighValueCustomers derive Contact_Name = f"{Forename} {Surname}"select !{Forename, Surname, Discount Code}
    export csv

    Feel free to share any questions or feedback. If more examples are needed then let me know.