Tuesday, 23 May 2017

SAP BODS Notes-Part1

Architecture:
SAP Business Objects Data Services is a data warehousing product that delivers a single enterprise-class software solution for data integration (ETL), data management (data quality) and text data processing(unstructured text like emails, paragraphs etc,)

DS Components
Ø  Designer:  Designer is used to create datastores and data mappings, to manage metadata and to manually execute jobs. This is the front end GUI (Graphical User Interface) tool where developers can login and build the jobs in SAP Data Services to move the data from one system to other or with in the system and define the logic for transformations. It is the place where we develop, validate and execute the ETL jobs. We can connect to the central repository only through designer. We can import and export the jobs to file or repository from designer as well.
Ø  Management Console: It is a web based console for managing SAP Data Services like scheduling the jobs, looking at system statistics on memory usage, runtime of jobs, CPU utilization etc.
Ø  Repository: SAP Data Services is a software application and needs backup database to store the developed objects created by individual developers as well as system generated metadata. Repositories are used to store all this data and these repositories can be created in any database like Oracle, HANA, MS SQL and MySQL.
Note: We cannot open data services designer without selecting the repository while login.
We have 3 different types of repositories in Data Services namely Local, Central and Profiler.
Local Repository: This is mandatory repository in Data Services, at least one local repository is required to be setup before start using Data Services system. Usually individual local repositories are created for each developer in the system to store all his/her developments. The connection to the database server is also created in the local repository only.  We call it as data store.
Central Repository: This is required to have more security and integration between different developments in multi user environment. When we have multiple developers working in same development, this type of repository is recommended because of its robust version control and users can access the objects by using check-out and check-in functionality for this purpose which is similar to locking (when one user is accessing an application, it can’t be accessed by any other user.). This is an optional repository in the system.
Profiler Repository: This is used to store the data profiling information performed by developers and also tasks history. This is an optional in the system.That is used to determine the quality of data.
Ø  Job Server:  Each Repository is associated with one or more DI Job Servers. This is one of the main server component in data services and is used to execute all the batch jobs created by developers in the system. Repositories should be attached to at least to one job server to execute the jobs in the repository, otherwise developer cannot execute the jobs. The job server consists of .bat files (contains jobs) and its work is to start the job engine which executes jobs. SAP Data Services Job Server can move data in either batch or real-time mode and uses distributed query optimization, multi-threading, in-memory caching, in-memory data transformations, and parallel processing to deliver high data throughput and scalability.
Ø  Job Engine: It executes the requested jobs.
Ø  Access Server: This server is used to execute the real-time jobs created by developers in the repositories. This is used for DI Real-time service jobs. This Server controls the XML message passing between the source and target nodes in Real-Time jobs.
Ø  Address Server: This server is used to perform data quality and data cleansing activities in data services. This is also associated with Address directories and dictionaries which are required for data cleansing.
Ø  Web Server: This is used for the administration activities. We can schedule jobs, execute jobs, creating users etc., are the tasks that can be done through this server.
Ø  CMC (Central Management Console): This web based tool for managing data services users, repositories configurations to jobs servers and security management etc.
Ø  Data Services. Service Names- start al_Designer,al_jobserver, al_jobservice

DS Objects Hierarchy:

