Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quick Start: More Metadata

Similar presentations


Presentation on theme: "Quick Start: More Metadata"— Presentation transcript:

1 Quick Start: More Metadata
William Poppe Curriculum Developer

2 Objectives Accessing Data Creating Virtual Columns
Creating Synonym Views Building Dynamic Metadata The Master File Profile Creating Synonym Filters

3 Accessing Data

4 Working with a Relational Database
There are two requirements for WebFOCUS to read from or write to a relational database: A data adapter must be configured to access a data source by providing a connection to the target data. Synonyms (metadata – Master Files/Access Files) must be created for the relational database (such as SQL Server).

5 Data Adapters Data adapters manage the communication between the WebFOCUS Client and the data source through the use of SQL statements. WebFOCUS provides native adapters for 300+ data sources, including: Traditional - Relational, ERP, and Legacy data Modern - Cube, Netezza, 1010, Par Accel, Greenplum, Hyperstage, and Hadoop/Hive/HDFS External - Salesforce Web services - REST Adapter Social Data - Facebook and Twitter

6 Query and Data Adapter Processing Sequence
The process of running a request through the WebFOCUS components and retrieving data from a data source is comprised of the following: Query: The front end tool (Portal, IA, or App Studio) initiates the request and sends it to the WebFOCUS Client. The WebFOCUS Client passes the request to the correct WebFOCUS Reporting Server. The WebFOCUS Reporting Server checks the syntax of the procedure, resolves the values of all variables, and passes the request to the data adapter.

7 Query and Data Adapter Processing Sequence
The process of running a request through the WebFOCUS components and retrieving data from a data source is comprised of the following: Data Adapter: The data adapter translates the request into the native language of the data source. The data source processes the request. The data source returns the results to the WebFOCUS Reporting Server for further processing, such as formatting, and styling.

8 Query and Data Adapter Processing Sequence

9 Managing Data Adapters
There are two access points to manage Adapters in WebFOCUS: From the Web Console of the WebFOCUS Reporting Server From App Studio

10 Managing Data Adapters
Explore a data adapter, which has already been set up for you, using App Studio.

11 Managing Data Adapters
Test the connection.

12 Managing Data Adapters
Close the connection. You have confirmed the Data Adapter is in place for your data source. How does WebFOCUS know where to find the application resources?

13 Configuring the Application Path
WebFOCUS employs a search sequence technology used to locate the files required by the WebFOCUS Reporting Server for the application, such as, procedures, synonyms, and data files. This is known as the Application Namespace, or commonly referred to as the APP PATH. You can configure the Application Path for a Reporting Server while working in the WebFOCUS Environments area of App Studio, or through the Reporting Server Web Console.

14 Scenario: Create Synonyms for Single Tables
Paula Barreto , the HR manager, has left a frantic text message for Peter Connelly, the Network Administrator for Adventure Works. She needs to generate a current Employee Listing for her afternoon meeting, but it is not working. Instead of a report, she is getting an error message - FOC205.

15 Query Commands in the Command Console
WebFOCUS provides validation tools known as Query Commands, which can be used to display information about your metadata, data sources, language, environment, App Studio, and WebFOCUS. To use a query commands, type a question mark (?) command in a procedure or use the Command Console.

16 Query Commands in the Command Console
To view all the options for the Query command, type a question mark (?) and click Run.

17 Query Commands in the Command Console
Additional information is always available for WebFOCUS error messages. Type a question mark (?) followed by the error number.

18 Query Commands in the Command Console
You can display the Reporting Server's current application path from the Command Console.

19 Configure Application Path
Modify the current application path.

20 Configure Application Path
Add the application folders you need to the search path. me511 - a works-in-progress/development folder ibaw8_metadata - contains the base synonyms for the Adventure Works database.

21 Configure Application Path
WebFOCUS will search the folders in the sequential order designated in the Application Path list.

22 Configure Application Path
The contents of the WebFOCUS global profile, the edasprof.prf file, are revealed and show your changes.

23 Configure Application Path
Alternative Instead of one global application path for everyone, the application path can be customized to allow certain groups access to application folders based on their business needs. You can also control the Application Path for individual domains, and even procedures, in a WebFOCUS repository. For example, the sales domain would only allow access to synonyms related to Sales, not Human Resources.

24 Configure Application Path
Alternative

25 Configure Application Path
Have Paula retest her procedure.

26 Virtual Columns in a Synonym

