Data Virtualization Tutorial: Custom Functions

Slides:



Advertisements
Similar presentations
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Advertisements

SOUL INSTALLATION Step-1 For this Please Install the Version 7.0 or SQL Server 2000 or onwards.
DB Audit Expert v1.1 for Oracle Copyright © SoftTree Technologies, Inc. This presentation is for DB Audit Expert for Oracle version 1.1 which.
Tutorial Introduction Fidelity NTSConnect is an innovative Web-based software solution designed for use by customers of Fidelity National Title Insurance.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
Batch Jobs Using the batch job functions. Use [Bulk Changes][Batch Job Utility] to start. Read the information panel. Check with TAMS Technical Support.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
Data Virtualization Demoette… ODBC Clients
Data Virtualization Tutorial… SSL with CIS Web Data Sources
Data Virtualization Demoette… Logging in CIS
Development Environment
Data Virtualization Demoette… Packaged Query Single Select Option
Project Management: Messages
Data Virtualization Demoette… Business Directory Custom Properties
Data Virtualization Demoette… Caching – Database – Multi Table
Business Directory REST API
Miscellaneous Excel Combining Excel and Access.
Data Virtualization Tutorial: Introduction to SQL Script
Data Virtualization Demoette… Custom Java Procedures
Data Virtualization Demoette… Flat-File Data Sources
TOPSpro Special Topics
Data Warehousing/Loading the DW—Topics
Data Virtualization Demoette… JMeter Load Testing CIS JDBC
Data Virtualization Demoette… ADO.NET Client
Data Virtualization Community Edition
Configuring Applications
Data Virtualization Tutorial… LDAP Domains in CIS
Data Virtualization Community Edition
Data Virtualization Demoette… CIS Rights
Data Virtualization Tutorial… CORS and CIS
Data Virtualization Demoette… Data Lineage Reporting
Data Virtualization Tutorial… OAuth Example using Google Sheets
Data Virtualization Tutorial: XSLT and Streaming Transformations
Data Virtualization Demoette… JDBC Clients
Dynamic SQL: Writing Efficient Queries on the Fly
Data Virtualization Tutorial… Semijoin Optimization
Data Virtualization Demoette… Column-Based Security
mysql and mysql workbench
Data Virtualization Demoette… Parameterized Queries
Data Virtualization Demoette… Salesforce.com Data Source
Data Virtualization Demoette… DDL Feature
20761A 10: Using Subqueries Module 10   Using Subqueries.
Data Virtualization Tutorial: JSON_TABLE Queries
Data Virtualization Community Edition
Reports: Pivot Table ©2015 SchoolCity, Inc. All rights reserved.
Adding and editing students and student test settings
Chapter 15 QUERY EXECUTION.
Adding and editing users
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Module 13: Creating Data Visualizations with Power View
For Computer-Based Testing
Adding and Editing Users
Managing Rosters Screener Training Module Module 5
Test Information Distribution Engine (TIDE) Training
Dynamic SQL: Writing Efficient Queries on the Fly
Welcome ! Excel 2013/2016 Data Consolidation (Lab Format)
Using JDeveloper.
8 6 MySQL Special Topics A Guide to MySQL.
Two methods to observe tutorial
These slides are for reference only. They are not "lecture notes"
For Computer-Based Testing
Lesson 15 Working with Tables
Objectives In this lesson, you will learn to:
An Introduction to Designing and Executing Workflows with Taverna
Key Applications Module Lesson 14 — Working with Tables
Data Warehousing/Loading the DW—Topics
Manufacture Part Search Template Overview
Presentation transcript:

Data Virtualization Tutorial: Custom Functions Hello, and welcome to the Tutorial Series for Cisco Information Server, or CIS. In this tutorial, we discuss Custom Functions.

For more details… Resources: Additional information: Archives Documentation Training Resources: Archives Data files Tutorial Document Note that Tutorials are NOT meant to be comprehensive training modules. Instead, they demonstrate a very basic use case that can be built quickly and easily. However, the Data Virtualization Knowledge Base contains additional information that will help you learn more and go deeper. Additional resources in the Knowledge Base include: <CLICK> Resources used to build the tutorial, such as Data Virtualization Archive files, data source files, and a document version of this tutorial… <CLICK> … and additional information, including documentation and training materials.

Agenda What are they and why do they matter? How-to Summary Here is our agenda. We begin by defining Custom Functions and outlining their importance in Data Virtualization projects. Next we demonstrate the basics of Custom Functions. Finally, we summarize the contents of this tutorial.

Agenda What are they and why do they matter? How-to Summary Let’s begin by discussing what Custom Functions are, and why they are important for Data Virtualization.

What are they? Custom Functions User-Defined SQL construct Accept parameters, return a single scalar output May be used in SELECT or WHERE clause Example: SELECT UPPER(MY_COL) AS UPPER_MY_COL CIS Custom functions created by “promoting” SQL Scripts or Custom Java Procedures SQL functions are programming constructs that accept one or more parameters and return a single scalar output. Functions may be used in SELECT or WHERE clauses. SQL Developers are familiar with standard SQL Functions such as the UPPER function shown in the example here. CIS developers can define custom functions that may be used in similar ways. CIS Developers can create custom functions from any SQL Script or Custom Java Procedure that returns a single scalar output.

