February 11-13, 2019 Raleigh, NC.

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

Enhance your reports with template and script columns
3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Introduction to Oracle9i: SQL1 Basic SQL SELECT Statements.
Introduction to scripting
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
JSP Standard Tag Library
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 2 Basic SQL SELECT Statements Oracle 10g: SQL.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Using Client-Side Scripts to Enhance Web Applications 1.
ISV Innovation Presented by ISV Innovation Presented by Business Intelligence Fundamentals: Data Cleansing Ola Ekdahl IT Mentors 9/12/08.
Module 3: Creating Maps. Overview Lesson 1: Creating a BizTalk Map Lesson 2: Configuring Basic Functoids Lesson 3: Configuring Advanced Functoids.
WHAT IS A DATABASE? A DATABASE IS A COLLECTION OF DATA RELATED TO A PARTICULAR TOPIC OR PURPOSE OR TO PUT IT SIMPLY A GENERAL PURPOSE CONTAINER FOR STORING.
Introducing Python CS 4320, SPRING Resources We will be following the Python tutorialPython tutorial These notes will cover the following sections.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Database: SQL, MySQL, LINQ and Java DB © by Pearson Education, Inc. All Rights Reserved.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
CHAPTER 7 LESSON B Creating Database Reports. Lesson B Objectives  Describe the components of a report  Modify report components  Modify the format.
Web Database Programming Using PHP
JavaScript, Sixth Edition
Chapter 5 Validating Form Data with JavaScript
Chapter 11 - JavaScript: Arrays
Lesson 5-Exploring Utilities
Microsoft Office Access 2010 Lab 3
CHAPTER 10 JAVA SCRIPT.
IST 220 – Intro to Databases
Relational Database Design
Web Database Programming Using PHP
Dynamic SQL: Writing Efficient Queries on the Fly
Introduction to Scripting
Statement atoms The 'atomic' components of a statement are: delimiters (indents, semicolons, etc.); keywords (built into the language); identifiers (names.
JavaScript: Functions.
Welcome! Open Firefox Go to: usability-sf.
Intro to PHP & Variables
Web Systems Development (CSC-215)
JavaScript Charting Library
Topics Introduction to File Input and Output
Physical Database Design
WEB PROGRAMMING JavaScript.
Introduction to JavaScript for Python Programmers
PHP.
T. Jumana Abu Shmais – AOU - Riyadh
Web DB Programming: PHP
TITLE OF PRESENTATION PRESENTER.
Writing Basic SQL SELECT Statements
CSCI N317 Computation for Scientific Applications Unit R
Lab 2 and Merging Data (with SQL)
Lab 2 HRP223 – 2010 October 18, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected.
Contents Preface I Introduction Lesson Objectives I-2
Implementation of Relational Operations
Spreadsheets, Modelling & Databases
Relational Database Design
String Processing 1 MIS 3406 Department of MIS Fox School of Business
ICT Database Lesson 2 Designing a Database.
Introducing JavaScript
JavaScript: Introduction to Scripting
September 12-14, 2018 Raleigh, NC.
Joins and other advanced Queries
Topic 12 Lesson 2 – Retrieving Data with Queries
Lecture 5 SQL FUNCTIONS.
Topics Introduction to File Input and Output
September 12-14, 2018 Raleigh, NC.
Creating Datasets & Using Data Flows
Web Programming and Design
This is an introduction to JavaScript using the examples found at the CIS17 website. In previous examples I specified language = Javascript, instead of.
Presentation transcript:

February 11-13, 2019 Raleigh, NC

Getting the Most Out of Your Data Advanced Flow Steps Getting the Most Out of Your Data

Agenda What are Flow Steps? Basic Flow Steps Advanced Flow Steps PowerScript

What Are Flow Steps? Calculations performed as data streams in from query Manipulate existing data or derive new values Can have any number of steps Steps are performed sequentially

Examples of Basic Flows

Basic Flow Steps - Calculated Column Similar to Informer 4 Can’t reference Java objects Must return a value Regular JavaScript Use for basic calculations

Basic Flow Steps - Concatenate Joins multiple fields together Space=default delimiter

Basic Flow Steps – Coordinates from Lat/Long

Basic Flow Steps - Counter

Basic Flow Steps – Fields from another Dataset Need common key value Pull back first or all matching records Not recommended for large Datasets

Basic Flow Steps – Java Calculated Field New in 5.0.18 Same as Informer 4 Can reference Java objects Migration bucket All migrated 4 calculations Should be converted for performance

Basic Flow Steps – Percent of Total

Basic Flow Steps – Fields from another Datasource Links to another Datasource Must have common key field Can pull first or all matching records Specify which fields to retrieve Should not be used in lieu of direct linking

Basic Flow Steps – Templated Field Same as Informer 4 Can not perform calculations Does not change data Similar to mail merge

Basic Flow Steps – Time Between Calculates time between two dates Use fields and/or literal date values Time units: seconds, minutes, hours, days,

Basic Flow Steps – Zip2Geo Converts zip code to geolocation value Relative center of zip code Use for heat maps

Advanced Flow Steps - Transform

Transform Flows – Field Settings Change the column’s label (header), Data type and/or Default Value

Transform Flows – Find & Replace Finds values in the result set and substitutes the replacement value. Good for data cleansing where common misspellings or inconsistencies in data entry occur.

Transform Flows – Merge Duplicates Merges rows together, displaying the unique matched values once and the remaining fields as either an array or the first/last value of the array. Useful when dealing with data having a one-to-many relationship.

Transform Flows - Normalize Opposite of Merge Duplicates. Expands array values into separate rows and repeats any non-array values for each array entry.

Advanced Flow Steps - Remove

Remove Fields

Advanced Flow Steps - Advanced

Advanced Flows - Flush

Advanced Flows - PowerScript Use the NodeJS vm library Plain old JavaScript with a sandboxed script context. No more Java objects!

PowerScript vs. Calculated Column PS does not return a value PS can create multiple columns in single step PS can reference reserved variables and exposed libraries

PowerScript Context Variables/Objects $record object The current row. PowerScript are free to modify the record. $index number The current row number (row 1 = index 0) $omit() function When called, removes the current row $fields Field metadata $field A function to describe a field: $field(‘location’).label(‘Location’) $inputs User inputs $local Whatever you want! Is not cleared from one record to the next _ object / function Lodash v3. Learn more at https://lodash.com moment Date manipulation and formatting: https://momentjs.com

PowerScript $record The current record being processed Access existing columns via alias var name = $record.firstName + ‘ ‘ + $record.lastName; Can replace existing values $record.firstName = “Tim”; Create new columns $record.helloWorld = “Hello World”;

PowerScript $local Creates local, internal variables $local.myLocalVariable = “123”; Persists across rows Important to initialize $local.xyz = $local.xyz || 0; Does not appear in output

PowerScript $fields, $query, $datasource Access to various objects Typically would not need these See Help Center article at https://informer5.zendesk.com/hc/e n-us/articles/115005113823 for more information

PowerScript $inputs Access inputs Key/Value pair, key=input Alias $inputs[‘myInputValue’] $inputs.myInputValue

PowerScript $index Returns the current row number var rowNumber = $index;

PowerScript Functions and Libraries $omit() Removes the current record from the result set if ($record.ShipCountry === "France") { $omit(); }

PowerScript Functions and Libraries Lodash Library for manipulating arrays, numbers, strings, objects, etc. lodash.com – be sure to use version 3.x documentation Referenced by _ (underscore) $record.orderTotal = _.sum($record.orderAmount);

PowerScript Functions and Libraries Moment Library to parse, validate, manipulate, and display dates and times momentjs.com Can take a string, date object, moment object, number, or array as argument if (moment($record.ShippedDate).isAfter($record.RequiredDate)) { $record.shipStatus = "Shipped Late"; } else { $record.shipStatus = "Shipped On Time"; }

Useful PowerScript Examples Pivot arrays

JavaScript Object Notation (JSON) An object is a list of Key:Value pairs Value can be any data type Access Value with dot (.) notation or bracket [] notation

Pivot Arrays Using for loop Using lodash for (var i = 0; i < $record.s_tudent_non_courses_admission_tests_assoc_stncNonCourse.length; i++) { var name = $record.s_tudent_non_courses_admission_tests_assoc_stncNonCourse[i].replace(/\./g, '_'); $record[name] = $record.s_tudent_non_courses_admission_tests_assoc_stncScore[i]; $field(name).type('integer'); } Using lodash _.forEach($record.s_tudent_non_courses_admission_tests_assoc_stncNonCourse, (test, ndx) => { $record[_.snakeCase(test)] = $record.s_tudent_non_courses_admission_tests_assoc_stncScore[ndx]; $field(_.snakeCase(test)).type('integer'); });