How to change universe of a webi document using BO RE Java SDK

Web Intelligence documents use one or many universes. Sometimes it is necessary to change universes for a bunch of reports. Changing universe might be very difficult if you need to modify dozens of documents. Luckily it is possible to utilize BusinessObjects Report Engine Java SDK. There is a number of Webi documents in a folder […]

Hierarchical (Recursive) Queries in SQL Server

This code sample demonstrates recursive queries in SQL Server. The query returns paths of Kettle transformations. with Parent as ( select ID_DIRECTORY , ID_DIRECTORY_PARENT , cast(DIRECTORY_NAME as varchar(255)) as DIRECTORY_PATH from R_DIRECTORY where ID_DIRECTORY_PARENT = 0 union all select TH.ID_DIRECTORY , TH.ID_DIRECTORY_PARENT , cast(Parent.DIRECTORY_PATH + '/' + DIRECTORY_NAME as varchar(255)) as DIRECTORY_PATH from R_DIRECTORY TH […]

Dimension lookup / update properties for all transformations

Sometimes it might be useful to get different information about kettle transformations in a list format. Here is an example selecting update type of step Dimension lookup/update: select t.NAME as TRANSFORMATION_NAME , s.NAME as STEP_NAME , fn.FIELD_NAME , tab.TABLE_NAME , fu.FIELD_UPDATE from ( select ID_STEP , NR , CAST(VALUE_STR as varchar) as FIELD_NAME from R_STEP_ATTRIBUTE […]

Purging data provider queries using BO RE Java SDK

Before copying webi documents from test to production environment it might be useful to clean up document queries. The following function purges data providers queries, removes saved prompt values, and regenerates queries. public static void purgeQueries(DocumentInstance widoc) { DataProviders dps = widoc.getDataProviders(); for (int i = 0; i < dps.getCount(); ++i) { DataProvider dp = […]

Business Idea: Structured News

Idea There is ForEx strategy based on news. News can trigger the exchange rate fluctuation. So news can be interesting tool for traders. However the news are typically not structured. The idea is to develop a service which will provide news metadata including categorization, expert assessment, likes, source. Another applications are search, advertisement targeting, marketing […]

Lock information in SQL Server

The script gets miscellaneous information about locks including SQL. SELECT L.request_session_id AS SPID, DB_NAME(L.resource_database_id) AS DatabaseName, L.request_mode AS LockType, L.request_status AS RequestStatus, L.resource_type AS ResourceType, L.resource_description AS ResourceDescription, L.resource_associated_entity_id AS ResourceAssociatedEntryId, — Object AS ObjectName, O.object_id AS ObjectId, — SQL ST.text AS SqlStatementText, CN.auth_scheme AS AuthenticationMethod, — Session ES.login_name AS LoginName, ES.host_name AS HostName, […]

Universe Documenter – Some Best Practices

Beside the straightforward use of the Universe Documenter for documenting list of objects, tables etc, it can help developer to speedup some verification tasks. 1. Some guys do not believe in automatic context detection and create contexts manually. In my experience if the database schema is designed properly and join cardinalities are set properly, automatic context detection […]

Script to kill user sessions in Oracle

Script to kill all sessions of a user in Oracle. BEGIN FOR r IN (select sid,serial# from v$session where username = 'USER') LOOP EXECUTE IMMEDIATE 'alter system kill session "' || r.sid  || ',' || r.serial# || ""; END LOOP; END; Manual Retrieve session identifiers and session serial number (which uniquely identifies a session's objects): select […]