Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabbar
Specialist
Specialist

Section access Not working as Required/Intended

I am Currently Trying to do section access,
I am doing this by creating a table with all required Fields like:-

Gabbar_0-1685516873238.png


Now i am using this Table as resident to create section access for every user like:-

Gabbar_0-1685517070432.png


But In user Data is coming like this:-

Gabbar_1-1685517135482.png

In this, the first Row where Both the Fields are NA is what i dont want,
So i thought there must be some error in my where clause, So i tried seperating the OR statement in where clause
i did it like this to test: -

Gabbar_2-1685517570095.png

and it correctly works and shows 1 row :-

Gabbar_3-1685517606927.png

 

So I thought there must be some error with my other clause:-
So i tried:-

Gabbar_4-1685517651419.png

 


But it also shows expected Data like:-

Gabbar_1-1685517497901.png

So as in hurry i tried to keep them separate and then Concatenate them but result still comes like:-
the first one where both the Columns have a row with 'NA' in them.

I tried to check that if there is another linking by dropping the fact table and removing Section access Command From  script but only to find that the table is Island table so all the required field are also simply present in 1 main fact table.

please help.

Labels (2)
8 Replies
Gabbar
Specialist
Specialist
Author

Kushal_Chawda

@Gabbar  It will be difficult to say without looking at data but as per what I understood you can try below. Basically first condition gets rid of both NA then append the actual or condition

where (LICENSE_TYPE<>'NA' or SAMPLE_AUTHORITY<>'NA') and ( LICENSE_TYPE='STATE_LICENSE' or SAMPLE_AUTHORITY='STATE_AUTHORITY');

Gabbar
Specialist
Specialist
Author

Thanks @Kushal_Chawda  but your where clause is also generating 'NA' in both the fields.


what i want i when License_type is State license then Sample_authority Should be 'NA', 
or when Sample_authority is state authority then license_type can be anything,
These columns are only available in my Fact_Table.

I also tried using Inline load and using CSV/QVD as a file to do it, it still didnt work,
i just dont know why is this happening.

Kushal_Chawda

@Gabbar  what should be the output of below data?

Load * Inline [
LICENSE_TYPE,SAMPLE_AUTHORITY
STATE_LICENSE,NA
STATE_LICENSE,STATE_AUTHORITY
NA,STATE_AUTHORITY
NA,NA
X,NA
Y,STATE_AUTHORITY
STATE_LICENSE,Y
];

Gabbar
Specialist
Specialist
Author

It is an inline load so what you have given as input is the output.

Kushal_Chawda

@Gabbar  Basically I want to know how your input data looks like and what should be the outcome of that after putting your condition.

Gabbar
Specialist
Specialist
Author

The input i am giving using Inline Load(Tried Using Excel and QVD File too ) is :-

ACCESS USERID REGION_NAME SA_STATE LICENSE_TYPE SAMPLE_AUTHORITY
USER GOA NA GOA NA STATE_AUTHORITY
USER GOA NA GOA STATE_LICENSE NA
USER GOA NA GOA STATE_LICENSE STATE_AUTHORITY




The Output It generating Is:-

ACCESS USERID REGION_NAME SA_STATE LICENSE_TYPE SAMPLE_AUTHORITY
USER FSSAIANALYTICS\FSC_GOA NA GOA NA STATE_AUTHORITY
USER FSSAIANALYTICS\FSC_GOA NA GOA STATE_LICENSE NA
USER FSSAIANALYTICS\FSC_GOA NA GOA STATE_LICENSE STATE_AUTHORITY
USER FSSAIANALYTICS\FSC_GOA NA GOA NA NA



The Last row Generated is causing problems.

 

 

 

Gabbar
Specialist
Specialist
Author

@Kushal_Chawda  Thanks For the help,

I solved it by merging the Sample and License column in 1 Column and using that column, and aligning it with the data,
But i still dont understand why that problem was arising.
I know from which data was being shown extra due to the problem so i just loaded only that portion but then it worked perfectly.
I will try manual debugging of data now, will update if i get to know the problem,
Thanks again.