Ø  Projects: Project is It is the highest level of hierarchy in which we create jobs. It is used to group the jobs relevant to an individual process or application. Having the jobs grouped under projects makes it easy to maintain the objects in the system. We can have multiple projects created in the same repository. Only one project can be opened at a time in project area in designer.
Ø  Jobs: Job is the only executable object in SAP Data Services. It can contain any number of workflows, data flows, scripts and conditions. Developers can manually execute the jobs in designer or can be scheduled using management console.
Ø  Workflow: Workflow is used to define the data flow execution sequence with the help of conditional operations. It is an optional object where we create different data flows, scripts. Let’s say if we have 5 data flows in a job out of which 2 has to run daily and 3 has to run on month end. We can define two workflow to group the data flows and then write the condition based on calendar date to define execution process. Workflows are majorly used to organize the data flows within a job and it’s not mandatory to have work flows in the job.
Ø  Conditionals: Conditionals are single use objects to implement if-then-else logic in a work flow to control the execution process.
Ø  Scripts: Scripts are single used objects to call functions, define values to variable, manipulating the tables at database level in a work flow. Scripts cannot be created in data flows. External required logic which is not built through BODS can be developed by writing scripts. One of the example is maintaining job control, which requires scripts to be defined to pick the start time, end time and insert into a database table.
Ø  Dataflow: Data Flow contains actual source and target objects along with the transformations defined. This is the most important object of the hierarchy where we create our mapping. This is where we define everything about data movement like source table, target table, transformation logic. Once the data flow is created we can include it either in a job or in a workflow (and then into job) to execute the ETL process.
Ø  Datastore: Datastores are defined to access any system and use it as either source or target. We can create Datastores for most of the applications, databases and software’s available in the industry.
Ø  File Formats: If the source or target is some external file like flat files, excel workbooks, xml files then we can configure this using File Formats option in Data Services. Once the file formats are defined we can use it as either source or target.
Transforms:
 A transform enables you to control how datasets change in a dataflow.SAP Data Services provides lot of transforms to define the transformation logic in the system. These transforms are grouped into four different categories. They are 1.Data Integrator, 2.Data Quality,3.Platform,4.Text Data Processing


Data integrator transforms
Ø  1. Data Transfer transform:
•      This is used to transfer the data from source to the target system.
•      It is mainly used when millions of records are being processed.
•      It splits the task into different sub data flows and executes them serially.
•      Mainly used when there are multiple threads
•      So performance increases.
Ø  2. Date Generation transform:
•      It produces dates serially from start date to end date specified by us.
•      The serial order is may be day wise, month wise, week wise or we can manually assign using global variables.
Ø  3. Effective Date Transform:
•      This transform calculates “effective to” date for records which contains “Effective Date” field of date type.
•      The “effective to” column is added to target along with source schema and it gives the date until which each record is valid.
•      These effective date and effective to column are like valid from and valid to respectively.
•      So we can identify the range of each record’s validity.
Ø  4. Hierarchy Flattening Transform:
•      This transform builds a complete hierarchy in target table for the source data set and describes the hierarchy based on given parent and child columns.
•      It describes the hierarchy in both horizontal and vertical format based on our request.
Ø  5. Table Comparison transform:
•      It is used for identifying data manipulation operations in the source.
•      It identifies changes in the source and transfers the data to the target with rows flagged as insert, update or delete as per the change.
•      We can select which column’s changes has to be identified by dragging the column in compare columns tab in transform editor.
Ø  6. Key Generation Transform:
•      It is used to generate keys for the newly inserted rows.
•      This transform identifies the maximum existing key value in the source, and generates keys by taking that maximum value as starting value.
Ø  7. History Preserving Transform:
•      As the name indicating it is used to preserve the history of all the records.
•      When we update a record in the source, instead of updating the record in the target, this transform inserts a new row with updated record along with previous record.
Ø  8. Pivot Transform:
•      It is used for converting the selected columns to rows.
•      i.e., for each value in selected column, pivot transform inserts a new row in target table.
Ø  9. Reverse Pivot Transform:
•      It is used for converting the selected rows to columns.
•      It combines data from multiple rows into a single row.
•      It creates new columns to perform above task.
Ø  10. XML Pipe Line Transform:
•      It processes large XML files. Instead of taking all the instances at a time into memory, it takes one instance at a time and processes it and releases the memory.
•      Next instance is again loaded to same memory location so that memory consumption is reduced.
Platform transforms
Ø  1. Case Transform:
•      It is used to split the input rows based on given conditions and route them to different locations respectively.
•       Rows that do not satisfy any given condition goes to other specified location labeled as ‘default’.
Ø  2. Map Operation Transform:
      This transform is used to alter the data manipulation operation codes.
•      It takes data manipulation operation codes as input and alters them to specified operational code like update to insert, update to update etc..
Ø  3. Merge Transform:
      This transform acts like UNION ALL in SQL.
