Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am Currently Trying to do section access,
I am doing this by creating a table with all required Fields like:-
Now i am using this Table as resident to create section access for every user like:-
But In user Data is coming like this:-
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: -
and it correctly works and shows 1 row :-
So I thought there must be some error with my other clause:-
So i tried:-
But it also shows expected Data like:-
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.
@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');
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.
@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
];
It is an inline load so what you have given as input is the output.
@Gabbar Basically I want to know how your input data looks like and what should be the outcome of that after putting your condition.
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.
@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.