SlideShare uma empresa Scribd logo
1 de 35
Macro’sare bad!
Why you should never use macro’s
Qlik Dev Group NL – October 29th 2015
Not sure if …
Qlik Dev Group NL – October 29th 2015
AGENDA
1
2
4
3
Introduction
Developing macro’s
What reference materials are there?
How can you debug macro’s?
What are macro’s?
Where can you find them?
What are the language options?
What use cases are there?
5Some cool and/or useful macro’s
How are we and others using macro’s?
Macro’s myths
Is it true what they say?
2
ABOUTBARRYHARMSEN
1 BI Consultant
Working at Bitmetric. Started 15 years ago
in ‘traditional’ Data Warehousing and
Business Intelligence. Switched to Qlik in
2008 and still enjoying it very much.
2 Blogger
Regular blogger at www.qlikfix.com,
together with my colleagues. Focused on
Qlik, with topics ranging from common
challenges to the extremely obscure (some
would say pointless).
3 Author
Authored the book QlikView 11 for Developers
together with Miguel García.
4 Organizer of Qlik Dev Group NL
Started organizing meetup for Qlik
professionals in March 2015. Hobby/fun
project. Help, speakers and sponsors welcome!
3
Qlik Dev Group NL – October 29th 2015
WHATIS A MACRO?
“Asingle instruction that expands automatically into a set of instructions to perform a particular task. ”
Scriptto automate a series of steps in QlikView
Found under Tools | Edit Module (Ctrl + M)
VBScript JScript
4
Qlik Dev Group NL – October 29th 2015
MACRO USE CASES
Sowhat can you use macro’s for?
Qlik Dev Group NL – October 29th 2015
5
MACROUSE CASES (1/2)
Custom scriptfunctions Custom chartfunctions Reportgeneration Front-endinteractivity
Create additional
functions that can be
used in the QlikView
script.
Create additional
functions that can be
used in front-end charts.
Generate reports by
making selections and
exporting data and/or
images to Excel,
PowerPoint, Word,
HTML, etc.
Provide additional front-
end interactivity, for
example dynamically
modifying charts or
selections, calling a web
service etc.
6
Qlik Dev Group NL – October 29th 2015
MACROUSE CASES (2/2)
Cache warming Mass updates Dynamicupdate Developmentautomation
Timed script that
automatically makes
selections on big server
documents. Ensures that
the results are already
cached for the users.
Perform an ad-hoc mass
update of document,
sheet or object
properties across an
application.
Dynamically insert or
update values into the
QlikView data model.
Automate common
developer tasks, for
example generation of
ad-hoc report objects, or
document layout and
navigation.
7
Qlik Dev Group NL – October 29th 2015
MACROUSE CASE CUSTOMSCRIPTFUNCTIONS
Create additional functions that can be used in the QlikView script.
Examples
Regular Expressions*, Levenshtein Distance, SHA-1 hashing*
Alternative: dump table to CSV during reload and process
externally (R, Python, Perl)
8
Qlik Dev Group NL – October 29th 2015
* See: http://www.qlikfix.com/2010/10/18/regular-expressions-in-the-load-script/ for example
** See: http://www.qlikfix.com/2012/06/06/check-if-your-linkedin-password-was-leaked/ for example
Good idea? Depends
Requires some additional tweaking touse
Set AllowMacroFunctionsInExpressions to 1
Found in Easter Egg menu: Help | About QlikView | Right-click Q
MACROUSE CASE CUSTOMCHARTFUNCTIONS
Use additional macro functions within expressions in the front-end.
9
Qlik Dev Group NL – October 29th 2015
Good idea? No, unless…
MACROUSE CASE REPORTGENERATION
Export QlikView data and objects into external reports, for example in PDF, PowerPoint,
Excel, Word or HTML.
Can be done from within the application, butalso externally
Qlik Dev Group NL – October 29th 2015
Good idea? Depends
Example included in presentation files
10
Macro’s are run bythe user using button/text object, or by using
triggers.
Many macro’s do not work in AJAX client, OnPostReload trigger doesn’t
work on server. Can have stability issues or just plain confuse the user.
MACROUSE CASE FRONT-ENDINTERACTIVITY
Add additional ‘pyrotechnics’ to the QlikView front-end, for example changing chart
properties at run time, adding/modifying expressions, etc.
11
Qlik Dev Group NL – October 29th 2015
Good idea? No!
Example included in presentation files
MACROUSE CASE CACHE WARMING
Open a (large) document on the QlikView Server and ensure that common user
selections have been made (and cached), before the ‘real’ users log in.
Cache warming improves ‘perceived’ performance
It’s a good idea to first try to improve the actual
performance of an app before using cache warming.
Alternatives: QV Scalability Tools* or Selenium
Qlik Dev Group NL – October 29th 2015
Good idea? Sort of, better alternatives out there
*QV Scalability Tools can be downloaded here: https://community.qlik.com/docs/DOC-6658
12
When other solutions do not work, macro’s can be useful todomass
updates
Alternatives: Search & Replace expressions, Search & Replace across Prj-
files, Format Painter, applying themes, etc.
MACROUSE CASE MASS UPDATES
Perform an ad-hoc mass update of documents, sheets or objects. Across an application,
or across multiple applications.
13
Qlik Dev Group NL – October 29th 2015
Good idea? Yes, but be careful, better safe than sorry
Example included in presentation files
MACROUSE CASE DYNAMICUPDATES
Dynamically insert or update rows in the QlikView data model.
Trickle load datainto the data model
Partial alternative: Partial Reload
Qlik Dev Group NL – October 29th 2015
Good idea? No, just don’t use Dynamic Updates
Example included in presentation files
14
A lazy efficient developer is a good developer!
Minimize time on non-value added activities, so you can spend more
time on the things that really matter.
MACROUSE CASE DEVELOPMENTAUTOMATION
Automate common developer/designer tasks. For example exporting and importing
variables, creating ad-hoc analysis objects, creating navigation and layout object.
15
Qlik Dev Group NL – October 29th 2015
Good idea? Yes, a very good idea!
See http://www.qlikfix.com/2013/09/06/importing-and-exporting-variables/ for an example
DEVELOPING MACRO’S
Reference materials anddebugging
Qlik Dev Group NL – October 29th 2015
16
Qlik Dev Group NL – October 29th 2015
17
DEFAULT DEVELOPMENT ENVIRONMENT
Built-in Module Editor
• Found under Tools | Edit Module
• No-frills
• Kind of a pain to work with
Debugging?
Virtually non-existent, besides
writing values to a message box.
Qlik Dev Group NL – October 29th 2015
18
ALTERNATIVEDEVELOPMENT ENVIRONMENT
VbsEdit
• Stand-alone VBScript IDE
• IntelliSense
• Object Browser
• Compile to EXE
Debugging?
Plenty! Add breakpoints, inspect
values and objects at runtime, etc.
What’s the catch?
Not free, costs 49 Euro. Download from http://www.vbsedit.com/
Qlik Dev Group NL – October 29th 2015
19
REFERENCEMATERIALS
API Guide
• Provided by Qlik
• Lists simplified object model
• Describes methods and
properties
• Nice collection of sample
macro’s
Check out other people’s stuff
• QlikCommunity
• Blogs Download from https://community.qlik.com/docs/DOC-2640
Qlik Dev Group NL – October 29th 2015
20
DEVELOPMENT TIPS
Use Option Explicit
Forces the explicit declaration of all variables.
Use descriptive variable names
So not xyz but wbExport or chProps.
Comment your code
Needs no further explanation, just do it already.
Don’t misuse On Error Resume Next
Only use for error handling, not to mask crappy code
Write reusable subroutines
Compartmentalize functionality so that you can reuse it
across applications, i.e. not “one big subroutine”.
Qlik Dev Group NL – October 29th 2015
21
SYSTEMACCESS
When dealing with macro’s that access the system (i.e. stuff outside of QlikView),
don’t forget to enable System Access in the Module Editor.
Requested Module Security shows access level requested by the developer.
Current Local Security shows the access level granted by the user.
Qlik Dev Group NL – October 29th 2015
22
INCLUDING MACRO’S
The macro editor doesn’t have the $(include) option that we can use in regular
QlikView script, but we can simulate it, with a macro.
Uses the ExecuteGlobal command.
Allows you to store your macro’s in
external VBS files and include them into
your applications. Useful for version
control.
Read more at http://www.qlikblog.at/509/simulating-include-command-qlikview-macros/
MACRO MYTHS
Busted? Ornot?
Qlik Dev Group NL – October 29th 2015
23
Qlik Dev Group NL – October 29th 2015
24
MACROMYTHS
Macro’s are single-threaded
SOMEWHAT
Macro code is executed sequentially (i.e. “single-threaded”) but
each statement can be multi-threaded.
Qlik Dev Group NL – October 29th 2015
25
MACROMYTHS
Macro’s clear the cache
FALSE
Any selection that is made by a macro is cached in the same way
as a regular selection made in the UI.
Qlik Dev Group NL – October 29th 2015
26
MACROMYTHS
Macro’s clear the undo/redo stack
TRUE
Changing document, sheet or object properties in a
macro will clear the undo/redo stack.
COOL MACRO’S
Sowhat’s being done with macro’s?
Qlik Dev Group NL – October 29th 2015
27
Qlik Dev Group NL – October 29th 2015
28
DOCUMENTANALYZER
• Analyzes the structure of a QVW
• Focuses on which fields are used
and where
• Can be used to tune
performance of QlikView
applications or investigate
impact of data changes
• Made by Rob Wunderlich
Download from http://qlikviewcookbook.com/tools/
Qlik Dev Group NL – October 29th 2015
29
COPYGROUPS UTILITY
• Copy cyclic and drill-down
groups from one QlikView
application to another.
• Yes, it’s Rob again
Download from http://qlikviewcookbook.com/tools/
Qlik Dev Group NL – October 29th 2015
30
QLIKVIEW MACROCOLLECTION
Collection of macro’s by Lucian Cotea
Examples for:
• Exporting JPEG’s
• Exporting to Excel
• Sending emails
• Setting Autozoom
• Creating variables
• and lots of other stuff
https://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/
Qlik Dev Group NL – October 29th 2015
31
TURBOQLIK
Internal Bitmetric tool, used for:
• Template / layout generation
• Color management
• Variable management
• Ad-hoc report object generation
• Object library
• And whatever makes our life easier
THANK
YOU!
CONTACTINFO
Telephone, Address, Email,Social Media, etc.
Qlik Dev Group NL – October 29th 2015
33
SOCIAL MEDIA
Twitter Google+ LinkedIn
https://twitter.com/meneerharmsen https://plus.google.com/+BarryHarmsen http://www.linkedin.com/in/barryharmsen
Qlik Dev Group NL – October 29th 2015
34
CONTACT INFO
Bitmetric B.V.
Planetenweg 5
2132 HN, Hoofddorp
TheNetherlands
barry@bitmetric.nl
+31 (0)23 2302 062
+31 (0)62 4581 706
35
Qlik Dev Group NL – October 29th 2015

