npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

set-analysis-parser

v0.0.1

Published

BNF Parser for Set Analysis expressions in QlikView and Qlik Sense.

Downloads

3

Readme

set-analysis-parser

BNF Parser for Set Analysis expressions in QlikView and Qlik Sense.

(Table of contents generated by [verb])

This is work in progress, read below.

About this project

Why?

The backbone of the new Set Analysis Wizard will be a parser which is able to parse and therefore "decode" existing Set Analysis statements into a structure which can be used in programmatic way. This is not only beneficial for the Set Analysis Wizard but instead this parser could be used in many other projects.

Semantic Sugar Layer

On top of that it is the goal to return a descriptive explanation of a Set Analysis statement.

For example:

The goal is that you can paste in the following expression

Sum({$<Customer=P({1<Product={'Shoe'}>}Customer)>}Sales)

and you'll get back the following description

Returns the Sum of Sales for the current selection, but only for those customers that have bought the product "Shoe".

The Parser

I have chosen to use Jison to parse existing Set Analysis statements.

If you have a look into the online documentation of Qlik Sense, you'll find the BNF syntax for sets there:

// Added entry point
definition ::= aggr_type ( set_expression field_expression )

// From the online help
// http://help.qlik.com/sense/2.0/en-US/online/Subsystems/Hub/Content/ChartFunctions/SetAnalysis/syntax-for-sets.htm
set_expression ::= { set_entity { set_operator set_entity } }
set_entity ::= set_identifier [ set_modifier ]
set_identifier ::= 1 | $ | $N | $_N | bookmark_id | bookmark_name
set_operator ::= + | - | * | /
set_modifier ::= < field_selection {, field_selection } >
field_selection ::= field_name [ = | += | ¬–= | *= | /= ] element_set_expression
element_set_expression ::= element_set { set_operator element_set }
element_set ::= [ field_name ] | { element_list } | element_function
element_list ::= element { , element }
element_function ::= ( P | E ) ( [ set_expression ] [ field_name ] )
element ::= field_value | " search_mask "

Test

First install dependencies: npm install

Then run the Mocha tests: npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

At the current state of the project ("very early beginning") I am seeking for some help:

  • I need as many Set Analysis statements to prove parser
    • Commit them to test/expressions.txt or create an issue
  • Help to write the parser
  • Finally I'd like to create a web-page where you paste in an existing Set Analysis statement and you would just get the semantic description returned.

Related projects

Some related projects (Qlik Sense Visualization Extensions) I have recently created:

set-analysis-wizard: The well known Set Analysis Wizard for QlikView and Qlik Sense. | homepage

Author

Stefan Walther

License

Copyright © 2015 Stefan Walther Released under the GNU General Public License license.


This file was generated by verb-cli on October 29, 2015.