Download - QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Transcript
Page 1: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QlikView Visual Script Generator Help

QlikView Visual Script Generator Help

Page 2: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Table of Contents

1. Welcome to QlikView Visual Script Generator 1-2

2. Tutorials 3

3. Projects Basics 4

3.1. Working with Projects 4

4. Visual Schema Design 5

4.1. Project Toolbars 5-6

4.2. Database Connection 6-9

4.3. Database Mapping 9-11

4.4. Mappings Library 11-13

4.5. Mapping Relations 13-15

5. Mappings 16

5.1. Working with Mappings 16-17

5.2. Edit a Mapping 17-18

5.3. Mapping Columns 18-19

5.4. Mapping Script 19-20

5.5. Test a Mapping 20-22

5.6. Generate QVD Files 22-23

6. Processes 24

6.1. Working with Processes 24

6.2. Edit a Process 24-26

6.3. Process Columns 26-27

6.4. Expression Editor 27-28

6.5. Process Script 28-29

7. SQL Editor 30

7.1. Edit SQL 30-31

8. Mapping Library 32

8.1. Mappings Library 32-34

8.2. Excel Mapping 34-35

8.3. Inline Data Mapping 35-36

8.4. QlikView Script Mapping 36-39

QlikView Visual Script Generator Help

Page 3: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

8.5. Resident_Mapping 39-42

9. Generate QlikView Scripts 43

9.1. Working With QlikView Scripts 43-44

9.2. QlikView Scripts Options 44-45

9.3. QsGen Files Locations 45-46

9.4. Edit QlikView Scripts 46-48

10. Preferences 49

10.1. Preferences 49

11. Glossary 50

12. Licensing 51-52

13. Product Support 53

QlikView Visual Script Generator Help

Page 4: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QlikView Visual Script Generator is a tool that will allow you to generate QlikView scripts by designing a Visual Mapping Schema. With QlikView Visual Script Generator VbScript or JavaScript have been replaced by Visual Database Schema Drawing. Just drag and drop your Database Tables, Excel Sheets or Mapping Library items to the drawing surface, trace the missing relations between mappings, and generate the QlikView Script.

QlikView Visual Script Generator will centralize your metadata in a visual project that you will only need to design one time. Later select parts of the schema to automatically generate QlikView scripts. QVD files generation is automatic, database connections and variables can be stored in external files, and even all generated code can be just included with a single line of code in existing QlikView applications.

Getting Started

First you will need to create a new Project that will be a container for your database schema.

A Project contains one or more mappings. A Mapping in a set of processes describing how to generate a QlikView table

A Mapping can be any kind of

Database Mapping (Section 4.3)

Excel Mapping (Section 8.2)

Resident_Mapping (Section 8.5)

Inline Data Mapping (Section 8.3)

QlikView Script Mapping (Section 8.4)

1  Welcome to QlikView Visual Script Generator

QlikView Visual Script Generator Help 1

Page 5: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

and in the future many others Mappings

QlikView Visual Script Generator already cover 80-90% of the daily usage Mappings, and will be enhanced in the next future with new Mappings AddIns.

Thus the powerful QlikView Script Mapping (Section 8.4) offer the possibility to code a complex mapping inside QlikView and integrate it in QsGen like any other mapping.

Working with projects (Section 3.1)

QlikView Visual Script Generator Help 2

Page 6: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

2  Tutorials

QlikView Visual Script Generator Help 3

Page 7: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

3  Projects Basics

3.1  Working with Projects

Create a new project

Open an Existing Project

Close the current Project

Save the project under another name

Select a recently opened Project

QlikView Visual Script Generator Help 4

Page 8: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Main ToolBar

Project

Save : save the project (Section 3.1) under it's original name

New Project : create a new Project

Save As : save the project under a new name

Close Project : close the active project

Open Project : open an existing Project

Mappings

Edit Mapping : edit selected mapping (Section 5.2).

Edit 1st Process : edit the 1st process (Section 6.2) of the selected mapping

Connections

Edit Connections : edit the projects connections (Section 4.2)

Tools

Connector : select this button in order to draw relations (Section 4.5) between 2 mappings

Select : default SELECTION cursor.

Pan : to move the drawing

Drawing

Refresh drawing : redraw the schema according to saved data.

Layout Drawing : automatic layout your drawing but don't save the shapes positions.

4  Visual Schema Design

4.1  Project Toolbars

You can only open one project at a time, if you want to open a second one please launch another session of QsGen

the shapes position are not saved while you don't move manually the shape to it's new position.

QlikView Visual Script Generator Help 5

Page 9: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Open the QlikView Script generator. (Section 9.1)

Project ToolBar

Zoom controls

Before to add any "Database Table" or database related "Mapping Library" you have to define a Database Connection. You can add OLEDB Connections, Excel File Connection.

Remark : ODBC Connections have been intentionally omitted if you need them just send an email to [email protected] we will plan it in enhancement list

Press the button

You can use the + & - buttons only in normal modeIt happens that some mappings are outside of the drawing surface. To put them back on the drawing press the "Layout Drawing" button and move each shape in order to save its position.

4.2  Database Connection

QlikView Visual Script Generator Help 6

Page 10: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Note: You can edit a connection String pressing the "..." button in the "Connection String" field.

Fields:

Type : define the connection type

Name : connection name

Connection string : the ADO .NET connection string to connect to the database

Catalog : you can limit the results the database browser retrieve by entering the Catalog (Ex: dbo for SQLServer)

Schema : you can limit the results the database browser retrieve by entering the Schema name (Ex: MASTER for Oracle)

SQL Syntax : Enter the database syntax (Excel, SQLServer, Oracle...)

Folder Path : for excel and files the filename entered automatically by the connection wizard.

New OLEDB Connection,

Use the standard windows OLEDB Dialog will help you to specify the connection. If the OLEDB connection does not appears in the list it's possible that you have to install an OLEDB Driver from your database provider.

QlikView Visual Script Generator Help 7

Page 11: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

New Excel Connection

An excel connection is in fact an Excel Document. This Excel document or WorkBook will act as a database as it can contain many sheets that will be considerated by QsGen as database tables

QlikView Visual Script Generator Help 8

Page 12: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

The Database Mapping needs a connection (Section 4.2). Once defined selecting your connection in the main windows will displays a Database Browser in the right like this:

4.3  Database Mapping

QlikView Visual Script Generator Help 9

Page 13: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QlikView Visual Script Generator Help 10

Page 14: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

To add a Database Table Mapping simply drag a Table or a View from the "Connection Objects".

You can also Drop a OleDb Mapping from the "Mapping Library", you will then be guided by a wizard.

In order to link the tables see Mapping Relations (Section 4.5)

To display table Catalog and Schema see Preferences (Section 10.1)

4.4  Mappings Library

QlikView Visual Script Generator Help 11

Page 15: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

From the "Mapping Library" you can drag and drop any shape to the drawing surface. After a wizard will prompt you for Mapping details.

Here the list of current Library plugins, the list will be enhanced in the close future

Excel Mapping (Section 8.2)

QlikView Visual Script Generator Help 12

Page 16: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Inline Data Mapping (Section 8.3)

QlikView Script Mapping (Section 8.4)

Resident_Mapping (Section 8.5)

Relations RulesQlikView Visual Script Generator will generates relations between Mappings by homonymy like QlikView. It will link columns with the same name together.

Delete an Unnecessary RelationExample: The relation between "Order Details" and "Products" is not neccessary.

Select it and press <Delete>, it will disappear.

What happened: right click on the "Order Details" mapping and select Edit Mapping, you will see that the Column "UnitPrice" have now "Use for Relations" field unchecked. It means that this field will never been used for relations in QlikView generated scripts.

Not if you want to recover the column for relations check "Use for Relations" for all Mappings that contains this column, or Add a new relation between the 2 columns

4.5  Mapping Relations

QlikView Visual Script Generator Help 13

Page 17: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Add a new RelationTo Add a new relation between 2 tables first select the " Connector" cursor from the Menu, then link the two tables

Ensure to point the middle of the shape to get the red square then click on the start / end columns of the relation.

If the two columns do not have the same name a windows will appear. It is neccessary for QlikView to have the same column name in the both side of the relation.