Mais conteúdo relacionado

Mais procurados

QlikView projects in Agile Environment
QlikView projects in Agile EnvironmentQlikView projects in Agile Environment
QlikView projects in Agile Environment
Saleha Amin, CSM, PMP
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
VMware Tanzu
 
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Lucas Jellema
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization Transformation
Chloe Jackson
 

Mais procurados (20)

TIQ Solutions - QlikView Data Integration in a Java World
TIQ Solutions - QlikView Data Integration in a Java WorldTIQ Solutions - QlikView Data Integration in a Java World
TIQ Solutions - QlikView Data Integration in a Java World
 
What makes QlikView unique
What makes QlikView unique  What makes QlikView unique
What makes QlikView unique
 
QlikView projects in Agile Environment
QlikView projects in Agile EnvironmentQlikView projects in Agile Environment
QlikView projects in Agile Environment
 
Best Practices - QlikView Application Development
Best Practices - QlikView Application DevelopmentBest Practices - QlikView Application Development
Best Practices - QlikView Application Development
 
QlikView licensing and pricing guidelines 2012
QlikView licensing and pricing guidelines 2012QlikView licensing and pricing guidelines 2012
QlikView licensing and pricing guidelines 2012
 
QlikView Tutorial For Beginners | What Is QlikView | Qlikview Tutorial | Qlik...
QlikView Tutorial For Beginners | What Is QlikView | Qlikview Tutorial | Qlik...QlikView Tutorial For Beginners | What Is QlikView | Qlikview Tutorial | Qlik...
QlikView Tutorial For Beginners | What Is QlikView | Qlikview Tutorial | Qlik...
 