27 Virtual Columns In addition to referencing fields stored in the data source, a Synonym may contain Virtual Fields, which can be calculated from the data, or assigned an absolute value. A virtual field takes up no storage space in the data source, and is created only when referenced in a report or chart. When you create a temporary field, you determine its value by writing an expression.

28 Virtual Columns You can combine fields, constants, and operators in an expression to produce a single value. Some common uses of virtual data fields include: Computing new numerical values that are not in the data. Computing a new string of alphanumeric characters from other strings. Classifying data values into ranges or groups. Invoking subroutines in calculations.

29 Virtual Columns A virtual field can be created:
In a Procedure. These virtual fields are available whenever the specific procedure is executed. The virtual fields in a procedure are cleared at the end of the reporting session or by a subsequent Join or Define component within the same procedure.

30 Virtual Columns A virtual field can be created:
In a Synonym. These virtual fields are available whenever the specific data source is used for reporting. A virtual column contained in a Synonym provides the user with the convenience of a column that incorporates a standard expression available for all users. These fields are not cleared by Join or Define components in a procedure.

31 Virtual Columns Advantages of having virtual fields in the synonym include: Virtual fields stored in a synonym are centralized in one location and available for all users. This arrangement facilitates maintenance; changes are made once and reflected globally. Synonym virtual fields enable standardization. Complex corporate calculations can be expressed correctly, without the possibility of errors introduced by local variations. There is no need to struggle with creating your own calculations.

32 Virtual Columns There are two types of virtual columns:
Detail (Define) Virtual Field - based on data source values. Evaluated as each row that meets the selection criteria is retrieved from the data source. These values are not stored in the data source, but can be calculated from the data in the database. Manually added as needed as columns in the Report canvas.

33 Virtual Columns There are two types of virtual columns:
Summary (Compute) Virtual Column - A calculated column based on WebFOCUS Answer Set values. Evaluated at the report level after all of the data that meets the selection criteria is retrieved, sorted, and aggregated at the WebFOCUS Answer Set level. Cannot be used as a primary sort field. Added automatically as a column in the Report canvas.

34 Virtual Columns

35 Virtual Columns Chose a Define when you want to:
Calculate the expression for each instance in the data source. Select data on individual data source rows. Each row from the data source will be evaluated (WHERE). Sort individual data source values (Sort Down) on temporary fields.

36 Virtual Columns Chose a Compute when you want to:
Calculate the expression for each WebFOCUS Answer Set row of aggregated data or columns that use prefix operators. Select on aggregated WebFOCUS Answer Set columns (WHERE TOTAL). Sort on aggregated WebFOCUS Answer Set columns (BY TOTAL). Evaluate the temporary field using fields from different paths in a hierarchical data structure. You cannot use a Define field, since it is evaluated before the relationship between data in the different paths is established.

37 Scenario: Define Fields in a Synonym
Paula Barreto , the HR manager, would like you to create an Employee Name column that combines the First Name and Last Name fields together.

38 Define Fields in a Synonym
You can write an expression that combines two or more alphanumeric constants and/or fields into a single character string. A concatenation operation has two options: | - Weak concatenation preserves trailing blank characters of the column or literal to the left of the concatenation symbol. || - Strong concatenation moves trailing blank characters to the end of the resulting string.

39 Define Fields in a Synonym
Associate the a new virtual field in a synonym with a specific segment.

40 Define Fields in a Synonym
The Define Calculator allows you to create and edit virtual define fields and complex expressions all in an intuitive point-and-click interface.

41 Define Fields in a Synonym
Create the expression: FIRST_NAME || ( ' ' | LAST_NAME)

42 Define Fields in a Synonym
Verify your new field with sample data.

43 Define Fields in a Synonym
The new field appears in the Synonym.

44 Scenario: Compute Fields in a Synonym
John Wood in Marketing has discovered a problem with a calculation in the Sales Order Summary Report. While the calculation of the Tax and Freight % column in the detail version of the report is correct, the same column is calculated incorrectly in the summary version of the report.

45 Scenario: Compute Fields in a Synonym
John Wood in Marketing has discovered a problem with a calculation in the Sales Order Summary Report.

46 Compute Fields in a Synonym
The Synonym contains two Defined fields: TAX_AND_FREIGHT (Tax and Freight) TF_PCT (Tax and Freight Percent)

47 Compute Fields in a Synonym
Since TF_PCT is a Defined field, WebFOCUS creates a value for each data source instance, and aggregates them at the sort level for the summary report.

48 Compute Fields in a Synonym
Create a Compute in the synonym to calculate the tax and freight percentage column.