You can choose between a new name and left or right column name.

QlikView Visual Script Generator Help 14

Page 18: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

NOTE: In one Mapping of the relation is a special mapping like "QlikView Code Mapping" the columns of the mapping can't be renamed by QsGen. In this case you have to open the mapping's processes and rename the output processes columns by hand.

Multiple RelationsIn a Relation Column appears more that 2 times in a Drawing the Mappings are linked together by a "Relation End"

NOTE you can also draw a relation between a Mapping and a "Relation End"

QlikView Visual Script Generator Help 15

Page 19: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

DefinitionA Mapping is a set of Processes (Section 6.1) resulting to ONE QlikView Table and one or more resulting Columns.

Add a new Mapping

To add a mapping to the drawing drag & drop it from the "Connection Tables" or "Mapping Library". It will create a simple mapping containing just one process of the type you have chosen.

Edit a Mapping

Select the Arrow tool in the toolbars

Select the Shape in the Drawing or in the Mapping Selector right click and press <Edit Mapping>

An example here where we combine 3 different process in an union.

5  Mappings

5.1  Working with Mappings

QlikView Visual Script Generator Help 16

Page 20: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

All terminal processes must have the same set of columns, and will be combined together with unions.

Add / Edit an Existing Process

Select the process and right click on it

Edit Process (Form) : open the edit process form

Edit Process (Wizard) : open the edit process wizard

Delete Process: delete the current process

Add Process: create a new child process below the selected one

Add a new branch

To add a new union branch right click on the BEGIN shape you will see a contextual menu

Schema Tab

5.2  Edit a Mapping

QlikView Visual Script Generator Help 17

Page 21: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Fields

QlikView Table Name: Name of the table that will be generated in QlikView. Each mapping will generate ONE table

Mapping Type: Type of the mapping, defined during the creation (Read Only)

Generates QVD: If true, the resulting mapping table will be saved to a QVD File (glossary.html)

QVD File Name: Name of the QVD File

Test in QlikView:Press this button to test the generated script in QlikView

for more details on QVD files generation see Generate QVD Files (Section 5.6)

Columns Tab

5.3  Mapping Columns

QlikView Visual Script Generator Help 18

Page 22: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Alias : You can use this field to manually rename a column in order to link it to another mapping.Use for Relations : if two columns of two or more mappings have the same name by default QlikView will link them together. To avoid this check this option the column will be prefixed by the table name (Qualified).

QlikView Script Tab

5.4  Mapping Script

QlikView Visual Script Generator Help 19

Page 23: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

You can consult here the QlikView Script as it will be generated in QlikView.Test a Mapping (Section 5.5) : press the "Test in QlikView" button to test your script.

Once your mapping designed you can test it in QlikView.

Simply press the "Test in QlikView" button.

The following form will appear:

5.5  Test a Mapping

QlikView Visual Script Generator Help 20

Page 24: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QsGen will launch QlikView, generates the script, run it and will create a default Table Box containing your script result.

Options:

Show QlikView Script: once generated the script will be displayed

Show Data: once generated the Table Box will be displayed

Limit To: limit data to x rows

Temp Filename : the filename for the test .qvw application

If you choose "Show Data" QsGen will create a default TableBox including all the output columns

If you choose "Show QlikView Script" QsGen will open QlikView in Edit Script mode. QsGen will add a "QsGen" tab to the original QlikView script containing the Mapping generated script.

QlikView Visual Script Generator Help 21

Page 25: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

You can choose to generate a QVD file qvd.

In that case qsgen is going to generate an application which will produce a QVD file and to transform the direct load into load from this file.

QVD files can be used for many purposes. At least four major uses can be easily identified. More than one may apply in any given situation:

Increasing load speed.

By buffering non-changing or slowly changing blocks of input data in QVD files, script execution becomes considerably faster for large data sets.

Decreasing load on database servers.

The amount of data fetched from external data sources can also be greatly reduced. This reduces work load on external databases and network traffic. Furthermore, when several QlikView scripts share the same data it is only necessary to load it once from the source database. The other applications can make use of the same data via a QVD file.

Consolidating data from multiple QlikView applications.