Qonnections2015 - Why Qlik is better with Big Data
Qonnections2015 - Why Qlik is better with Big DataQonnections2015 - Why Qlik is better with Big Data
Qonnections2015 - Why Qlik is better with Big Data
 
Associative analytics
Associative analyticsAssociative analytics
Associative analytics
 
Discover the QlikView Way
Discover the QlikView Way Discover the QlikView Way
Discover the QlikView Way
 
Simplifying the OpenAPI Development Experience
Simplifying the OpenAPI Development Experience Simplifying the OpenAPI Development Experience
Simplifying the OpenAPI Development Experience
 
What's New in QV11: Mobile, Social, Comparative Analysis
What's New in QV11: Mobile, Social, Comparative AnalysisWhat's New in QV11: Mobile, Social, Comparative Analysis
What's New in QV11: Mobile, Social, Comparative Analysis
 
How to Achieve Data in Motion Expertise | Mario Sanchez, Confluent
How to Achieve Data in Motion Expertise | Mario Sanchez, ConfluentHow to Achieve Data in Motion Expertise | Mario Sanchez, Confluent
How to Achieve Data in Motion Expertise | Mario Sanchez, Confluent
 
GPCloud ( GP on PKS)
GPCloud ( GP on PKS)GPCloud ( GP on PKS)
GPCloud ( GP on PKS)
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
 
LIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryLIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud Foundry
 
Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3
 
Quantum metrics
Quantum metricsQuantum metrics
Quantum metrics
 
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
 
Using Pivotal Cloud Foundry with Google’s BigQuery and Cloud Vision API
Using Pivotal Cloud Foundry with Google’s BigQuery and Cloud Vision APIUsing Pivotal Cloud Foundry with Google’s BigQuery and Cloud Vision API
Using Pivotal Cloud Foundry with Google’s BigQuery and Cloud Vision API
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization Transformation
 

Semelhante a QlikView Macro's Are Bad

Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
Henning Jacobs
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning products
Gianmario Spacagna
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Chris Jang
 

Semelhante a QlikView Macro's Are Bad (20)

Better code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloudBetter code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloud
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
 
Pydata 2020 containers meetup
Pydata  2020 containers meetup Pydata  2020 containers meetup
Pydata 2020 containers meetup
 
Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - Destinat...
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning products
 
GraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdfGraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdf
 
Javascript Toolkit
Javascript ToolkitJavascript Toolkit
Javascript Toolkit
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"
 
Mihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate EverythingMihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate Everything
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
 
SUG Bangalore - Kick Off Session
SUG Bangalore - Kick Off SessionSUG Bangalore - Kick Off Session
SUG Bangalore - Kick Off Session
 
Global Azure Bootcamp: Container, Docker & Kubernetes Basics
Global Azure Bootcamp: Container, Docker & Kubernetes BasicsGlobal Azure Bootcamp: Container, Docker & Kubernetes Basics
Global Azure Bootcamp: Container, Docker & Kubernetes Basics
 
