Download presentation
Presentation is loading. Please wait.
1
Dealing with External Data
William Poppe Curriculum Developer
2
Objectives Report from an Excel file by using the Adapter for Excel (via direct retrieval) Select records by using an External File that contains a literal list of values Use the Upload Data utility to load a comma-delimited file into a table in SQL Server
3
The Direct Excel Adapter
4
The Direct Excel Adapter
Prior to ODBC Connection As of Adapter for Excel (via direct retrieval)
5
A Management Request MetroCycles is implementing a reporting application for its corporate employees located in several departments such as Human Resources and Sales. The field offices send their sales data to headquarters in the form of Excel workbooks . The Corporate Business Analysts need to analyze data sent from the field offices using WebFOCUS.
6
Management Request
7
Task Plan To accomplish this task, you will act as a Developer and perform the following steps: Use the WebFOCUS Direct Excel Data Adapter to create a synonym for an Excel file. Use the Synonym Editor to change the attributes for several columns. Use App Studio to create a report from the Excel file. Use the HTML Canvas to create a launch page for the report. Test your work.
8
The Excel File You will be uploading an existing Excel file (prodsale.xlsx), which is contained in the metro folder.
9
WebFOCUS Requirements
There are two requirements for WebFOCUS to read a data source. A data adapter must be configured to access a data source by providing a connection to the target data. Data adapters manage the communication between the WebFOCUS Reporting Server and the data source. Metadata must be created for the data source. Metadata are the different items that helps the WebFOCUS Server understand the characteristics of the data source you want to use for discovery, such as the data type, where it is located, the data contents, and how to connect to it The metadata, also known as a synonym, also provides support for extended metadata features such as virtual fields and additional security mechanisms.
10
In App Studio Open App Studio Access the Reporting Server Console
11
The Reporting Server Console
The WebFOCUS Reporting Server: Manages data access, processing of business logic, and generation of fully styled output. Has access to report procedures, WebFOCUS StyleSheets, and metadata (data source descriptions).
12
The Direct Excel Adapter
Access the Adapters.
13
The Direct Excel Adapter
The Adapter for Excel (via direct retrieval) supports direct retrieval from Excel files (.xls and .xlsx files). The Adapter for Excel is available as a named adapter on the Web Console in the Sequential and Indexed folder.
14
Create a Synonym
15
Creating a Synonym Create the Synonym
16
Identify the Excel file
Browse to select the Excel file.
17
Identify the Excel file
Locate the Excel file in the metro app.
18
Create the Synonym Click Next.
19
Create the Synonym Select Synonym candidates for Excel opens.
20
Create the Synonym Change the name of the Default Synonym Name from Sheet1_PRODSALES to PRODSALES.
21
Create the Synonym The Synonym has been created successfully.
Close the Reporting Server.
22
The Synonym The synonym contains a Master File (.mas) and an Access File (.acx).
23
A Synonym A synonym is comprised of two files:
Master File – contains the structure of the data source, the names, data types and attributes of the fields. Access File – contains additional information that completes the description of the data source for the application, such as the full name and location of the data source.
24
The Master File The Master File contains the following:
A SUFFIX=DIREXCEL, the suffix used by default when uploading Excel files. The DATASET file attribute points to the location of the uploaded Excel file, which in this case is DATASET= metro/prodsale.xlsx.
25
Create a Synonym Check your work.
26
The Synonym Editor The default properties of a column can be centralized and included in a synonym. These include: Column headings Display formats Open the Synonym Editor.
27
The Synonym Editor The Synonym Editor
28
The TITLE Attribute You can create a custom column heading through the TITLE attribute. The text of the TITLE can be up to 64 characters in length, mixed case, and stacked up to five lines. The column heading described in a TITLE can be overridden in a report request.
29
The TITLE Attribute In a similar way, change the default column heading for the PROD_SUBCAT column.
30
The USAGE and ACTUAL Attributes
It is possible to change how a column displays in a report (USAGE attribute) without affecting how it is stored (ACTUAL attribute). USAGE - Defines the type of data and the number of characters that the field can contain, and how to display the field in reports or in calculations. ACTUAL - Describes the type and length of the field as it is actually stored in the original data source.
31
Add a Comma to QUANTITY Add a comma to the QUANTITY column display properties.
32
Change a Column Display
Change how the UNIT_PRICE column displays. Remove the two decimal places.
33
Change a Column Display
Change how the UNIT_PRICE column displays. Remove the two decimal places. Add a currency symbol (a dollar sign - $).
34
Change a Column Display
Do the same for the LINE_PRICE column. Remove the two decimal places. Add a currency symbol (a dollar sign - $).
35
Save your Work Save and close the Synonym.
36
Check the Synonym Verify your Changes.
37
Produce a Report
38
Produce a Report Open a procedure.
39
Add a Sub-Total Add a Sub-Total for the Order Year column.
40
Add a StyleSheet Add a WebFOCUS StyleSheet to the report.
41
Add a Variable Instead of using hard-coded values in a procedure, WebFOCUS allows the value of a variable to be supplied dynamically at run time. Add a variable for Order Year.
42
Add a Variable The Expression Builder.
43
Add a Variable The Variable Editor opens:
WHERE PRODSALES.PRODSALES.ORDER_YEAR EQ &ORDER_YEAR.(OR(FIND PRODSALES.PRODSALES.ORDER_YEAR IN PRODSALES)).Please select a Year.;
44
Run the Procedure WebFOCUS generates a launch page through the Auto Prompt facility.
45
Close the Procedure
46
Create a Launch Page
47
Create a Launch Page The App Studio HTML Canvas allows you to create launch pages for your procedures. To save time, a starting template has been created for you.
48
Create a Launch Page The template opens.
49
Create a Launch Page Insert a New Report.
50
Create a Launch Page Add a Reference to an existing procedure.
51
Create a Launch Page Select the procedure.
52
Create a Launch Page Customize the configuration of the controls.
53
Create a Launch Page Reposition the objects.
54
Create a Launch Page Run the Launch Page.
55
Create a Launch Page Save your Work.
56
Selection with an External File
57
Selection with an External File
WebFOCUS allows the values to be referenced that are stored in an external file. This method allows records to be selected based on equality (or inequality) tests on values stored in the file. When using this technique, an FILEDEF command is required to point WebFOCUS to the physical location of the external file. BIKELIST.dat Product_Bike_List_Report.fex
58
Selection with an External File
The advantages of using this technique are the following: Maintaining the external file is easy. Any text editor, like Notepad can be used to add, change, or delete instances in the file. Consistency is assured since the centrally located file may be referenced by one or multiple procedures. The external file may be generated dynamically by a procedure and stored in a HOLD or SAVE file in simple character (ALPHA) format.
59
A Management Request MetroCycles is implementing a reporting application for its corporate employees located in several departments such as Human Resources and Sales. The Inventory Manager needs a current price list for certain Bicycle products. However, she is supplying us with a list in the form of a flat file (BIKELIST.dat). Is there a way to accomplish this task?
60
Selection with an External File
The rules for this method are the following: Each value must be on a separate line. The first value must start in column one. The values are assumed to be in character format. The literal list is restricted to 32,767 values. Since there is only one value per line, 32,767 lines.
61
Selection with an External File
Open the product_bike_list_report.fex.
62
The FILEDEF Command The FILEDEF (file definition) command assigns a logical name to a physical file name and specifies file attributes. You can explicitly define an individual file and its location to WebFOCUS using the FILEDEF command. A FILEDEF command can be issued in a procedure and remain in effect for the duration of a single request.
63
The FILEDEF Command Source Code Syntax Examples:
FILEDEF filename DISK location Examples: FILEDEF MYFILE DISK BASEAPP/MYFILE.FTM FILEDEF MYFILE DISK C:\IBI\APPS\BASEAPP\MYFILE.FTM
64
The Allocation Wizard Use the Allocation Wizard:
65
The Allocation Wizard Use the Allocation Wizard to create the FILEDEF:
FILEDEF BIKELIST DISK metro/BIKELIST.dat
66
The Selection Statement
Next, add the selection statement for the file: WHERE AWV_PRODUCT.AWV_PRODUCT.PRODUCT_NUMBER IN FILE BIKELIST;
67
The Selection Statement
Use the Expression Builder Sample Source Code: WHERE [NOT] fieldname IN FILE filename; or – IF fieldname [EQ or NE] (filename)
68
The Selection Statement
Run the procedure.
69
The Selection Statement
Save and close your Work.
70
Uploading Data with ETL
71
Uploading Data with ETL
Extract, Transform and Load You can upload (import) external data files for use in WebFOCUS. This functionality enables you to easily create a WebFOCUS file description and data file for use in your reporting application. The option is available in the Web Console of the Reporting Server, with appropriate user permissions.
72
Uploading Data with ETL
When the following types of files are uploaded, a synonym is created for each as part of the upload process: Delimited flat files. Among the file types you can upload are: txt, csv, ftm, dat, and tmp. The Upload Data facility supports a wide range of delimiters and enclosure options. Excel Workbooks. You can upload and create synonyms for multiple worksheets. The Upload Data facility supports Named Ranges in Excel® worksheets. XML files - for Extensible Markup Language files. JSON files - For JavaScript Object Notation files.
73
A Management Request MetroCycles is implementing a reporting application for its corporate employees located in several departments such as Human Resources and Sales. The Product Manager would like us to load the updated price for each product into the RDBMS. However, the format of the data is a comma-delimited file. Is there a way to accomplish this task?
74
The Comma-Delimited File
The new price information is contained in a comma-delimited file (NLPRICE.csv).
75
The Comma-Delimited File
Test the existing comma-delimited file (NLPRICE.csv).
76
Upload Data Start the Upload Data process
77
Upload Data Select the file.
78
Upload Data Start the process.
79
Upload Data Change the Parameters and Run.
80
Upload Data The file has been loaded successfully.
81
Upload Data WebFOCUS has converted the comma-delimited file into an SQL table equipped with its own a Master File (nlprice_t).
82
Upload Data The data has been added to SQL Server as a table.
83
Upload Data The Master File for the SQL table - nlprice_t displays in the metro application.
84
Upload Data Check your Work.
85
Upload Data Return to App Studio.
86
What’s Next? If You Are Going to Be: Then You Should Take:
An administrator or developer, who wants to build data marts, data warehouses, and operational data stores. This course enables you to extract and stage disparate data types, across multiple platforms, while applying business rules to transform and cleanse data to load data warehouses. Data Migrator Essentials An administrator, developer or application programmer who wants to learn how to interpret the data used in an application. This self-study course enables you to create, manage and enhance a WebFOCUS metadata (Master File and Access File), key components in a WebFOCUS application. Metadata Essentials using App Studio – Part 1 (Self-study)
87
Contact Us – Customer Education
Our Curriculum includes: Instructor-Led Online Training Online Movie Library Instructor-Led Seminar eGuide Subscription Self-Paced Training
88
Please Contact Us Call 1-800-969-INFO
Visit us on the Web at \education
89
Presentation: Review Report from an Excel file by using the Adapter for Excel (via direct retrieval) Select records by using an External File that contains a literal list of values Use the Upload Data utility to load a comma-delimited file into a table in SQL Server
90
Dealing with External Data
Thanks for Attending!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.