With the binary (Binary.htm) script statement you are limited to loading data from a single QlikView application into another one, but with QVD files a QlikView script can combine data from any number of QlikView applications. This opens up possibilities e.g. for applications consolidating similar data from different business units etc.

Incremental load.

In many common cases the QVD functionality can be used for facilitating incremental load, i.e. exclusively loading new records from a growing database.

QVD Files usageIn the Script Generator form you can choose to generate QVD Applications in this way:

Generate QVD Applications : for every mapping having the "Generate QVD" flag activated, QsGen will generate a "Load QVD" application (.qvw) having the same name as "QVD File Name" field of the mapping.

Include Load QVD : for every mapping having the "Generate QVD" flag activated, insert a "LOAD FROM QVD" in the main script.

5.6  Generate QVD Files

QlikView Visual Script Generator Help 22

Page 26: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Remark : in the future versions we will add an incremental load feature, and a conditional load clause to restrict the QVD load fields and rows.

QlikView Visual Script Generator Help 23

Page 27: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

DefinitionA Processes can be

1. a data feed process that retrieve external data like Excel, Database, Inline, QlikView processes (LOAD, SELECT FROM or INLINE)

2. a non data feed process that retrieve it's data from another process (LOAD)

Each Process result to ONE QlikView Table and one or more Columns.

Edit a ProcessIn the Mappings Editor Select the Shape in the right click and press

<Edit Process (Form)>

or

<Edit Process (Wizard)>

In the Main Drawing surface press "Edit 1st Process"

6  Processes

6.1  Working with Processes

6.2  Edit a Process

QlikView Visual Script Generator Help 24

Page 28: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Fields

Process Name: Name of the process, will be included in a comment in QlikView script

Is Data Feed: If the process will be a data source like a SQL process or Excel Load (Read Only)

Connection: the connection associated with the process. For SQL or Excel processes.

Data Feed Type: Type of the datafeed, defined during the creation (Read Only)

Catalog, Schema: for SQL processes you can define the catalog and the schema to restrict the data of the field browser. Also the table name will be prefixed like this: Catalog.Schema.TableName

Do not regenerate script: Check this box if you want to edit the script manually and that QsGen does not regenerate it.

Buttons:

Edit SQL: will open a powerfull SQL Editor (Section 7.1) to help you to design complex queries

Test In QlikView (Section 5.5) will test the process in QlikView

QlikView Visual Script Generator Help 25

Page 29: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Test Mapping in QlikView (Section 5.5), Press the button to the processes it is necessary to test in allof their mapping.

The columns in the form Process represent the output of a previous DataFeed LOAD. They will form thecolumns of a successive LOAD and therefore agree QlikView syntax.

Fields

Expression:

no user columns : output column name of the previous load, (read only).

user columns : you can enter any QlikView valid expression. Clicking the "..." button on the right of the field will open the Expression Editor (Section 6.4).

6.3  Process Columns

QlikView Visual Script Generator Help 26

Page 30: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Alias : enter a new column name in the resulting script

Final Name : the name of the column in the resulting script

Output : check if you want the column to appears in the resulting script

User Column : if checked the columns Expression can be edited with a custom expression. (read only)

Grouping: if you insert an aggregate function in an User Column you will have to group by the others columns.

To insert a new "User Column" : press the green "+" button. You can delete a "User Column" but others deleted columns are recreated after editing the SQL.

6.4  Expression Editor

QlikView Visual Script Generator Help 27

Page 31: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Enter any valid QlikView Expression. You can select items from Columns, QlikView Functions or QlikView Operators by double clicking the item.

You can test the whole Process in QlikView directly from here.

6.5  Process Script

QlikView Visual Script Generator Help 28

Page 32: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

The Process Script is regenerated automatically after any Load or Column change. You can modify it by hand and keep your modifications checking the "Do not regenerate script". Keep in mind thar checking this option will prevent the script to be refreshed.

QlikView Visual Script Generator Help 29

Page 33: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

The SQL Editor is very powerfull, you can drop objects from the database browser in the right, draw relations

7  SQL Editor

7.1  Edit SQL

QlikView Visual Script Generator Help 30

Page 34: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

