Section Access in OBIEE 12c - weblogic12c

I'm trying to Implement Section Access in OBIEE 12c . I referred a Blog and followed the steps to Implement Section Access . But the End Result is not as Expected .
Blog Link : http://bisimplified.blogspot.com/2014/06/obiee-11g-datarow-level-security.html
First I created "User_1" and Assigned that user to "BI Consumer" Application Role.
I want to display only certain data to the "User_1".
Created Initialization Block .
This is the SQL Statement I used to define the Initialization Block ( Data Source ) :
select pc.category_name from dim_category ft , product_categories pc where ft.category_id=pc.category_id and lower(ft.username) = lower(':USER') .
(Screenshot of Initialization Block created )
I assigned 'default' (String) to Default Initializer and Check in the " Row-Wise Initialization" and "Use Caching" ( Initialization Block (Block we are working on ) -> Edit Variable Target -> New ( Variable )) .
(Screenshot of Session Variable created)
Else , an error prompted at the assigning the Section variable to the Application Role / User , if the Default Initializer is left empty .
(Screenshot of Error Message if the Default Initializer left empty and try to assign that Section variable to the Application Role / User ).
Is there anything to be done with Session Variable ?
After that I assign this Session Variable to the "BI Consumer " Application Role .
(Screenshot of Assigning Session Variable to "BI Consumer" Application Role )
I request to give suggestion on " Implementing Section Access " in OBIEE 12c or if there is anything you like to Add in the above steps please correct me.

Consolidated answer for general knowledge: "Section Access" is a misnomer. The intent is "row-level security".
The problem mentioned with the query above stems primarily from the usage of ':USER' which most likely is "weblogic" and who owns/has no data for that query.
The query must be validated using a user account which actually brings back data.
Secondly, since the query is set to row-wise initialization it must bring back value pairs representing the variable name and an actual value.
Section_Variable | CategoryA
Section_Variable | CategoryB
etc
So the SQL must pull
select
'Section_Variable',
ft.category_name
from
.....

Related

Azure Data Factory - Capture error details of a dataflow activity -> Store into a variable -> Assign this variable to a dataflow parameter

I have a data flow and my requirement is to capture the error details into a variable when it fails and assign this variable to a parameter in the next data flow. I tried to achieve this until the second stage(With help) as below, but I'm unable to get this variable assigned to a parameter in the next data flow. The error I get is - Expression cannot be parsed
What do I do later?
This parameter is assigned to a column in the data flow and I use this column to update the table in the dedicated pool with the relevant error message.
I tried to reproduce the same in my environment and I got the same error
The above scenario fails, because dataflow fails to parse ' ' and / in your error message.
To resolve above error,please follow below steps:
I just create the error fail1 with message containing a different character.
Go to set variable : Create a variable and added dynamic content to the value.
#replace(replace(string(activity('Fail1').output.message),pipeline().parameters.quote,'"'),'\','/')
Output:
Updated:
Parameter

Debugging values into variables or user properties

How can I spy into my values when I'm on ADF debug mode ?
I want to build a simple pipeline that digs into a storage account table. For each row, enter the value of the second column, use it to create a URL and call a web service.
I saw the output of the Lookup command but how can I saw, for example, the content of each input() into the foreach activity. Can I used the user properties for debugging reason ?
When debugging, I frequently make use of the 'Set Variable' activity. Viewing the output of a 'Set Variable' activity is spying on the value.
You want to see the input to each iteration of your ForEach. Prepend the inner activity with a Set Variable activity. Dynamic content #string(item()) should be enough.

How do you find out the current size of an SQLDB instance in Bluemix

How do you know the current size of an SQLDB? Normally with DB2 I would check how much diskspace there is left to understand if the database is starting to get full. But as I don't have access to the file system I would like to know what the recommended alternative method is.
Best Regards
W
There is a built-in routine that might be able to help you:
CALL GET_DBSIZE_INFO(?, ?, ?, -1)
You can see more information about the routine on the IBM Knowledge Center. The routine above would return something like this, for example:
Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2004-02-29-18.31.55.178000
Parameter Name : DATABASESIZE
Parameter Value : 22302720
Parameter Name : DATABASECAPACITY
Parameter Value : 4684793856
Return Status = 0
You can find the SQLDB usage details by clicking the Profile Settings icon in the upper-right corner of the Bluemix user interface and selecting Account -> Usage Details. If you expand Service Charges, you should see your db instance listed with a $$ figure denoted. On the right, you can expand the twistie and you should be able to see your current usage in GBs.