•      It combines all the input data sets that are from different sources and sends to target.
•      It allows duplicates.
Ø  4. Query Transform:
It is very important transform which is frequently used in jobs.
•      Mapping columns from input to output schema
•      Assigning primary keys to output schema
•      Adding new columns in output schema

•      Adding function calls
•      Performing join operations
•      Applying group by, order by clauses.
•      Removing duplicate rows
Ø  5. Row Generation Transform:
•     Produces a data set with a single column. The column values start with the number that you set in the “Row number starts at” option. The values then increments by one to a specified number of rows.
Ø  6. SQL Transform:
•      This transform won’t take any input.
•      This is useful when any of the built-in transform cannot perform required operation.
•      We will write the SQL query manually through this transform.
Ø  7. Validation Transform:
      This is used to validate the input rows based on specific criteria.
•      The rows that satisfies the required criteria are routed to the target labeled as “pass”.
•      Those rows which do not satisfy the required criteria are routed to the target labeled as “fail”.
Data quality transforms
These are used for parsing, standardizing and correcting the data. We have different transforms like address cleansing, match, country code, geocode etc.,

Naming conventions

Project name start with --> "PRJ"
Job name start with --> "JOB_"
Work flow name start with --> "WF_"
Data flow name start with --> "DF_"
Script name start with --> "SC_"
Query name start with --> "QRY"
Function name start with --> "FN_"
Operational data store's name start with --> "ODS_"
Global variable name start with --> "GV_"
If DF is extracting data from source table Person; DF's name is like DF_EXT_PERSON etc
All target tables should include "ETL_DATE" column.
Delete, truncate operations are executed in scripts. (Delete data from table before loading option is not used)
Dimension table names start with -->"DIM_"
Fact table names start with -->"FACT_"
Staging table names start with "ST_"
Temp table names start with "TEMP_"
 

Monday, 10 April 2017

OBIEE 11G Note4

