Wednesday, 17 September 2014

Factless Facts


On the outlook it seems an interesting term but also contradictory.

A confusion arises straightaway; Is it a fact? But the term says factless!!

Before we get to the definition of factless facts, let’s quickly revisit the definition of fact tables- “Fact Tables consist of the measurements or metrics of a business process

Now let’s look into in the definition of Factless Facts and seize the difference.

“Factless fact table is a fact table that does not contain any quantitative measures and are so called because they simply contain keys which refer to the dimension tables.

(There are some tables that may not contain any straightforward measures like SalesAmount or QuantitySold, however they contain relations between Dimensionskeys and are facts in themselves).

Let us see the below example to ease the understanding:

Consider the scenario where a Project Manager wants to track the details of the leave taken by his team member during a certain period.                    

As we can see that there is one fact table (Fact_Employee_Leave_Type) in the center which mapped to 3 dimensional tables.

The Fact table has no measures but still it provides a detail of employee taking a leave on particular day and its type.

*Tracking the no. of leaves taken by employees is helpful. But the real analysis will based on the type of leaves taken by employee helping the managers/stakeholders to take appropriate decisions.

THE STAGING AREA

A staging area is an intermediate storage area between the sources of information and the Data Warehouse (or Datamart). — WIKI

Diagrammatic representation to ease the understanding:   

On the first look it always seems – Why do we need the staging area? Why can’t we simply load the data from the source system to DWH directly???

Though there are several reasons behind this, let us look into some major ones:

Scenario A:

Consider a workflow, where a DWH integrates data from various transaction systems.

We know that the data has to undergo several transformation/processing while loading into a Data Warehouse;

In the absence of a staging area, the data load will have to go from the OLTP system to the OLAP system directly.

This can severely hamper the performance of the OLTP system as the complex transformative queries will use the Source system resources for a long time which in turn can cascade in worrying the End users of that Transaction system.

   Pulling directly from an active Transaction Source with the advent of Staging Area

Scenario B
:


In an enterprise scenario, we know that warehousing the data involves integrating multiple source systems.

The challenge becomes much more steeper when we have a business requirement of joining the data across systems.

Though this can be achieved using the ETLs to some extent, it becomes a walk-in-the-park if we know that all the data is consolidated and stored in a common database.

The flexibility is especially high when we have Flat-file Sources in the scheme of things.                                                                      

Scenario C:

Timing reasons

Due to varying business cycles, data processing cycles, hardware and network resource limitations and geographical factors, it is not feasible to extract all the data from all Operational databases at exactly the same time. 

For example:

a.  It might be reasonable to extract sales data on a daily basis, however, daily extracts might not be suitable for financial data that requires a month-end reconciliation process.

b.   Or say, we need to extract data from a database in Tokyo and integrate the contents coming from a DB in Toronto. The extraction time will be different for both the databases to make sure we extract the latest/correct data. Staging proves to be the ideal foil as a Temporary Storage area for the Tokyo data. 

Summary and Additional info:

·     To gather data from different sources that will be ready to process at different times.

·     To quickly load information from the operational database, freeing it up as soon as possible. All the needed transformations can then occur without interfering with the operation.

·     Because staging is generally a direct load from Source, in some scenarios, staging data comes in handy to analyze Source data issues (in cases where we fear that source may have refreshed).

·     Since staging area might not be persistent i.e., once data is used for the further process it can be deleted.

Sunday, 14 September 2014

Uninstalling K2 blackpearl

Uninstalling K2 blackpearl
Use the Installation Manager (K2Setup.exe) to uninstall K2 blackpearl. After successfully uninstalling, there are several manual steps in order to go back to a clean server with no traces of K2 blackpearl. These are detailed in Step 2 below.
Step 1: Remove K2 blackpearl using the Installation Manager
  1. Shut down all K2 related processes (K2 Designer for Visual Studio, K2 Designer for Visio, K2 Web Designer for SharePoint, K2 blackpearl Server service).
  2. Run the installation manager (K2Setup.exe) and select "Remove K2 blackpearl".