What are the rules for a valid variable name in mirth?

I am trying to set up a transformer on a Database Reader to file writer channel. I am reading in a sql field called MRN which I would like to send to a variable called mrn. I added a step to a channel with a variable called tmp['MSH'] mapping to a variable called msg['MSH'] But mirth is giving me the error message:
The variable name contains invalid characters. Please enter a new variable name
What are the rules for a valid variable name in mirth?
tmp and msg are two built-in variables containing E4X mappings of the outbound template and inbound message, respectively. You would map, via a MessageBuilder step, from inbound to outbound with tmp['MSH'][...] = msg['MSH']... where ... refers to the appropriate sections. Essentially these are pre-populated javascript property arrays.
If you really want to create a variable for use in multiple places, the rules are alphanumeric plus '_', I believe.
In a MessageBuilder step, you could refer to a previously created variable with ${varname}.
I would recommend investing a little time in getting familiar with the basics. Documentation is wanting, to be sure, but this blog post series are a good place to start.

How do I create a manual link on a tree in Oracle APEX when Session State Protection is turned on?

Friends,
I'm facing another challenge in APEX and I hope you can help.
I have created a tree using the method described in John & Scott's superb book, "Pro Application Express" whereby the page link is stored in a table. Below is an example:
go to a page passing some parameters
f?p=&APP_ID.:3:&SESSION.::::P3_IDENTIFIER,P3_FAMILY_NAME:&P2_IDENTIFIER.,&P2_FAMILY_NAME.
When the page is run this works as expected. I can expand the tree and navigate to the page passing parameters if required.
However when I turned on session state protection these "hand crafted" links stopped working. Which I expected because the link contains no checksum.
After some investigation I see I have to use APEX_UTIL.PREPARE_URL to generate the URL with a checksum. Unfortunately this is where I run into problems. I can't seem to be able to pass the parameters values to the calling page.
The original tree query was:
select "IDENTIFIER" id,
"PARENT_IDENTIFIER" pid,
"TITLE" name,
"LINK" link,
null a1,
null a2
from <some table>
I then changed this to use APEX_UTIL.PREPARE_URL:
....
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID||':3:'||:APP_SESSION||'::::P3_IDENTIFIER,P3_FAMILY_NAME:&P2_IDENTIFIER.,&P2_FAMILY_NAME.') link,
...
and this works, the page is called and I can see the values of the parameters passed. But I can't use this method as it is restricted to the one page!
Finally I tried storing the page number, parameters and parameter values in different columns of the table that the tree is based on and then bring them together:
...
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID||':'||navigate_to_page||':'||:APP_SESSION||'::::'||parameters||':'||parameter_values) link,
...
Where:
navigate to page has the value of: 3
parameters has the value of: P3_IDENTIFIER,P3_FAMILY_NAME
parameter_values has the values of: &P2_IDENTIFIER.,&P2_FAMILY_NAME.
This now calls the page, but the parameter values have become literals. so where I'm expecting an identifier I see &P2_IDENTIFIER and ditto for family name.
What am I doing wrong? How can I pass values to my called page using apex_util_prepare_url?
In case of need, my environment details are: Apex 3.2.1, Oracle Application Server 10.1.2.3. Oracle Database 10.2.0.3
Thanks in advance for any help you may be able to provide.
I think you'll need to resolve those variables, using the v() function:
APEX_UTIL.PREPARE_URL('f?p='||:APP_ID
||':'||navigate_to_page
||':'||:APP_SESSION
||'::::'||parameters
||':'||v('P2_IDENTIFIER')||','||v('P2_FAMILY_NAME')) link,
On a side note, you might need to be careful about P2_FAMILY_NAME since it's being used in the url; it sounds like a plain text field which contains user-entered data?