0% found this document useful (0 votes)
62 views2 pages

Preceding Load Is Elegant: Masters Summit For Qlikview

A preceding load is an elegant way to script parsing input like a number of key:value pairs from live data. The entire script to parse the input into fields populated with their matching values is simple and elegant. Now a chart can be built easily from the parsed data.

Uploaded by

Nag Dhall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Preceding Load Is Elegant: Masters Summit For Qlikview

A preceding load is an elegant way to script parsing input like a number of key:value pairs from live data. The entire script to parse the input into fields populated with their matching values is simple and elegant. Now a chart can be built easily from the parsed data.

Uploaded by

Nag Dhall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

SCRIPTING

PRECEDING LOAD IS ELEGANT


AUG 26, 2014 LEAVE A COMMENT
I love the precedin lo!d "e!t#re o" $li%vie& 'criptin( It c!n )!%e co)ple* thin' 'i)ple(
Con'ider "or e*!)ple, h!vin to p!r'e !n !r+itr!r, n#)+er o" key:value p!ir' "ro) inp#t li%e-
Name:Shoes, Size:L, Color:Blue Suede, Stock: 200
Name:Socks, Model:Mens Casual, Stock:0, Color:Black
Name:Pants, Error: No attriutes !ound
.e &!nt e!ch key to +eco)e ! /ield pop#l!ted &ith it0' )!tchin value( 1ere0' the entire 'cript
to do 2#'t th!t( A precedin lo!d i' ! 'erie' o" ch!ined LOA3' th!t e*ec#te "ro) the +otto) #p 4
'o re!d the 'cript "ro) the +otto)(
And no& &e c!n +#ild ! ch!rt li%e thi'(
5i)ple( Ele!nt(
I0ll +e 'ho&in 'o)e other cool e*!)ple' o" 6recedin Lo!d in ), 7Adv!nced 5criptin8 'e''ion !t
the M!'ter' 5#))it "or $li%vie& Oct 1(
9:o+
Script suitable for copy/paste
data:
"" #$ %eneric Load to trans&ose 'ey to (ield
%eneric L)*+ ,ec-d, 'ey, .alue
/
"" 0$ Se&arate key 1 value
L)*+
,ec-d,
su!ield2Pair,3:3,45 as 'ey,
su!ield2Pair,3:3,25 as .alue
/
"" 2$ Break out each key:value &air
L)*+
,ec-d,
su!ield2-n&ut,3,35 as Pair
/
"" 4$ Load the ra6 -n&ut
L)*+ 7, ,ecNo25 as ,ec-d -NL-NE 8
-n&ut
Name:Shoes, Size:L, Color:Blue Suede, Stock: 200
Name:Socks, Model:Mens Casual, Stock:0, Color:Black
Name:Pants, Error: No attriutes !ound
9 2delimiter is 3:35
/

You might also like