49 Compute Fields in a Synonym
Create the expression for TFC_PCT:

50 Compute Fields in a Synonym
WebFOCUS produces a report with the correct tax and freight percent.

51 SQL Subquery WebFOCUS allows you to generate an SQL Subquery in a synonym for optimizing your requests. Instead of creating a HOLD file for selection, you can let the RDBMS handle the processing and handling of the data in a subquery and avoid multiple passes of the data. There are two kinds: Standalone subqueries, that can exist on their own. Correlated subqueries that reference a field in the main query.

52 Scenario: SQL Subquery in a Synonym
Paula would like you to provide an additional standard column for her payroll-related reports. The new calculation would include a company average salary.

53 SQL Subquery in a Synonym
In the Synonym, insert the Subquery:

54 SQL Subquery in a Synonym
Change the properties:

55 SQL Subquery in a Synonym
Change the properties:

56 SQL Subquery in a Synonym
Check your work with sample data:

57 SQL Subquery in a Synonym
Paula's report displays employees whose current salary is less than the average salary for their department with one pass of the data. The company average is displayed in the page heading for reference.

58 Enhancing Date Formats
Using a date format allows you to: Define date components such as year, quarter, month, and day of the week, and extract them easily from the original date fields. Sort reports in date sequence, regardless of how the date is displayed. Execute arithmetic operations with dates and compare dates without using special functions. Refer to dates in a natural way, such as FEB , without regard to display or editing formats.

59 Scenario: Date Components in a Synonym
John Wood in Marketing would like to have the components of the Date Shipped field readily available for his group of analysts. You will create these fields in the Synonym so that they are available for use by all Marketing employees, such as for a Northeast Sales Order Chart for each year.

60 Scenario: Date Components in a Synonym
John Wood in Marketing would like to have the components of the Date Shipped field readily available for his group of analysts.

61 Date Components in a Synonym
Use the Decompose Date Function available in the Metadata canvas.

62 Date Components in a Synonym
You only require the Year and Quarter components.

63 Date Components in a Synonym
For SHIPDATE_MONTH, use the DTPART simplified Date Function to extract the Month component from the Ship Date.

64 Date Components in a Synonym
The DTPART function format (MT) will be used to display the month of each date as a three letter abbreviation in upper case, such as JAN or FEB.

65 Date Components in a Synonym
The SHIPDATE_MONTH virtual column is added to the synonym.

66 Date Components in a Synonym
Run an existing procedure to validate your work.

67 Synonym Views

68 Join Relationships in a Cluster Master
When creating a cluster master, it is important to understand the relationships between the tables and their potential effects on reporting. WebFOCUS determines paths by the number of tables joined to a parent and how they are joined: One-to-one: Occurs when a parent row in one table will reference only one child row in another table.

69 Join Relationships in a Cluster Master
WebFOCUS determines paths by the number of tables joined to a parent and how they are joined: One-to-Many: Occurs when a parent row in one table can potentially reference several child rows in another table.

70 Join Relationships in a Cluster Master
A Single Path Structure If the parent to child relationship is one-to-one and the structure is defined this way, the child table is effectively an extension of the parent. Subsequent tables joined to the parent are then related and can be used on the same path. All fields in the path are related and can be used in a single request.

71 Join Relationships in a Cluster Master
A Multi-Path Structure When there are two child tables joined to a parent with a one-to-many relationship, WebFOCUS sees this as two distinct paths for processing data.

72 Scenario: Join Relationships in a Cluster Master
Brian Welcker, the VP of Sales, needs a revenue and freight summary report aggregated by a number of dimensions. The report will be filtered to show only U.S. customers and total orders under $500. To complete the synonym, the country and state names for the vendor need to be added to the existing cluster view.

73 Join Relationships in a Cluster Master
The Purchase Order Summary table is the fact table with the data to be measured. However, it is missing specific attributes for the vendor, such as employee, country, or state. With these additional tables joined in the view, it will provide the necessary dimensions to allow the PO summary data to be aggregated in a meaningful way.

74 Join Relationships in a Cluster Master
Add the required tables for Country/Region and State/Province.

75 Join Relationships in a Cluster Master
The required tables have been added in a one-to-many relationship.

76 Join Relationships in a Cluster Master
The effect of the joins can be verified with a report.

77 Join Relationships in a Cluster Master
Since the parent segment (Vendor) contains two or more segments joined with one-to-many relationships, WebFOCUS views the structure as having completely separate data paths.