What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009What I Learned At Drupal Con Dc 2009
What I Learned At Drupal Con Dc 2009
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
 
Drupalcon Sessions about Devops
Drupalcon Sessions about DevopsDrupalcon Sessions about Devops
Drupalcon Sessions about Devops
 
Boston Data Engineering: Kedro Python Framework for Data Science: Overview an...
Boston Data Engineering: Kedro Python Framework for Data Science: Overview an...Boston Data Engineering: Kedro Python Framework for Data Science: Overview an...
Boston Data Engineering: Kedro Python Framework for Data Science: Overview an...
 
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia ChapterFORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
 
Model repositories: will they become reality?
Model repositories: will they become reality?Model repositories: will they become reality?
Model repositories: will they become reality?
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 

Último

Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Último (20)

ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 

QlikView Macro's Are Bad

  • 1. Macro’sare bad! Why you should never use macro’s Qlik Dev Group NL – October 29th 2015 Not sure if …
  • 2. Qlik Dev Group NL – October 29th 2015 AGENDA 1 2 4 3 Introduction Developing macro’s What reference materials are there? How can you debug macro’s? What are macro’s? Where can you find them? What are the language options? What use cases are there? 5Some cool and/or useful macro’s How are we and others using macro’s? Macro’s myths Is it true what they say? 2
  • 3. ABOUTBARRYHARMSEN 1 BI Consultant Working at Bitmetric. Started 15 years ago in ‘traditional’ Data Warehousing and Business Intelligence. Switched to Qlik in 2008 and still enjoying it very much. 2 Blogger Regular blogger at www.qlikfix.com, together with my colleagues. Focused on Qlik, with topics ranging from common challenges to the extremely obscure (some would say pointless). 3 Author Authored the book QlikView 11 for Developers together with Miguel García. 4 Organizer of Qlik Dev Group NL Started organizing meetup for Qlik professionals in March 2015. Hobby/fun project. Help, speakers and sponsors welcome! 3 Qlik Dev Group NL – October 29th 2015
  • 4. WHATIS A MACRO? “Asingle instruction that expands automatically into a set of instructions to perform a particular task. ” Scriptto automate a series of steps in QlikView Found under Tools | Edit Module (Ctrl + M) VBScript JScript 4 Qlik Dev Group NL – October 29th 2015
  • 5. MACRO USE CASES Sowhat can you use macro’s for? Qlik Dev Group NL – October 29th 2015 5
  • 6. MACROUSE CASES (1/2) Custom scriptfunctions Custom chartfunctions Reportgeneration Front-endinteractivity Create additional functions that can be used in the QlikView script. Create additional functions that can be used in front-end charts. Generate reports by making selections and exporting data and/or images to Excel, PowerPoint, Word, HTML, etc. Provide additional front- end interactivity, for example dynamically modifying charts or selections, calling a web service etc. 6 Qlik Dev Group NL – October 29th 2015
  • 7. MACROUSE CASES (2/2) Cache warming Mass updates Dynamicupdate Developmentautomation Timed script that automatically makes selections on big server documents. Ensures that the results are already cached for the users. Perform an ad-hoc mass update of document, sheet or object properties across an application. Dynamically insert or update values into the QlikView data model. Automate common developer tasks, for example generation of ad-hoc report objects, or document layout and navigation. 7 Qlik Dev Group NL – October 29th 2015
  • 8. MACROUSE CASE CUSTOMSCRIPTFUNCTIONS Create additional functions that can be used in the QlikView script. Examples Regular Expressions*, Levenshtein Distance, SHA-1 hashing* Alternative: dump table to CSV during reload and process externally (R, Python, Perl) 8 Qlik Dev Group NL – October 29th 2015 * See: http://www.qlikfix.com/2010/10/18/regular-expressions-in-the-load-script/ for example ** See: http://www.qlikfix.com/2012/06/06/check-if-your-linkedin-password-was-leaked/ for example Good idea? Depends
  • 9. Requires some additional tweaking touse Set AllowMacroFunctionsInExpressions to 1 Found in Easter Egg menu: Help | About QlikView | Right-click Q MACROUSE CASE CUSTOMCHARTFUNCTIONS Use additional macro functions within expressions in the front-end. 9 Qlik Dev Group NL – October 29th 2015 Good idea? No, unless…
  • 10. MACROUSE CASE REPORTGENERATION Export QlikView data and objects into external reports, for example in PDF, PowerPoint, Excel, Word or HTML. Can be done from within the application, butalso externally Qlik Dev Group NL – October 29th 2015 Good idea? Depends Example included in presentation files 10
  • 11. Macro’s are run bythe user using button/text object, or by using triggers. Many macro’s do not work in AJAX client, OnPostReload trigger doesn’t work on server. Can have stability issues or just plain confuse the user. MACROUSE CASE FRONT-ENDINTERACTIVITY Add additional ‘pyrotechnics’ to the QlikView front-end, for example changing chart properties at run time, adding/modifying expressions, etc. 11 Qlik Dev Group NL – October 29th 2015 Good idea? No! Example included in presentation files
  • 12. MACROUSE CASE CACHE WARMING Open a (large) document on the QlikView Server and ensure that common user selections have been made (and cached), before the ‘real’ users log in. Cache warming improves ‘perceived’ performance It’s a good idea to first try to improve the actual performance of an app before using cache warming. Alternatives: QV Scalability Tools* or Selenium Qlik Dev Group NL – October 29th 2015 Good idea? Sort of, better alternatives out there *QV Scalability Tools can be downloaded here: https://community.qlik.com/docs/DOC-6658 12
  • 13. When other solutions do not work, macro’s can be useful todomass updates Alternatives: Search & Replace expressions, Search & Replace across Prj- files, Format Painter, applying themes, etc. MACROUSE CASE MASS UPDATES Perform an ad-hoc mass update of documents, sheets or objects. Across an application, or across multiple applications. 13 Qlik Dev Group NL – October 29th 2015 Good idea? Yes, but be careful, better safe than sorry Example included in presentation files
  • 14. MACROUSE CASE DYNAMICUPDATES Dynamically insert or update rows in the QlikView data model. Trickle load datainto the data model Partial alternative: Partial Reload Qlik Dev Group NL – October 29th 2015 Good idea? No, just don’t use Dynamic Updates Example included in presentation files 14
  • 15. A lazy efficient developer is a good developer! Minimize time on non-value added activities, so you can spend more time on the things that really matter. MACROUSE CASE DEVELOPMENTAUTOMATION Automate common developer/designer tasks. For example exporting and importing variables, creating ad-hoc analysis objects, creating navigation and layout object. 15 Qlik Dev Group NL – October 29th 2015 Good idea? Yes, a very good idea! See http://www.qlikfix.com/2013/09/06/importing-and-exporting-variables/ for an example
  • 16. DEVELOPING MACRO’S Reference materials anddebugging Qlik Dev Group NL – October 29th 2015 16
  • 17. Qlik Dev Group NL – October 29th 2015 17 DEFAULT DEVELOPMENT ENVIRONMENT Built-in Module Editor • Found under Tools | Edit Module • No-frills • Kind of a pain to work with Debugging? Virtually non-existent, besides writing values to a message box.
  • 18. Qlik Dev Group NL – October 29th 2015 18 ALTERNATIVEDEVELOPMENT ENVIRONMENT VbsEdit • Stand-alone VBScript IDE • IntelliSense • Object Browser • Compile to EXE Debugging? Plenty! Add breakpoints, inspect values and objects at runtime, etc. What’s the catch? Not free, costs 49 Euro. Download from http://www.vbsedit.com/
  • 19. Qlik Dev Group NL – October 29th 2015 19 REFERENCEMATERIALS API Guide • Provided by Qlik • Lists simplified object model • Describes methods and properties • Nice collection of sample macro’s Check out other people’s stuff • QlikCommunity • Blogs Download from https://community.qlik.com/docs/DOC-2640
  • 20. Qlik Dev Group NL – October 29th 2015 20 DEVELOPMENT TIPS Use Option Explicit Forces the explicit declaration of all variables. Use descriptive variable names So not xyz but wbExport or chProps. Comment your code Needs no further explanation, just do it already. Don’t misuse On Error Resume Next Only use for error handling, not to mask crappy code Write reusable subroutines Compartmentalize functionality so that you can reuse it across applications, i.e. not “one big subroutine”.
  • 21. Qlik Dev Group NL – October 29th 2015 21 SYSTEMACCESS When dealing with macro’s that access the system (i.e. stuff outside of QlikView), don’t forget to enable System Access in the Module Editor. Requested Module Security shows access level requested by the developer. Current Local Security shows the access level granted by the user.
  • 22. Qlik Dev Group NL – October 29th 2015 22 INCLUDING MACRO’S The macro editor doesn’t have the $(include) option that we can use in regular QlikView script, but we can simulate it, with a macro. Uses the ExecuteGlobal command. Allows you to store your macro’s in external VBS files and include them into your applications. Useful for version control. Read more at http://www.qlikblog.at/509/simulating-include-command-qlikview-macros/
  • 23. MACRO MYTHS Busted? Ornot? Qlik Dev Group NL – October 29th 2015 23
  • 24. Qlik Dev Group NL – October 29th 2015 24 MACROMYTHS Macro’s are single-threaded SOMEWHAT Macro code is executed sequentially (i.e. “single-threaded”) but each statement can be multi-threaded.
  • 25. Qlik Dev Group NL – October 29th 2015 25 MACROMYTHS Macro’s clear the cache FALSE Any selection that is made by a macro is cached in the same way as a regular selection made in the UI.
  • 26. Qlik Dev Group NL – October 29th 2015 26 MACROMYTHS Macro’s clear the undo/redo stack TRUE Changing document, sheet or object properties in a macro will clear the undo/redo stack.
  • 27. COOL MACRO’S Sowhat’s being done with macro’s? Qlik Dev Group NL – October 29th 2015 27
  • 28. Qlik Dev Group NL – October 29th 2015 28 DOCUMENTANALYZER • Analyzes the structure of a QVW • Focuses on which fields are used and where • Can be used to tune performance of QlikView applications or investigate impact of data changes • Made by Rob Wunderlich Download from http://qlikviewcookbook.com/tools/
  • 29. Qlik Dev Group NL – October 29th 2015 29 COPYGROUPS UTILITY • Copy cyclic and drill-down groups from one QlikView application to another. • Yes, it’s Rob again Download from http://qlikviewcookbook.com/tools/
  • 30. Qlik Dev Group NL – October 29th 2015 30 QLIKVIEW MACROCOLLECTION Collection of macro’s by Lucian Cotea Examples for: • Exporting JPEG’s • Exporting to Excel • Sending emails • Setting Autozoom • Creating variables • and lots of other stuff https://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/
  • 31. Qlik Dev Group NL – October 29th 2015 31 TURBOQLIK Internal Bitmetric tool, used for: • Template / layout generation • Color management • Variable management • Ad-hoc report object generation • Object library • And whatever makes our life easier
  • 33. CONTACTINFO Telephone, Address, Email,Social Media, etc. Qlik Dev Group NL – October 29th 2015 33
  • 34. SOCIAL MEDIA Twitter Google+ LinkedIn https://twitter.com/meneerharmsen https://plus.google.com/+BarryHarmsen http://www.linkedin.com/in/barryharmsen Qlik Dev Group NL – October 29th 2015 34
  • 35. CONTACT INFO Bitmetric B.V. Planetenweg 5 2132 HN, Hoofddorp TheNetherlands barry@bitmetric.nl +31 (0)23 2302 062 +31 (0)62 4581 706 35 Qlik Dev Group NL – October 29th 2015