New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only use the table names from "GetTableAndKeys" #123

merged 1 commit into from Feb 11, 2019


None yet
3 participants
Copy link

FredrikFolkesson commented Feb 6, 2019

This fixes #122

Now you get the same tables that you get in Qlik Sense

There seems to be a mismatch between the tables that are included by using GetTableAndKeys and when using this hypercube

	object, _ := doc.CreateSessionObject(ctx, &enigma.GenericObjectProperties{
		Info: &enigma.NxInfo{
			Type: "my-pivot-hypercube",
		HyperCubeDef: &enigma.HyperCubeDef{
			Dimensions: []*enigma.NxDimension{
					Def: &enigma.NxInlineDimensionDef{
						FieldDefs:     []string{"=$Field"},
						SortCriterias: []*enigma.SortCriteria{{SortByExpression: -1, Expression: &enigma.ValueExpr{V: "=count($Table)"}}},
					Def: &enigma.NxInlineDimensionDef{
						FieldDefs:     []string{"=$Table"},
						SortCriterias: []*enigma.SortCriteria{{SortByExpression: -1, Expression: &enigma.ValueExpr{V: "=count($Field)"}}},
			Measures: []*enigma.NxMeasure{
				createMeasureSortNumeric("=sum($Rows)", &enigma.SortCriteria{SortByNumeric: -1}),

			InitialDataFetch: []*enigma.NxPage{{
				Height: 1000,
				Width:  1000,
			Mode:         "P",
			NoOfLeftDims: &noOfLeftDims,

I think the later one returns a few system tables? that I think should not be included (if we want to include them we will have to handle this in another way so corectl does not crash when there is a system table that has no table record)

In the Sales_Anaylsis.qvf app it was the tables: _tabToday,Dimensions,Measures that was the problem.

@FredrikFolkesson FredrikFolkesson requested review from wennmo and peol Feb 6, 2019


peol approved these changes Feb 8, 2019

Copy link

peol left a comment

LGTM. Perhaps double check with Björn H. that this is the intended behavior?

Copy link

wennmo left a comment

Can you also add an integration test for the meta command? This change affects that command and it is currently not covered.

Otherwise it looks good to me 👍

@FredrikFolkesson FredrikFolkesson merged commit 528cdfd into master Feb 11, 2019

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
cla/verification CLA OK

@wennmo wennmo deleted the fix-sales-analysis-bug branch Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment