Qlikview Interview Question and Answers
1. What is Binary Load
Loading one QVW file of source into another QVW file is called Binary Load. The Binary
Statement is used for loading the access and data parts of a Qlikview document only
one Binary Statement is allowed in the script and it can be put only as first statement of
script
Ex. Binary Customers.QVW;
2. We can prohibit binary load
go to settingsDocument propertiesopening tab enable the prohibit binary load
check box(then it will not possible to load data from .QVW file via Binary load statement
in another QVW statement)
3. How do you optimize QV Application?
Merge tables to reduce joins at run time, create flatter structure at load time.
Optimize QV in UI/Application level
a) Try to avoid no of macros
b) Try to implement or use all complex calculation in script level not in UI
c)Avoid same charts in different tabs
Optimization in script level
a) Avoid synthetic keys and circular loops
b)use QVDs
c)try to use star schema instead of snowflake schema
4. What is mapping load and apply map()
Mapping Load: The mapping prefix is used on a load or select statement to create a
mapping table, these tables are different from other tables. They will be stored in
separate area of memory and used as mapping tables during script execution. After
execution they will automatically drop.
Ex. Mapping (Load Statement/Select Statement)
Apply Map: used for mapping data from one source to another at load time.
Ex. Applymap(Mapname, expr,[default expr])
5. Synthetic Keys: when two or more tables have two or more fields in common is called
synthetic key. Below are the ways to remove synthetic keys
1. Join 2. Alias 3. Concatenated key 4. Link table 5. Qualify
6. Circular reference/loops: There are more than one path of association between two
fields below are the ways to remove.
1. Alias 2. Qualify 3. Linktable(join) 4. Concatenation.
7. Join: it joins the loaded table with an existing named table or last previously created
logical table.
Join are of 4 types
1. Inner Join 2. Outer Join 3. Left Join 4. Right Join
8. Keep: it will not join two tables and they will be stored in qlikview as two separate
named tables. Keep will always preceded by one of the prefix
1. Inner 2. Left 3. Right Ex. Right Keep.
9. Explain Concatenation: If the two tables have different fields concatenation of the two
tables can be forced with concatenation prefix.
10. NoConcatenation:if the two tables have same fields also NoConcatenate treats as
separate internal tables.
11. Connect: The connect statement is used to establish a connection to the database
through an ODBC or OLEDB interface.
12. Select Statement: The SQL select statement is used to identify fields and tables to load
from the current database connection.
13. Load statement: The load statement loads fields from a typed ASCII file from data
defined in the script from previously loaded input table, from previously loaded field.
From the result of the following select statements or by generating automatically
14. Explain Aggr function?
Returns a set of values of expression calculated over dimension
Ex: Agg(sum(sales), country)
15. Difference between star schema and snow flake schema?
Star Schema: In a star schema, the fact table will be at centre and in connected to
dimensional tables. The tables are completely in normalized Structure. SQL queries
performance in good as there are less number of joins involved. Data redundancy is high
and occupies more disk spaces.
Snowflake Schema: is an extension of star schema where the dimension tables are
further connected to one or more dimensions. The tables are partially denormalized in
structure. The performance of SQL queries is little bit less compared to star schema as
more no. of joins are involved. Data redundancy is low and occupies less disk space
compared to star schema.
16. What is Fact Constellation Schema?
Fact Constellation Schema is describes a logical database structure of Data Warehouse
or Data Mart. Fact Constellation Schema can design with collection of De Normalized
Fact, Shared and conformed dimensional tables. Fact Constellation Schema is an
extended Decomposed Star Schema.
17. Difference between RDBMS and Associative Data Model
RDBMS: stands for Relational Database Management System. It organizes data into
related rows and columns. It stores data in Tables having rows and columns . These
tables are created and data retrieving using SQL
Associative Database: The Associative Data Model is an alternative data model for
database systems other data models are record based
18. Types of CALS how do you assign them?
To connect a Qlikview server (QVS) each client needs a CAL(client access license) The
CALs are purchased with Qlikview Server and tied to the server serial number. A CAL is
never transformed to the client but a client uses the CAL when connecting to the server.
Cal Types:
1.Named User CAL: Named CAL can access all the documents
2.Document CAL: Document CAL can access particular document
3.session CAL: A session allows any user identified or anonymous/unidentified on one
QV client to access many QV documents as may reside on the server
4.Usage CAL: allows any user to access only one QV document residing on the server
19. what is difference between QV Server and Publisher?
QV Server: is a program that is installed in a physical server(computer) with number of
CALs these allow user to access QV files on the server. QVS controls the people who can
access the documents on server using client access license(CAL).
QV Publisher: is a program which allows you to maintain centralized control of all your
QV files and to schedule when and how they reloaded and distributed. You can
automatically reload files and distribute them to web access points or by email or
intranet. You can do data reduction also.
20. If server crashes then how do you check behind it or error log where you will find that
log?
c:\programdata\Qliktech\webserver\log
21. What is cross table?
cross table is common type of table featuring a matrix of values between two
orthogonal lists of header data. To turn cross table into straight table use cross table
prefix Ex. Cross table(attribute field, data field[ in])(load/select statement)
22. What is Set and Let :
Set: this command assigns the variable the text to the right of equal sign.
Let: assigns the variable whereas Let command evaluates expression.
Ex. Set Variablename = String.
Let variablename= operation.
23. When you reload a QVW file. If you get error how will you resolve it
By debugger
24. QV provides a tool for getting a snapshot view of your table what is it? How it is helpful?
Table Viewer: we can see no of tables and associations and by right click-preview we can
see data.
25. What type of data connections do you use?
ODBC, OLEDB, SAP connectors
26. How do you bring data into QV? Explain the script?
We can load data from ODBC, OLEDB,SAP connectors by connect, select statements and
also we can load flat files like excel, word, xml etc by using Table files syntax will be
Directory:
Load tables, from Ramsample.txt;
27. What type of data did you used?
flat files, excel, QVDs etc
28. What type of charts did you used?
Bar chart, line chart, combo chart, guage chart, scatter chart, grid chart, pie chart,
funnel chart etc.
29. What is Trellis chart?
Trellis: open the Trellis setting in chartproperties , you can create an array of charts
based on first dimension any type of bitmap chart can be made into trellis display.
a)We can enable trellis chart
b)Enable secondary Trellis Dimension
c)we can give no of columns to display in chart
30. What is Mini chart?
It is only available when the mini chart option has been selected in the expression page
of straight table properties dialog. Opens a dialog for setting the properties of the mini
chart
we can set mode type instead of values in table
mode are: sparklines, line with dots, dots, bars or whiskers we can set color also
31. How many dimensions can be used in bar chart
two
32. Which QV object has only expression, no dimension
List box, guage chart
33. Incremental load: incremental load is a very common task in relation to database. It is
defined as loading only new or changed records from the database. The rest should
already be available one way or another
34. Have you used macros in your application? What you have used?
we can use macros for various things
a)we can call the macro to reload the application
b)we can call the macro to create objects
35. What are the differences between Pivot table and straight table?
pivot data is grouped, partial sums can be shown in pivot table but not in straight table
36. What are the layers in QV?
The layer are set on the sheet object properties layout where bottom, top, normal
corresponding to the numbers -1,0,and 1 choose custom to enter value of your choice
valid layer numbers are -128 to 127.
37. Difference between QVD and QVW?
QVW: A qlikview file saved in binary format having the default expression QVW. Also
called Qlik View file.qvw file contains tables, charts script etc.
QVD: a native Qlik View file format, A QVD file contains one data table, no layout and
no security. It is basically a binary CSV file optimized for fast loading.
38. What is Interval Match?
the interval match prefix to load or select statement is used for linking discrete numeric
values to one or more numeric intervals
Ex. Intervalmatch(field)(load statement/select statement)
39. Cluster: for load balancing we have to install it with separate license when availability
small business server only we can install Clusters. It will give high availability to the
application( Zero Down time)
40. Charts and Uses:
1. Bar Chart: Comparison of similar measurements
Ex. a) Actual vs budget- money to money. Quarter to Quarter
b) Time to Time
c) Top N- categorized values(sales reps, customers etc)
avoid: comparisons with different units( $ and Qty)
2. line chart: measurements to follow its moments or comparisons among items
Ex. a) Performance trends- amount of moment over time
b) Two Dimension comparisons- Annual comparisons over month
3. Combo Charts: Comparisons for multi measurements
Ex. Two measurements- currency amount and quantity or amount percentage
two axis- different measurements on left and right axis
two or more axis: split axis horizontally
4. Radar chart: comparisons of high level groups
one or two measurements- sales and profit
avoid- a dimension with many values
5. Guage chart: Ratio of measurements
a)Percentages- margin,quota achieved, year-tot
b) Date vs last YTD.
Avoid: actual amounts
6. Mekko chart: Data using variable width bars
a) 3D measurement chart- Amount, Quantity and no. of customers
b) market analysis.
7. Scatter Chart: Measurement acts as dimensions(3D Chart)
a) 3D measurement chart- Amount, Quantity and no. of customers
b)map chart- see sales on Geographical map
8.Grid Chart: 2 or 3 Dimensions with a measurement
a)multi-cross dimensional measurements
b)amounts over- region and product and over time
9.Pie Chart: Visual Distribution measurements
Ex.a) what contributes how to the whole- regional sales
b)yes/no analysis
10. Funnel chart: Dimension that contain an expiration time line
Ex.a)how much is the most aging element
b)Sales opportunities
c)Product Inventory Expressions
11.Block chart: Distribution measurements within multi dimensions
Ex.a) what contributes how to whole and within each segments
b)sales contribution per country
12. Straight Table: one dimension with multiple measurements
Ex.a)KPI overview- cyclic group dimensions with sales Qty , margin
b) sort in any no of columns(no grouping)
13. Pivot table: multi dimensions with one or more measurements
a) grouping of dimensions
b) Dimensions across the table and displaying sub totals
First sorted value: It returns the first value of expression sorted by corresponding
sort weight. Sort weight should be a numeric value.
Uses: a) Get the latest field value based on time stamp
b) bigger customer for each product category
c) Find the min/max values and extract related field
d) Compare highest and second value
e)look up min/max value with in range
41. Interval match function(): it is use generate data buckets of different sizes
42. Extended Interval Match function(): It is used for slowly changing dimensions
43. Difference between Straight Table and Pivot Table
Pivot Straight
1) Multi-dimensional with one or more 1) one dimension with multiple
Measurements measurements
2) Displays Sub Totals 2) do not display sub totals
3) Pivot table will show cross table 3) cant show cross table
44. Relative Path: If we select Relative path, then we the work path is defined by directory
statement. If it is not selected, the path of the QVW defines work directory. The work
directory can be found in the system variable QVWORKROOT which should not be
changed manually.
45. Info Load: if a piece of external information, such as text file a picture, or multi media
presentation is to be linking information to field value to field value.
Ex: info load * from Fagoeed.csv;
46. What are the new features in QV 11
a) Container Object- Grid Style
b)Granular Chart Dimension Control
c)Actions like, clear filed, reset button
d)conditional enabling of dimensions and expressions
d)meta data
e)comparative analysis(multiple state selections)
47.
48.
50. New Features in Qlikview Server
i) Content Sensitive Help in access point
ii) Configurable LDAP
iii)audit logging by document
iv) Enable/Disable document download exporting and printing document and user
v) supporting task for QVD creation
vi) Distribution to Email with in a QVW document
vii) Alert Email to Document Administrators
Viii) License tracking
ix) Distribution and Reload Performance
x) Loop and Reduce
xi)Qlikview Management Console(QMC) user interface
xii) Reduction with log files
Xiii) Improved logging
xiv) QMC and QEMC are QMC
xv) Access point remake
xvi) Load Balancing Improved
51. Performance tuning in Qlik View:
Number of rows & columns: we should be selective about what fields are to be included
in the qlikview document and eliminate those fields which are currently not in used. We
can load five years of data in QV instead of loading 10 years of data.
Number of Distinct Values: Fields with distinct values use the most space. Using
count(distinct) forces QV to switch from using multicore to use only one core. Time
stamps with mins or seconds can be truncated to store only date thus reducing the
processing time.
Data Model: Qlik View can analyze multiple data sources but works most efficiently with
Star Schema or Snow flake Schema, The Star Schema Consists of few fact tables possibly
only one ,referencing any no. of dimension tables
User Interfaces: Resource intensive expression like count(distinct) if() should be
avoided. Set analysis should be used instead. Complex script should be done in script
rather than in charts/tables. Macros should be replaced by built in QV functions.
Expressions which are used frequently in more than one chart/table should be stored in
a variable which reduces the calculation time. Minimize the chart objects which are less
important as chart expressions in minimized objects are not calculated.
52. Schedule the report daily, monthly, weekly and involved in the BO report level testing
BO
a)Universe connection with Data Source
b)importing data from data source(tables)
c)create joins & contents
d) create hierarchies(year,month,quarter)
e) create more new objects, resolve the loops & same the universe in UNV format
f) check integrity and export to the repository
g)we can apply filters at universe level
Repository Domains:
1. Universe Domain
2.Document Domain
3. Security Domain
By the queries we will get data we will import data into designer
save the document and export to repository
53. Qlikviewvs Business Objects(BO)
Qlik View BO
1. Qlik View has strong community 1. Has poor Support
support and generally has vendor
support
2. Does not require data warehouse, 2. Requires Data Warehouse and a full
time to go- line trends to be much scale long term project
shorter than BO(QV claims of the
time)
3. Has a pack and go solution of for 3. Has no pack and go solution and very
offline work and supports smart partial smart phone support(only for
phones, iphones, ipads web reporting tool)
4. Has both a web-only(AJAX) and 4. Uses web browser as its only client
client application, the later tending application
to provide significantly better
performance
54. Important Functions
1. Mapping and Apply Map:
Mapping: Syntax: mapping(load statement/select statement)
mapping load * inline
[
x, y
us, usa
u.s, USA
America, USA
];
i)Mapping prefix to load or select statement is used to mapping certain field values
or expression to the values in the first column of mapping tables. A mapping table
contains one or two columns, the first containing comparison values and the second
contain the desired values. They store temporarily in memory and dropped
automatically after script execution.
ii) Sometimes you need to add an extra field to a table or you want field to clean up data
structure. In that cases mapping loads are used. In case of combination of fields from
different tables also we use mapping tables.
This function comes with combination of
* map. Using
* un map
* Apply Map( map name, expr[default statement])
*map sub string(map name, expr)
Map . Using
ex. map country using cmap (enables mapping of field country using map cmap)
Un Map
Ex. un map country (disables mapping of field country)
Apply map:
Syntax: Apply Map( map name, expr[default statement])
ex. map1:
Mapping load * inline
[
x, y
1, one
2, two
3, three
];
Applymap(map1,2) returns 2
Applymap(map1,5,xxx) returns xxx
Applymap(map1,5, NULL) returns NULL
It is used for mapping any expression to a previously loaded mapping table.
Map Sub String: used to map part of exp to a previously loaded mapping table
syntax. mapsubstring(mapname expr)
ex. map1:
mapping load * inline [ x, y
1, <one>
aa, XYZ
x, b ] ;
MapSubstring ('map1', 'A123') returns 'A<one>23'
MapSubstring ('map1', 'baaar') returns 'bXYZar'
MapSubstring ('map1', 'xaa1') returns 'bXYZ<one>'
55. QVD
QVD: A QVD consists of layout, script, Data, Data model
QVD Optimized: The QVD which doesnt have any transformations or calculations is
called QVD optimized/ Super-Fast QVD
QVDUnoptimized: The QVD has any transformations or calculations is called QVD Un
optimized/ Stand Fast QVD
Difference between Optimized and Un optimized: When retrieving from QVD optimized
mode mode is upto 100* quicker-only works if you follow set of rules.
What is QVD?
A QVD (Qlik View Data) file is a file containing a table of data exported from Qlik View.
QVD is a native Qlik View format and can be written to and read by Qlik View. The file
format is optimized for speed when reading data from a Qlik view but it is still very
compact reading data from Qlikview data(QVD) file is typically 10-100 times faster than
reading data from other sources.
A QVD File holds exactly one data table and commits 3 parts
1. A Well formed XML header describing the fields in the table the layout of the sub
sequent information and some other meta data.
2. Symbol table in a byte stuffed format
3. Actual table data in a bit stuffed format
Ex. Store * from categories into path\categories.qvd(qvd)
Purpose and Use of QVD files
1) To increase load speed
2) Decreasing load on database servers
3)Consolidating data from multiple Qlikview files/ Applications
4)Incremental Load
5)Easy of Maintenance
6)Separation of Roles
Types of QVD Creation
1. By using Store command
2.By using buffer before load/select
3.via UI-[chart export] and go to object export
QVX: it is new with QV-10 (Qlikview Data Exchange)
1. Open variant of QVD
2.Not as quick as fast as QVD
3.may be used to create high performance input files from sources where ODBC Drivers
are not available.
4. Read by standard load scripts
5. It can be created by another softwares which does not doesnt support ODBC and
also we can create in QV as same as QVD
Store * from categories into path\categories.qvx
QVD Architecture
Three types:
1. Single Tier Model
2. Two Tier Model
3.Three Tier Model
Master QVD:
56. Section Access:
Section Access can be used to set access restrictions to data, sheets and sheet objects.
Access rights and user levels are defined in the section access part of the script.
why use of section access:
a) To protect your data from un authorized access
b) To limit what data authorized users can see and what they can do
Insert Section Access inline
by using inline table only we can give section access
Section Access: to give the credentials to the security
[Ex: Userid, password]
Section Application: To apply the section access to the given application or these
credentials will apply to the application. This process is called rowlevel& column level
security in Developer level.
57. Prohibit binary load: if this option is selected it is not possible to load data from
documents QVW file via a binary statement in another Qlikview Document. Initial data
reduction is based on section access
58. Set Analysis
Set Analysis aggregates the data based on the current selection
Agg Ex: Sum, AVG, Min, Max
Normal syntax :Sum(Sales)
Set analysis basic syntax : Sum({$} Sales)
a) there is no set analysis without aggregation function
b)can create sets based on other sets
c)always begin and end with curly brackets { }
d)conceptually similar to the selection
Why Set Analysis:
a)Very powerful functionality for comparison analysis
* this year vs last year
* products purchased vs not purchased
b)may eliminate the need for additional, complex coding with in an application
c)provides much more flexibility in the analysis QV can create(expression can be added for data outside
of your current selection criteria)
How Set Analysis:
The syntax is broken into 3 categories
1) Identifiers -
0 - Represents an empty set
1 - Represents the full set of all the records in the application
$ - Represents the records of the current selection
$1 - Represents the previous selection
$_1 - Represents the next (forward) selection
Bookmark01 - Represents the bookmark ID or the bookmark name
2)Operators-
+(Union)- Returns the set of all records that belong to the union sets
-(exclusion)- Returns the records that belong to the first not other of the
two set identifiers.
*(intersection)- Return the records that belong to the both of the set
identifiers.
/(symmetric Difference)- Returns the set that belongs to either but not both of the set
identifiers
3)Modifiers- Ex Category Name, Babywear office, modifiers begin and end with angle brackets
<> the modifiers consists of one or more several field names. Each followed by selections
that can be made in the field.
Ex: sum({$<orderdate = Deliverydate>} sales)
p() function: sum( {$<customer = p({<products= {shoe}>customer)>}sales)
(the element p returns all possible customers)
E() function: sum({$<customer= E({<products={shoe}>}>}sales)
(The element E() here returns a list of excluded customers.)
59. Functions
Including Mapping(), Apply map() map using(), map substring() we have some more
functions
Inter Record Functions:
These functions are used when a value from previously loaded records of data is
needed for the evaluation of the current record.
exist() exist( field,[, expression])
it determines whether a specific field values exists in a specified of the data loaded so
far exist(month, jan)
previous() Previous(expression)
it returns the value of expression using data from previous input record that was not
discarded due to where clause.
Load *, Sales / previous(Sales) as Increase from ...;
Load A, previous(previous( A )) as B from ...;
Peek() peek(fieldname [ , row [ , tablename ] ] )
Returns the contents of the fieldname in the record specified by row in the internal table
tablename.
Fieldname must be given as a string ( ).
peek( 'Sales' )
returns the value of Sales in the previous record read
peek( 'Sales', 2 )
returns the value of Sales from the third record read from the current internal table.
peek( 'Sales', 0, 'Tab1' )
returns the value of Sales from the first record read into the input table labeled Tab1.
FieldValue(): FieldValue(fieldname , n )
Returns the field value found in position n of the field fieldname
ex. FieldValue( 'HelpText', 5 )
FieldIndex( ): FieldIndex(fieldname , value )
Returns the position of the field value value found in the field fieldname
Ex.FieldIndex( 'Name', 'John Doe' )
lookup()lookup(fieldname, matchfieldname, matchfieldvalue [, tablename])
Returns the value of fieldname corresponding to the first occurrence of the value
matchfieldvalue in the field matchfieldname.(The strings for fieldname, matchfield
name.Tablename.
lookup('Price', 'ProductID', InvoicedProd, 'pricelist')
All above are inter record functions
Chart field functions:
getcurrentfield (): getcurrentfield (GroupName)
Returns the name of the currently active field in a group.
Ex. getcurrentfield(myGroup )
getfieldselections ( ): getfieldselections (FieldName [, ValueSep [, MaxValues]])
Returns a string with the current selections in a field
getfieldselections ( Year )
getfieldselections ( Year, '; ' )
getfieldselections ( Year, '; ' , 10 )
Getcurrentselections():getcurrentselections ([RecordSep [, TagSep [,ValueSep [, MaxValues]]]])
Returns a string with the current selections in the document.
Ex. getcurrentselections( chr(13)&chr(10) , ' = ' )
getselectedcount ()getselectedcount (FieldName [, IncludeExcluded])
Returns the current number of selected values in a field.
Ex. getselectedcount( Year )
getselectedcount ( Year, true( ) )
getnotselectedcount (): getnotselectedcount (FieldName [, IncludeExcluded])
Returns the current number of not-selected values in a field in a field
EX. getnotselectedcount( Year )
getnotselectedcount (Year,true())
getpossiblecount (): getpossiblecount (FieldName)
Returns the current number of possible values in a field.
Example: getpossiblecount( Year )
getexcludedcount ():getexcludedcount (FieldName)
Returns the current number of excluded values in a field.
Example: getexcludedcount( Year )
getalternativecount ():getalternativecount (FieldName)
Returns the current number of alternative values in a field.
Example: getalternativecount( Year )
Aggregation Functions
These functions can only be used in field lists for Load statements with a group by clause
There are Seven Types:
Basic Aggregation Functions
1. sum([distinct]expression)
Returns the sum of expression over a number of records as defined by a group by
clause.
Example:
Load Month, sum(Sales) as SalesPerMonth
from abc.csv group by month;
2. min( expression[, rank] )
Returns the minimum numeric value of expression encountered over a number of
records as defined by a group by clause.
Examples:
Load Month, min(Sales) as SmallestSalePerMonth from abc.csv group by Month;
3. max( expression[, rank] )
Returns the maximum numeric value of expression encountered over a number of
records as defined by a group by clause.
Examples:
Load Month, max(Sales) as LargestSalePerMonth from abc.csv group by Month;
4. only(expression)
If expression over a number of records, as defined by a group by clause, contains only
one numeric value, that value is returned. Else, NULL is returned.
Example:
Load Month, only(Price) as OnlyPriceSoldFor from abc.csv group by Month;
5. mode(expression )
Returns the mode value, i.e. the most commonly occurring value, of expression over
anumber of records, as defined by a group by clause. If more than one value is equally
commonly occurring, NULL is returned.
Examples:
Load Month, mode( ErrorNumber ) as MostCommonErrorNumber from abc.csv group
byMonth;
6. firstsortedvalue ([ distinct ] expression [, sort-weight [, n ]])
Returns the first value of expression sorted by corresponding sort-weight when
expression is iterated over a number of records as defined by a group by clause.
Example:
Load Customer, firstsortedvalue(PurchasedArticle, OrderDate) as FirstProductBought
from abc.csv group by Customer;
Counter Functions
1. autonumber(expression[ , AutoID])
Returns a unique integer value for each distinct evaluated value of expression
encountered during the script execution. This function can be used e.g. for creating a
compact memory representation of a complex key.
In order to create multiple counter instances if the autonumber function is used on
different keys within the script, an optional parameter AutoID can be used for naming
each counter.
Examples:
autonumber( Region&Year&Month )
2. autonumberhash128(expression {, expression})
Calculates a 128-bit hash of the combined input expression values and the returns a
unique integer value for each distinct hash value encountered during the script
execution. Example:
autonumberhash128 ( Region, Year, Month )
3. autonumberhash256(expression {, expression})
Calculates a 256-bit hash of the combined input expression values and returns a unique
integer value for each distinct hash value encountered during the script
execution.Example:
Autonumberhash256 ( Region, Year, Month )
4. fieldvaluecount(fieldname)
Returns the number of distinct values in a field. Fieldname must be given as a string
(e.g.a quoted literal).
Example:
let x = fieldvaluecount('Alfa');
Conditional Functions:
1. if(condition , then , else)
The three parameters condition, then and else are all expressions. The first one,
condition, is interpreted logically. The two other ones, then and else, can be of any type.
They should preferably be of the same type. If condition is true, the function returns the
value of the expression then. If condition is false, the function returns the value of the
expression else.
Example:
if( Amount>= 0, 'OK', 'Alarm' )
2. alt(case1[ , case2 , case3 , ...] , else)
The alt function returns the first of the parameters that has a valid number
representation. If no such match is found, the last parameter will be returned. Any
number of parameters can be used.
Example:
alt( date#( dat , 'YYYY/MM/DD' )
date#( dat , 'MM/DD/YYYY' )
date#( dat , 'MM/DD/YY' ),'No valid date' )
Will test if the field date contains a date according to any of the three specified date
formats. If so, it will return the original string and a valid number representation of a
date. If no match is found, the text 'No valid date' will be returned (without any valid
number representation).
3. pick(n, expr1[ , expr2,...exprN])
Returns the n:th expression in the list. n is an integer between 1 and N.
Example:
pick( N'A''B'4, , , )
returns 'B' if N = 2
returns 4 if N = 3
4. match(str, expr1 [ , expr2,...exprN ] )
The match function performs a case sensitive comparison.
Example:
match( M, 'Jan','Feb','Mar')
returns 2 if M = Feb
returns 0 if M = Apr or jan
5. class(expression, interval [ , label [ , offset ]])
Creates a classification of expressions.
Examples:
class( var,10 ) with var = 23 returns '20<=x<30'
class( var,5,'value' ) with var = 23 returns '20<= value <25'
Data Warehouse
1. What is meta data?
Meta data is data about data Eg. If in data mart we are receiving any file, then meta
data will contain information like how many columns file is fix width limited ordering
fields data types of fields etc.
2. What is Data Warehouse?
A data Warehouse is a relational database that is designed for query and analysis
rather than transaction processing. It is usually contain historical data derived from
transactional data but it can include data from other sources.
It is Subject oriented, Integrated, Time Varying, Non Volatile collection of data. That
is used primarily in organizational decision making.
3. Difference between operational Database and Datawarehouse
OLTP OLAP
1.It is designed to support operational 1.It is designed to support Decision
monitoring making process
2. Data is Volatile 2. Data is Non Volatile
3.It contains only current information 3. it contains historical and current
4.It is designed to run the business 4. it is designed to analyze the business
5.it is clerical view transactions 5.it is business view (business)
4. What is schema?
It is collection of objects[table, view, procedure, function]
Schema Types:- Star Schema, Snowflake Schema, Fact Constellation Schema
Star Schema: one fact table with dimension tables
snowflake schema: It is an extension of star schema where the dimension tables are
further connected to one or more dimensions.
Fact Constellation Schema: Fact Constellation schema is an extended and
decomposed star schema[multiple fact table that contains dimension tables
5. Types of Dimensions: Four types namely
a) Confirmed Dimension: A Confirmed dimension is a dimension that is shared across
fact tables
6.
b) Junk/Dirty Dimensions: These dimensions that contain miscellaneous data(like
Flags and Indicators) They do not fit in the base dimension table
7.
c)Degenerated Dimensions: If a table contain the values which are neither
dimension nor measure is called Degenerated Dimension[Ex. Invoice, Empno]
8.
d)Slowly changing dimensions: Dimensions which are changing over a period of time
called slowly changing dimensions.
In Real time Answers:
Star Schema: Star Schema is one of the data modeling technique, which includes one
fact table connected to multiple dimensions
fact: fact has measures like sales, quantity, Unit Price, Goods Sold..
Dimension: Dimension has descriptive data like location executive details, company
name, product which doesnt include any measures.
Snowflake Schema: Snowflake Schema is an extension of star schema. Snow flake
schema has one or more fact tables with multiple dimensions connected to it where
the dimension tables are further connected to one or more dimensions.