between tables and design very complex grouping queries

The "Data" tab shows the query results

The "Fields" tab shows the resulting fields

QlikView Visual Script Generator Help 31

Page 35: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

8  Mapping Library

8.1  Mappings Library

QlikView Visual Script Generator Help 32

Page 36: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

From the "Mapping Library" you can drag and drop any shape to the drawing surface. After a wizard will prompt you for Mapping details.

Here the list of current Library plugins, the list will be enhanced in the close future

Excel Mapping (Section 8.2)

QlikView Visual Script Generator Help 33

Page 37: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Inline Data Mapping (Section 8.3)

QlikView Script Mapping (Section 8.4)

Resident_Mapping (Section 8.5)

Drop an Excel mapping from the Mapping Library (Section 4.4) will open this wizard

Enter the Excel FileName

Select the WorkSheet you want to get the data from

To Hide a column, right-click on the column header and choose "Remove This Column"To display a hidden column right-click on the column header and choose "Column Chooser"To Filter the data right-click on the column header and choose "Filter Editor"

8.2  Excel Mapping

QlikView Visual Script Generator Help 34

Page 38: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Then you'll get hte QlikView resulting script. You can test it directly in QlikView using the "Test in QlikView" button

Drop an "Inline Mapping" from the Mapping Library (Section 4.4) will open this wizard to create a new mapping.

To edit it edit the mapping (Section 5.1), select the process and choose Edit Process (Wizard) from the contextual menu.

8.3  Inline Data Mapping

QlikView Visual Script Generator Help 35

Page 39: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Enter the Process Name

You can Add / Delete Columns

Press the + / - buttons to add / remove lines

The resulting Script, that you can test in QlikView

QlikView Mapping Wizard is a very powerful tool, which enables you to create a mapping containingcomplexes QlikView script instructions.Let's create a sample that will contains a script for creating a calendar

!Widget rendering error!

8.4  QlikView Script Mapping

QlikView Visual Script Generator Help 36

Page 40: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Drag a "QlikView Mapping" from the "Mappings Library" and drop in on the design surface

It will launch the wizard

Name the Process

Press the Edit in QlikView button it will open a new QlikView document, go to the QsGen Tab and add your code between/*=======================================================*/

/* QLIKVIEW SCRIPT GENERATOR SCRIPT */

/*=======================================================*/

and /*<END-QSGen>*/

Test your code in QlikView using reload, or debug.

It's important to reload your data in order QsGen to get the correct results columns.

QlikView Visual Script Generator Help 37

Page 41: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Once finished save your changes in the QlikView document and close QlikView

Press Yes, and QsGen will retrieve your script and the resulting columns. From here you can Edit it back in QlikView.

The next page will shows you the resulting columns retrieved from the QlikView Script ance reloaded

QlikView Visual Script Generator Help 38

Page 42: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

The resulting Mapping that you can now link to other mappings like a table

A resident mapping is a mapping which is based on data from another mapping.

Drag a "Resident Load" Mapping from the "Mappings Library" and drop in on the design surface

It will launch the wizard

8.5  Resident_Mapping

QlikView Visual Script Generator Help 39

Page 43: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

We will for the sample create a resident mapping that will count the number of Orders for each customer, name the mapping and the process, and choose the source mapping for your resident load.

Delete all columns with "-" button except CustomerID, and add a new column with the "+". Note that the column is a User Column

Press the "..." on the expression and define an Expression like

count( distinct [OrderID] )

Set the Alias name of "NbOrders", check output, and check groupping in the CustomerId column like this

Press Next > you will get the resulting QlikView script like

//-- Process ResidentNbOrders ----------------------------LOAD CustomerID, count( distinct [OrderID] ) AS NbOrdersRESIDENT OrdersGROUP BY CustomerID;

You can test it in QlikView but as it uses another mapping you will have to test it in a Script (Section 9.4) that will include Customers and Orders tables

As there is now 3 tables that have the CustomerID key in common QsGen define a CustomerID link node. Here the resulting schema

QlikView Visual Script Generator Help 40

Page 44: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QsGen script for tests

Press Create / Update script

The Table Viewers

The Resulting data.

