EDGEANALYTIX, LLC
  • Home
  • SalesForce Solutions
  • Non-Profits
  • Analytics Lab
  • Testimonials
  • About
  • Home
  • SalesForce Solutions
  • Non-Profits
  • Analytics Lab
  • Testimonials
  • About

Analytics Lab:

A blog series distilling QUANTITATIVE data concepts AND USE-CASES IN THE EINSTEIN ANALYTICS PLATFORM.

Bindings in SAQL Queries-compact vs. non-compact

5/26/2020

0 Comments

 
Bindings enable the user to interact with the dashboard for flexibility in data visualiation. Example below compares using bindings for non-compact and compact SAQL. The 1st is a SAQL in noncompact form which compares a text date (ie cTimeStamp=cTimeStampText) using .AsEquality. The 2nd is an aggregate Flex compact form in the "filters" statement.


"query": "q = load \"zDSForecastXProductLineItem\";\nq = filter q by {{column(qDateTest_1.selection,[\"cTimeStampText\"]).asEquality('cTimeStampText')}};\nq = group q by 'cBUBilling';\nq = foreach q generate 'cBUBilling' as 'cBUBilling', sum('Total_Value__c') as 'sum_Total_Value__c';\nq = order q by 'cBUBilling' asc;\nq = limit q 2000;",
 
 
"query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "groups": [
                        "cBUBilling"
                    ],
                    "filters": [
                        [
                            "cTimeStampText",
                            [
                                "{{column(qDateTest_1.selection, [\"cTimeStampText\"]).asObject()}}"
                            ],
                            "=="
                        ]
                    ]
                }
 
 
  "qDateTest_1": {
                "broadcastFacet": false,
                "datasets": [
                    {
                        "id": "0Fb3u000000c7u7CAA",
                        "label": "zDSForecastXProductLineItem",
                        "name": "zDSForecastXProductLineItem",
                        "url": "/services/data/v48.0/wave/datasets/0Fb3u000000c7u7CAA"
                    }
                ],
                "isGlobal": false,
                "label": "qDateTest",
                "query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "groups": [
                        "cTimeStampText"
                    ]
 
 

0 Comments



Leave a Reply.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    March 2020
    January 2020
    December 2019
    November 2019

    Categories

    All

    RSS Feed

Site powered by Weebly. Managed by Hostwinds