v  Impersonation is a feature used by Oracle Business Intelligence components to establish a session on behalf of a user without employing the user's password.( Impression/Impersonation/Cloning/Transformation)
v  A list of application roles that a user is a member of is available from the Roles and Groups tab in the  My Account dialog in Presentation Services(My Account/ User Securit/ Privileges/ Group Membership)
v  Oracle Business Intelligence 11g is tightly integrated with the Oracle Fusion Middleware Security architecture and delegates core security functionality to components of that architecture
v  If you log in to the Administration Tool in online mode, then you can view all users from the WebLogic Server. If you log in to the Administration Tool in offline mode, then you can only view users that are stored in the repository.
v  If you want to enable an employee called Fred to create dashboards and reports, you might create a new user called Fred and assign Fred to the default BIAuthors group.( BIAuthor/ BIDevelopers/ BIConsumer/ BIAuthors).
v  Groups are organized hierarchically, and inherit privileges from parent groups. In other words, the BIAdministrators group automatically inherits privileges from the BIAuthors and BIConsumers groups. Oracle recommends that you do not change this hierarchy.
v  If you want user Fred to be a Sales dashboard author, you might create an application role called Sales Dashboard Author that has permissions to see Sales subject areas in the repository and edit Sales dashboards.
v  Instead of defining the security policy in terms of users in groups in a directory server, Oracle Business Intelligence uses a role-based access control model
v  A placeholder for an Application Role definition can be created in the Administration Tool to facilitate offline repository development. But this is just a placeholder visible in the Administration Tool and is not an actual application role. You cannot created an actual application role in the Administration Tool. You can create an application role only in the policy store, using the administrative interface available for managing the policy store.
v  Oracle does not recommend using WebLogic Embedded LDAP Server in an environment with more than 1000 users.
v  The BISystem Role must exist (with the BIAdministrator role), for Oracle Business Intelligence to function correctly.
v  During installation an Oracle WebLogic Server domain is created and Oracle Business Intelligence is installed into that domain. The domain is named bifoundation_domain (in Simple or Enterprise installations), and is found under the WebLogic Domain folder in the Fusion Middleware Control navigation pane.
v  SUFFICIENT:  This LoginModule need not succeed. If it does succeed, return control to the application. If it fails and other Authentication providers are configured, authentication proceeds down the LoginModule list.
v  If you want to enable user Fred to perform BIAuthors and BIAdministrator duties, you might create a new application role called BIManager, which has both BIAuthors privileges and BIAdministrat; ors privileges
v  true or false:If a user belongs to two application roles or Catalog groups and both are granted permissions, then the least restrictive permissions are given to the user.  The exception to this is if one of the two application roles or Catalog groups is explicitly denied the permissions, in which case the user is denied.
v  The default application roles are  BIAdministrator, BIConsumer, and BIAuthor.
v  Oracle Business Intelligence components communicate with each other using TCP/IP by default. Configuring SSL between the Oracle Business Intelligence components enables secured network communication.
v  Correct answer: Embedded LDAP Server → Oracle WebLogic Server Administration Console , Policy Store, Credential Store → Oracle Fusion Middleware Control , RPD → Oracle BI Administration Tool , Webcatalog → Presentation Services Administration
Oracle WebLogic Server Administration Console : LDAP Server
Oracle Fusion Middleware Control : Policy Store, Credential Store
Oracle BI Administration Tool : RPD
Presentation Services Administration : Webcatalog
v  By default, an Oracle Business Intelligence installation is configured with an authentication provider that uses the Oracle WebLogic Server embedded LDAP server for user and group information. The Oracle Business Intelligence default policy store provider and credential store provider store Credentials, application roles and application policies in files in the domain.
v  If you are deploying the default Policy Store, then Oracle recommends that you make a copy of the original  system-jazn-data.xml  policy file and place it in a safe location.
v  The Oracle Business Intelligence default credential store is file-based, also known as being wallet-based, and is represented by the file cwallet.sso.
v  You use ________  in the Oracle BI Administration Tool to manage permissions for application roles, and set access privileges for objects such as subject areas and tables.
v  you use Identity Manager in the Oracle BI Administration Tool to manage permissions for application roles, and set access privileges for objects such as subject areas and tables.
v  What is the default port number for the Oracle WebLogic Server Administration Console and Fusion Middleware Control applications?.The deafult port is 7001
v  FMW_UPDATE_ROLE_AND_USER_REF_GUIDS parameter in NQSConfig.INI:
v  OPSS is the underlying platform on which the Oracle Fusion Middleware security framework is built.  What does OPSS stand for?- Oracle Platform Security Services
v  Oracle Business Intelligence Release 11g supports the use of SA System Subject Area, in combination with the BI Server initialization blocks, to access user, group and profile information stored in database tables.
v  true or false:In Oracle Business Intelligence Release 10g users and groups could be defined within a repository file using the Oracle BI Administration Tool. In Oracle Business Intelligence Release 11g users and groups can no longer be defined within a repository.
v  False. A suitable database schema containing the users, credentials and groups required for authentication, must be accessible from the WebLogic Server on which Oracle BI EE is running.
v  True or False: The Oracle BI Administration Tool displays application role data from the policy store data in real time
v  True or False: if you reconfigure Oracle Business Intelligence to use Oracle Internet Directory (OID), you can view and manage users and groups in Oracle WebLogic Server Administration Console. if you reconfigure Oracle Business Intelligence to use Oracle Internet Directory (OID), you can view users and groups in Oracle WebLogic Server Administration Console but you must manage them using the OID Console.
v  The BI Server and Presentation Services client support industry-standard security for login and password encryption. When an end user enters a user name and password in the Web browser, the BI Server uses the Hypertext Transport Protocol Secure (HTTPS) standard to send the information to a secure Oracle BI Presentation Services port. From Oracle BI Presentation Services, the information is passed through ODBC to the BI Server, using Triple DES (Data Encryption Standard). This provides a high level of security (168 bit), preventing unauthorized users from accessing data or Oracle Business Intelligence metadata.
v  To use Microsoft Active Directory for authentication, you must configure an  alternative authentication provider
v  After a user has been authenticated, the next critical aspect of security is ensuring that the user can do and see what they are authorized to do and see. Authorization for Oracle Business Intelligence Release 11g is controlled by a security policy defined in terms of application roles.
v  When a user acts as proxy user for a target user, which mode of access allows only read only access to the target user's objects?
The following list describes the proxy levels:
v  Restricted — Permissions are read-only to the objects to which the target user has access. Privileges are determined by the proxy user's account (not the target user's account).
For example, suppose a proxy user has not been assigned the Access to Answers privilege, and the target user has. When the proxy user is acting as the target user, the target user cannot access Answers.
Full — Permissions and privileges are inherited from the target user's account.
v  If Catalog groups and application roles are used in combination to manage Catalog permissions or privileges, the Catalog groups take precedence. For example, if a user is a member of a Catalog group that grants access to a Presentation Services object or feature and is also a member of an application role that denies access to the same object or feature, then this user has access. A Catalog group takes precedence over an application role.
v  In Oracle Business Intelligence Release 11g the entire repository is encrypted using a key derived from a user supplied password.
Note:
A Release 11g repository can only be opened with the password. There is no mechanism for recovering a lost password.
v  A GUID is typically a 32-character hexadecimal string that is system-generated to form a unique identifier for an object. In Oracle Business Intelligence a GUID is used to refer to individual users and groups.
v  True or False: Assigning an application role to be a member of a Presentation Services Catalog group  is considered a best practice.
v  In the Provider Specific tab you specify the SQL statements used to query, and authenticate against, your database tables.
v  PROXY — Use this variable to store the name of the proxy user.
Use the initialization block named ProxyBlock and include code such as the following:
select targetId
from Proxies
where 'VALUEOF(NQ_SESSION.RUNAS)'=targetId and ':USER'=proxyId
PROXYLEVEL — Use this optional variable to store the proxy level, either Restricted or Full. If you do not create the PROXYLEVEL variable, then the Restricted level is assumed.
Use the initialization block named ProxyLevel and include code such as the following:
select proxyLevel
from Proxies
where 'VALUEOF(NQ_SESSION.RUNAS)'=targetId and ':USER'=proxyId
v  Presentation Services privileges can be granted to users both explicitly and by inheritance. However, explicitly denying a Presentation Services privilege takes precedence over user access rights either granted or inherited as a result of group or application role hierarchy.
v  False: You may have your own LDAP directory (for example Oracle Internet Directory) that you may want to use as the default authenticator, and disable the WebLogic Server default authenticator. Having a single source authentication provider prevents user names and passwords being derived from multiple authentication sources, which could lead to multiple points of attack, or entry from unauthorizeed users.
v  knows how to access information about the users and groups accessible to Oracle Business Intelligence and is responsible for authenticating users. → authentication provider, provides access to application roles and application policies, which forms a core part of the security policy and determines what users can and cannot see and do in Oracle Business Intelligence. → policy store provider, is responsible for storing and providing access to credentials required by Oracle Business Intelligence. → credential store provider --- 
An authentication provider that knows how to access information about the users and groups accessible to Oracle Business Intelligence and is responsible for authenticating users.
A policy store provider that provides access to application roles and application policies, which forms a core part of the security policy and determines what users can and cannot see and do in Oracle Business Intelligence.
A credential store provider that is responsible for storing and providing access to credentials required by Oracle Business Intelligence.
v  An application stripe defines a subset of policies in the policy store. The Oracle Business Intelligence application stripe is named obi.
v  To enable high availability of the default embedded Oracle WebLogic Server LDAP identity store in a clustered environment, you configure the virtualize attribute. When you set the virtualize attribute value to true, Managed servers are able to use a copy of the embedded default Oracle WebLogic Server LDAP identity store.

v  Single Sign On (SSO) A method of authorization enabling a user to authenticate once and gain access to multiple software application during a single browser session





End-to-End Databricks S3 Workflow: Connect, Create Tables, Archive, and Move Files

End-to-End Databricks S3 Workflow: Connect, Create Tables, Archive, and Move Files Introduction An end-to-end Databricks S3 pipeline ofte...