Note that it is essential that the resident mapping if placed after the order table in the "Script Mappings" list. You can use the Up / Dn button to place it correctly

QlikView Visual Script Generator Help 41

Page 45: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QlikView Visual Script Generator Help 42

Page 46: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

One Schema multiple Scripts

QsGen can generate several different scripts from a single same pattern.

And that is precisely the great strength of this tool, you can manage from a central point all your databaseschema and generate as many different scripts as you like.

If the structure of a table or a file changes, open QsGen, update the table, and restart the generation of yourimpacted scripts.

Generate Include Scripts

To further help you can generate scripts in include files. So no need to change your QlikView applications,deliver only the new include files and that's it.

Separate Variable File

It is very simple to configure your scripts in different environments to which they are intended. Because QsGencan generates an variable definition include file you can set up on your various servers QlikView

9  Generate QlikView Scripts

9.1  Working With QlikView Scripts

QlikView Visual Script Generator Help 43

Page 47: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

With QsGen you can really customize the generation of scripts to your environment.

Generate Include Scripts

To separate the QsGen scripts of your applications you can generate them in include files. So you will not have

9.2  QlikView Scripts Options

QlikView Visual Script Generator Help 44

Page 48: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

to change your QlikView applications scripts, deliver only the new include files and that's it.

Separate Variable File

It is very simple to configure your scripts in different environments to which they are intended. Because QsGencan generates an variable definition include file you can set up on your various servers QlikView

QsGen files are generated relatively to the .QsProj project.

For example if the project is named Project1.qsproj all files generated will be relatively to this project

9.3  QsGen Files Locations

QlikView Visual Script Generator Help 45

Page 49: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

We give you this sample of files organization but you can choose your own.

QsGen Files Locations Sample

QsGen Files Extensions

Absolute Path Relative Path File TypeC:\QsGen\qsproj\project1.qsproj QsGen ProjectC:\QsGen\qsinc\project1_script1.qsinc ..\qsinc QsGen Include FileC:\QsGen\qsvar\project1_script1-qsvar ..\qsvar QsGen Variable Definition fileC:\QsGen\qvw\project1_script1.qvw ..\qvw QlikView Application Generated/UpdatedC:\QsGen\qvd\qvd_table1.qvw ..\qvd QlikView qvd loader that will generate table1.qvdC:\QsGen\qvd\qvd_table1.qvd ..\qvd QlikView data file generated by table1.qvw

Extension File Type Description

.qsproj QsGen Project Main QsGen project

.qsinc QsGen Include File Separated QsGen script to be included in .qvw application.

.qsvar QsGen variables file Variables definition file to be included in .qvw application.

.qvw QlikView application QlikView Application Generated/Updated by qsgen

.qvd QlikView data file file containing a table of data exported from QlikView.

9.4  Edit QlikView Scripts

QlikView Visual Script Generator Help 46

Page 50: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Script List

You can add / delete a script using the "+" and "-" buttons

Script Settings

Script Name: The name of the script, will be used to name the output files

User Name / Password : username / password used to open the "QlikView Qvw Application File" if neccessary

QlikView Qvw Application File : the path of the destination QlikView file (.qvw) that will be updated

QlikView Visual Script Generator Help 47

Page 51: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

with the QsGen script.

Generate Include : check if you want QsGen to generate the script in a separate include file

QlikView Script Include File : relative path of the include file

Put Variables in Separate File : check if you want QsGen to put the variables definition in a separate file

Variable File : relative path of the variable file.

Generate Qvd Application : check if you want QsGen to generate, for each Mapping having an Output to Qvd, the QlikView Application (QDV_xxx.qvw) that will generate the QVD.

Include Load form QVD : check if you want QsGen to generate, for each Mapping having an Output to Qvd, the script part containing the LOAD from QVD in the QsGen Script.

Scripts Mappings

Use the Select Buttons to select the Mapping you want to include in your script.

Creating the mapping

Press the button Create the Mapping, it will open the QlikView document specified in "QlikView Qvw Application File" or create it if it does not exist.

QsGen will then look for a tab named QsGen, and replace the tab script by the new one.

For more information on Generating QlikView Script see

Working With QlikView Scripts (Section 9.1)