Why do they matter? Custom Functions Standardize common tasks Promote re-use Custom Functions are important to CIS Developers in many use cases. They are a convenient way to standardize common data transformation tasks, and they enable re-use across many projects.

Agenda What is it and why does it matter? How-to Summary Next, let’s walk through a very basic demo of Custom Functions.

Here is the business problem… First Name Last Name John Doe Jane Smith Tim Lee Rosterized Name DOE, JOHN SMITH, JANE LEE, TIM Here is the business problem that we illustrate in this tutorial. This enterprise has hundreds of database tables where people’s first and last names are stored in separate columns. <CLICK> They have many different use cases where names must be converted to the format shown here: Last Name, comma, space, First Name, all capitalized in a single column. We’ll call this the “rosterized” name for this demo, and we’ll create a custom function to make it easy for many different projects to perform this task.

Before you begin… We’ll create a SQL Script to do the work, and then promote it to a custom function. The SQL Script is trivial, and you can easily build it from scratch. However, the Knowledge Base also contains a Data Virtualization Archive File with this script. We assume you have a basic understanding of SQL Script; if not, please consult the Knowledge Base resources on this topic. <CLICK> We will use data from the CIS Examples folder, so you do not need to create any data source connections.

Compose the Script Now we’re ready to begin. Create a folder for your work. <CLICK> Right-click the folder and select New SQL Script. <CLICK> Name the script… <CLICK> … and a script skeleton appears in the editor.

Compose the Script Our script is very simple. <CLICK> It accepts two input parameters: first name and last name. <CLICK> It translates the parameters to upper case and concatenates them, separating the last name from the first name with a comma and a space… <CLICK> … and returns the result.

Test the Script Execute the script… <CLICK> … to verify that it is working properly.

Promote the Script to a Function Since our script returns only a single scalar, we can promote it to a custom function. From the Studio Administration menu, select Custom Functions. <CLICK> A list of candidate functions appears. It consists of all procedures and scripts that return a single scalar. <CLICK> Those already promoted appear with a check mark. <CLICK> Search for the new script. <CLICK> Click the check mark, then click OK.

Use the Function in a View Right-click your development folder and select New View. <CLICK> Name the view… <CLICK> … and drag in the Customers table from the ds_orders data source in the CIS Examples folder.

Use the Function in a View Now we can use the Custom Function in our projection. Go to the Grid Panel, right-click the column area, and select Function, Custom. <CLICK> Select the new Function from the list.

Use the Function in a View Now we can fill out the arguments for the function. <CLICK> For argument 1, choose the contactfirstname column. <CLICK> For argument 2, choose the contactlastname column.

Use the Function in a View Name the column with an Alias. <CLICK> Verify that the SQL statement has been created on the SQL tab. Alternatively, I could have typed my statement here instead of using the Grid tab.

Use the Function in a View Execute the View. Our function is working correctly. We have seen how to create a custom function from a SQL Script, and how to use it in a View. Our demo is complete.

Agenda What is it and why does it matter? How-to Summary Let’s summarize what we have seen in this tutorial.

Summary: Definition Custom Functions User-Defined SQL construct Accept parameters, return a single scalar output May be used in SELECT or WHERE clause Example: SELECT UPPER(MY_COL) AS UPPER_MY_COL CIS Custom functions created by “promoting” SQL Scripts or Custom Java Procedures SQL functions are programming constructs that accept one or more parameters and return a single scalar output. Functions may be used in SELECT or WHERE clauses. SQL Developers are familiar with standard SQL Functions such as the UPPER function shown in the example here. CIS developers can define custom functions that may be used in similar ways. CIS Developers can create custom functions from any SQL Script or Custom Java Procedure that returns a single scalar output.

Summary: Benefits Custom Functions Standardize common tasks Promote re-use Custom Functions are important to CIS Developers in many use cases. They are a convenient way to standardize common data transformation tasks, and they enable re-use across many projects.

Summary: Key Take-aways Custom Functions Encapsulate business functionality specific to your enterprise Enable re-use across many projects and many data sources Any script or procedure that outputs a single scalar can be promoted to a Custom Function. As you work with custom functions in CIS, keep these key takeaways in mind. Custom Functions let you encapsulate business functionality that is specific to your enterprise. This functionality can then be re-used across many projects, with data from many disparate sources. You can promote any script or Java procedure to a custom function, as long as it outputs only a single scalar value.

Summary: What’s next? Use your knowledge to encapsulate and re-use business functionality Leverage your knowledge to introspect Custom Functions on your physical data sources Learn to create Custom Java Procedures After completing this tutorial, you are ready to begin using Custom Functions in your Data Virtualization projects. Use your knowledge to encapsulate and re-use important business functionality. Leverage your knowledge to introspect and use custom functions on your physical data sources within CIS. Learn to create Custom Java Procedures that can be promoted to custom functions. Thank you.