[Figure 1. K2 blackpearl Maintenance page]
  1. Follow the prompts through the wizard and reboot after the uninstall is finished.

Step 2: Manually remove remnants
  1. The K2 blackpearl menu item is left in the Start Menu. Delete this menu item by right-clicking the Start menu and selecting Explore All Users. Then browse to the K2 blackpearl folder and delete it.
  2. The SourceCode registry key remains. Delete this registry key, located atHKEY_LOCAL_MACHINE > SOFTWARE > SourceCode
  3. The K2 blackpearl folder structure remains. Delete the folder structure located at[installation drive]:\Program Files (x86)\K2 blackpearl
  4. The databases remain in SQL Server so that data is preserved. To restore the server to a clean state, delete the K2 database. If you need to preserve process or logged information, make a backup copy before deleting the database.
http://help.k2.com/img/hs-note.gif
Note: If you have not consolidated your databases, you must delete the following K2 databases: Categories, Depedencies, EnvrionmentSettings, EventBus, EventBusScheduler, HostServer, K2Server, K2ServerLog, K2SQLUM, SmartBox, SmartBroker, SmartFunctions, WebWorkflow and Workspace. 

Step 3: SQL Reporting Services fix
http://help.k2.com/img/hs-note.gif
Note: This step is only required if you encounter an error browsing to the SQL Web Service or if you are not able to open SQL Reporting Services after the uninstall. This step only needs to be performed on the server that has the K2 for Reporting Services component installed.
  1. After uninstalling K2 blackpearl, browse to C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer (this location may vary depending on where you installed SQL Server Reporting Services as well as the version of SQL that you have installed)
  2. Edit the rssrvpolicy.config file in a text editor such as Notepad
  3. Find the CodeGroup node, and edit it as specified below:

<CodeGroup version="1" PermissionSetName="Nothing">
<IMembershipCondition version="1">
</IMembershipCondition>
</CodeGroup>
  1. Save your changes to the file

Validating the Uninstall
After uninstalling K2 blackpearl and performing the manual steps above, reboot the machine. Then, to ensure the environment does not have any K2-related components, use the following checklist: 
  1. No K2 Databases are present on the SQL Server
  2. The K2 blackpearl menu items are not present under Start > Programs
  3. No K2 components are present in Add/Remove programs (Start > Control Panel > Add/Remove Programs)
  4. No SourceCode nodes are present in the machine.config file
  5. No SourceCode assemblies are in the GAC (C:\Windows\Assembly)
  6. No K2 blackpearl folder is located under Program Files
  7. No K2 For SharePoint tab in the SharePoint 3.0 Central Administration Site
  8. No K2WorklistWebpart.wsp located in the SharePoint 3.0 Central Administration Site
  9. No issues opening the SQL Server Reporting Services home page
  10. Check K2 blackpearl Server service removal. If the service is still present it will be listed in the Services Console but in a stopped state.
  11. Verify SharePoint solutions removal (if SharePoint was part of the solution)
    • Go to [installation drive]\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS and check if the folders of K2 and K2BlackPearlPages are removed
  12. Check IIS to ensure K2 has been completely removed and the app pools associated with K2 sites are removed.


Friday, 12 September 2014

javascript string replace all


var str = "Hello world, welcome to the universe.";  
//I am going to replace , with | and space with -    
var newString=str.toLowerCase().replace(/,/g, "|").replace(/ /g,'-');

"Unexpected response data from server." new SP.ClientContext.get_current();



I don't know i am getting Unexpected response data from server error when i use new SP.ClientContext.get_current();
But it was working earlier...
Now i am using this..


  var burl= window.location.href;    //I got url as:  http://MydomainName/teams/MySiteCollectionName/Welcome
      var Url= burl.substr(0, burl.indexOf('/Welcome/'));                
        var objctx = new SP.ClientContext(Url);