QsGen Files Locations (Section 9.3)

QlikView Scripts Options (Section 9.2)

The "QlikView Qvw Application File" can already contain some scripts. QsGen script it will be added to the end of file in a QsGen tab that you will be able to move afterwards.

If you selected one or more mappings that are dependent on other mappings (resident mappings), make sure to set the order to insert them after of those they are dependent on.

QlikView Visual Script Generator Help 48

Page 52: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

10  Preferences

10.1 Preferences

QlikView Visual Script Generator Help 49

Page 53: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

QQVD FileA QVD (QlikView Data) file is a file containing a table of data exported from QlikView

11  Glossary

QlikView Visual Script Generator Help 50

Page 54: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

On the first installation QsGen will start on a trial mode for 30 days.

OrderingQlikView Visual Script Generator can be purchased from the QsGen web site for immediate download, or from most popular online software resellers. For further information, go to the purchase pages on the QsGen web site:

http://www.qsgen.com/buy-now

Manage LicensesThe licenses have to be checked through internet line against our license server.

If you have no internet access on one PC you can use another one and connect to our web site to activate your PC manually.

the support Expires Date tell you the expiration date of support and updates downloads.

Refresh License

Press this button in order to contact the licenses server and to refresh license data. For example if we setup a trial extension please press this button for the extension to be effective

Deactivate

Any license is linked to a machine, any installation will decrease your license number by one unit. If you want to install the software on another machine you will have to first release your current license and to register the license on the new machine.

Activate Manually

Enter License ID and Password to PC to install

Get the Activation Request Code

Connect to our web site from a PC having internet to get Manual Activation Code

12  Licensing

If you need a trial extension please send an email to our support team

QlikView Visual Script Generator Help 51

Page 55: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Activation Web Page

https://secure.softwarekey.com/solo/customers/ManualRequest.aspx

Enter the code to the Activation Code field of the PC to install

Activate Online

Type your License ID and password and press "Activate"

Licenses Control PanelIf you have a registered License ID, you can press the "Customer Panel" link and login using your license ID/Password that you received with your license email confirmation.

You can consult your Payment History, Licenses Detail, Download your software, and buy new licenses or maintenance / support renewal

QlikView Visual Script Generator Help 52

Page 56: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Support ForumAll support is done through the QsGen forum, our engineers will answer you directly on the forum

the URL IS: http://www.qlikview-script-generator.com/forum

If you want to post on this forum you have to be registered. You can register in the Support / Register page

Download ProductGo to the Download (http://www.qlikview-script-generator.com/qlikview-visual-script-generator-betatest-program) section of QsGen.com. Note that you have to be registered to have access to this section.

Once downloaded, install the product, you will have a 30 days evaluation period. Once this period expired you 'll have to buy the product if you want to continue

13  Product Support

QlikView Visual Script Generator Help 53

Page 57: QlikView Visual Script Generator Helpsolutions.atkcg.ru/files/qliksolutions/add-ons/QsGenUserManual.pdf · QlikView Visual Script Generator Help QlikView Visual Script Generator Help.

Database Connection, 6-9

Database Mapping, 9-11

Edit a Mapping, 17-18

Edit a Process, 24-26

Edit QlikView Scripts, 46-48

Edit SQL, 30-31

Excel Mapping, 34-35

Expression Editor, 27-28

Generate QVD Files, 22-23

Inline Data Mapping, 35-36

Licensing, 51-52

Mapping Columns, 18-19

Mapping Relations, 13-15

Mapping Script, 19-20

Mappings, 13-15

Mappings Library, 11-13, 32-34

Preferences, 49

Process Columns, 26-27

Process Script, 28-29

Product Support, 53

Project Toolbars, 5-6

QlikView Script Mapping, 36-39

QlikView Scripts Options, 44-45

QsGen Files Locations, 45-46

QVD File, 17-18

Resident_Mapping, 39-42

Test a Mapping, 20-22

Welcome to QlikView Visual Script Generator, 1-2

Working with Mappings, 16-17

Working with Processes, 24

Working with Projects, 4

Working With QlikView Scripts, 43-44

Index

QlikView Visual Script Generator Help 54