78 Join Relationships in a Cluster Master
The solution is to adjust the join to a one-to-one relationship and allow WebFOCUS to view the data as a single path. The Country/Region and State/Province tables return a single value for each respective code in the Vendor table. There is only one occurrence of name per code in the Vendor table.

79 Join Relationships in a Cluster Master
Change the join relationship for the two tables through the properties.

80 Join Relationships in a Cluster Master
The joins have been changed and the report runs correctly.

81 Group Fields Logically with Dimension Views
When you generate a synonym, the list of fields is arranged in the physical order of the referenced table. This can be time consuming for business users who need to navigate through a long list of fields when creating their reports.

82 Group Fields Logically with Dimension Views
Instead of displaying the fields in physical order, WebFOCUS allows you to create a Dimension View of an original synonym. The alternative view can be re-organized and grouped into a more logical, hierarchical structure using the natural dimensions and measures that exist within the data.

83 Group Fields Logically with Dimension Views
Most of the fields in a data source can be organized into groups of dimensions or measures.

84 Group Fields Logically with Dimension Views
Most of the fields in a data source can be organized into groups of dimensions or measures. Dimensions are values that categorize measures in order to enable users to answer business questions. Examples of commonly used dimensions are people, products, place and time. Measures are values that can be used in calculations.

85 Group Fields Logically with Dimension Views
Dimensions can be categorized into Level hierarchies. A level hierarchy is considered a structure hierarchy. The members of the hierarchy contain one or more types of values. For example, consider a product category, subcategory and product. Each subsequent level provides additional detail about the prior level. Each level is a completely different value. Measures are values that can be used in calculations.

86 Group Fields Logically with Dimension Views
Dimensions can be categorized into Level hierarchies.

87 Scenario: Dimension Views
Brian Welcker’s analysts find it difficult scrolling through the list of field names displayed in the data source's physical order. They would like a Dimension View of the data that will allow the fields to be grouped logically. With this new view, the sales analysts will better understand the fields displayed in the reporting tools.

88 Dimension Views Activate the Dimension View in the synonym.

89 Dimension Views Create a new Measure Group.

90 Dimension Views Drag-and-drop the measures into the Sales Measures group.

91 Dimension Views Create a new Date Dimension Hierarchy.

92 Dimension Views Drag-and-drop the dates into the Sell Start Date hierarchy.

93 Dimension Views Following a similar process, create a Product Hierarchy.

94 Dimension Views In the Report canvas, the Object Inspector shows the structure of the fields available from the specified data source. The grouping of measures and dimensions, as you created them in the dimension view, are now available to use for reporting.

95 Dimension Views You can now switch between views that you prefer for development.

96 Metadata and Variables

97 Dynamic Metadata When your application accesses a data source, WebFOCUS uses the metadata to interpret the data that it finds. Instead of providing static values, metadata attributes can be represented as variables to allow for dynamic metadata. This strategy can dramatically reduce application administration and maintenance. For example, multiple master files may be reduced to one dynamic version. Instead of generating multiple, individual reports, the logic can be built directly into metadata variables.

98 Dynamic Metadata While both local and global variables may be used in WebFOCUS procedures, the variables contained in metadata must be WebFOCUS global variables. A global variable is identified by a double ampersand (&&) followed by the variable name, such as &&REGION. WebFOCUS evaluates the variables when it accesses the metadata. Any values supplied are passed to the variable and used as the respective attribute's value. System variables, such as &DATE, may also be used in metadata.

99 Scenario: Dynamic Metadata
Jean Trenary, the Information Services manager, has created three region-specific flat files of sales data for Europe, North America, and the Pacific regions. Instead of maintaining three separate sets of metadata to manage each identically-structured dataset, she would like to use a single Master File for all three files.

100 Dynamic Metadata The attribute in a Master File to manage the dataset and location is controlled by a property that can be set dynamically using a variable.

101 Dynamic Metadata Declare the Global Variable, &&RSALES.

102 Dynamic Metadata Add the properties for the Global Variable, &&RSALES.

103 Dynamic Metadata For the DATASET attribute value, change the static Pacific file name text to the declared variable name, &&RSALES.

104 Dynamic Metadata Test your work. The Launch page allows the user to select from a list of acceptable values.

105 Master File Profile

106 Master File Profile WebFOCUS provides different ways for customers to customize their reporting applications for their particular needs. One popular technique is the use of profiles, which can be used for providing application settings, environmental settings, search paths, and DBMS connection information. A developer can create a profile for a Master File.

