Reader small image

You're reading from  Creating Actionable Insights Using CRM Analytics

Product typeBook
Published inDec 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781801074391
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Mark Tossell
Mark Tossell
author image
Mark Tossell

Mark Tossell is passionate about solving problems and improving processes using data. Tableau CRM (Einstein Analytics) and Tableau, powered by AI, are the tools of his trade. He is a proud wearer of the Salesforce Gold Hoodie and recipient of the inaugural APAC Awesome Admin award. He is also a Trailhead learning addict, having earned over 420 badges. In addition, he is honored to be a Tableau CRM Ambassador and a Salesforce Partner Solution Engineer. Mark lives in Sydney, Australia, with his wife, Christina, and son, Adam.
Read more about Mark Tossell

Right arrow

Beginning with code – an introduction to SAQL

This section will introduce you to coding in CRMA using SAQL.

Definitions

We'll now look at detailed definitions regarding what SAQL is and when it can be used.

What is SAQL?

SAQL is a runtime query language that enables ad hoc analysis of datasets. A SAQL script consists of a sequence of statements that are made up of keywords (such as filter, group, and order), identifiers (IDs), literals, or special characters. It is JavaScript Object Notation (JSON)-based and Apache Pig Latin (PIGQL)-familiar. A SAQL query loads an input dataset, operates on it, and outputs the results.

Here is a SAQL example:

q = load "My_Dataset";
q = group q by 'Division_Name';
q = foreach q generate 'Division_Name' as 'Division_Name', sum('Amount')/sum('Quantity') as 'sum_Amt/Qty'; q = order q by 'sum_Amt/Qty' desc; 

What you see in the preceding...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Creating Actionable Insights Using CRM Analytics
Published in: Dec 2021Publisher: PacktISBN-13: 9781801074391

Author (1)

author image
Mark Tossell

Mark Tossell is passionate about solving problems and improving processes using data. Tableau CRM (Einstein Analytics) and Tableau, powered by AI, are the tools of his trade. He is a proud wearer of the Salesforce Gold Hoodie and recipient of the inaugural APAC Awesome Admin award. He is also a Trailhead learning addict, having earned over 420 badges. In addition, he is honored to be a Tableau CRM Ambassador and a Salesforce Partner Solution Engineer. Mark lives in Sydney, Australia, with his wife, Christina, and son, Adam.
Read more about Mark Tossell