107 Master File Profile Typical operations for a Master File Profile include: Set the values of global variables defined in the Master File for use in Master and/or Access File Descriptions. Create a lookup file for Master File DEFINE commands or DBA (user security for the file) attributes. Create a DBAFILE, which can be derived from an external data source and used to restrict access during execution of a request that references the Master File.

108 Master File Profile When you execute a procedure, the following process takes place: WebFOCUS locates and reads the source code from the Master File. WebFOCUS executes the Master File's MFD Profile, then parses the Master File for correct syntax. WebFOCUS re-parses the Master File, if needed. WebFOCUS continues processing.

109 Master File Profile When you execute a procedure, the following process takes place:

110 Master File Profile The MFD Profile is executed each time the following FILE commands are issued: TABLE, TABLEF, GRAPH, or MATCH CREATE, DEFINE, or CHECK ?F, or ?FF Multiple MFD Profiles may be executed for a JOIN, MATCH or a MORE command. If multiple MFD_PROFILEs set values for the same global variables, the resulting variable values will depend on the order in which the profile procedures run.

111 Master File Profile The MFD Profile is not executed for the following:
MODIFY, MAINTAIN, or -READFILE commands When selecting segments or fields from the WebFOCUS tools The MFD_PROFILE procedure must not issue a request against its calling Master File.

112 Scenario: Master File Profile
Paula Barreto, in the Human Resources department, would like you to enable department managers to view the payroll information for their own employees. The information should be restricted so that managers should only see the employees that report directly to them. You have decided to use a MFD Profile for this solution.

113 MFD Profile The function of the MFD Profile, who_am_i.fex, is to translate the value of the current WebFOCUS sign in ID to the Adventure Works Employee ID. The procedure will set a value for the global variable, &&EMPLOYEE_ID, which is used in the synonym.

114 MFD Profile Add the MFD Profile to the Synonym.

115 MFD Profile Add the MFD Profile to the Synonym.

116 MFD Profile WebFOCUS produces the employee list based on their manager.

117 Metadata Filters

118 Metadata Filters Metadata filters are pre-defined criteria that reside in the metadata for a data source. They are comprised of boolean expressions that evaluate to TRUE or FALSE. Users may choose to apply the filters as needed to limit the data in a report or chart, and are insulated from having to know the complex data specifics to write their own selection criteria.

119 Metadata Filters Metadata filters have the following characteristics:
Allow you to organize and store popular selection criteria in the metadata. Can be reused in multiple requests and tools. They are not supported in WHERE TOTAL tests.

120 Scenario: Metadata Filters
John Wood in Marketing needs your help again. He needs an easy way for his analysts to distinguish between North American and Overseas sales in the Regional Sales Report. You have decided to create two filters in the synonym.

121 Metadata Filters Add the Master File Filter for North America to the Synonym.

122 Metadata Filters Add the Master File Filter for North America to the Synonym.

123 Metadata Filters Follow a similar process to add the Master File Filter for Overseas to the Synonym.

124 Metadata Filters Test your work in a procedure for North America.

125 Metadata Filters Test your work in a procedure for North America.

126 Metadata Filters Test your work in a procedure for Overseas.

127 Metadata Filters Test your work in a procedure for Overseas.

128 What’s Next?

129 What’s Next? If You Are Going to Be: Then You Should Take:
A developer who needs to create, edit and enhance the metadata for a WebFOCUS application. This course will give you the firm foundation to build upon for more advanced courses in metadata, reporting and application development. Metadata Essentials – Part 1 (Self Study) A developer who needs to improve your application functionality and user experience by taking advantage of the powerful features and abilities available for metadata. Using App Studio, this class will explore additional metadata concepts and techniques to energize your WebFOCUS applications. Metadata Essentials – Part 2

130 Contact Us – Customer Education
Our Curriculum includes: Instructor-Led Online Training Online Movie Library Instructor-Led Seminar eGuide Subscription Self-Paced Training

131 Please Contact Us Call 1-800-969-INFO
Visit us on the Web at \education

132 Presentation: Review Accessing Data Creating Virtual Columns
Creating Synonym Views Building Dynamic Metadata The Master File Profile Creating Synonym Filters

133 Socialize to Win! Daily Prizes Awarded!
Tweet and tag #IBSummit during the event! in your #IBSummit pics! Check our Summit Facebook & LinkedIn pages for updates, photos, and announcements


Download ppt "Quick Start: More Metadata"

Similar presentations


Ads by Google