Showing posts with label Custom BI Reporting. Show all posts
Showing posts with label Custom BI Reporting. Show all posts

Thursday, December 12, 2019



         How to Import Excel in SQL for doing ETL Operation

Today I got request from client, they want to import Excel file into SQL Server by using procedure, because they want to perform incremental loading on daily basis and ETL on it.

When I goggle out, didn’t find any appropriate blog, videos or any document which are relevant to it. So I thought to write about it.

For import the file we have to create the server which is dedicate to the particular file, or we can use SQL query also for getting the data.

By creating the Server :

Step 1: You have to install OLA DB and have to configure it

Step 2: You have to configure the dedicated server inside the sql server which will call the file
       Step 2.1: Go to Object Explore
       Step 2.2: Go to sever object



                                         
       Step 2.3: Click on the link server

                     
Step 2.4: Select the new linked server, fill the details
·         In the left pane, select the General page, and then follow these steps:
·         In the first text box, type any name for the linked server.
·         Select the Other data source option.
·         In the Provider list, click Microsoft Jet 4.0 OLE DB Provider.
·         In the Product name box, type Excel for the name of the OLE DB data source.
·         In the Data source box, type the full path and file name of the Excel file.
·         In the Provider string box, type Excel 8.0 for an Excel 2002, Excel 2000, or Excel 97 workbook.
·         Click OK to create the new linked server.
Note : In SQL Server Management Studio, you cannot expand the new linked server name to view the list of objects that the server contains.





For Getting the data : SELECT name,age FROM [OLE DB 17]...[Sheet1$]

Here OLE DB 17 is the server name and Sheet1$ is the name of the excel sheet we want to import

By Using the SQL Query:

Step 1: Then we have to activate the sp_CONFIGURE it is stored procedure in it we have to pass the argument 'show advanced options',1 for activating the advance option to call the ad-hoc distribution query


Step 2: Again we have to call the sp_CONFIGURE and this time we will pass the argument 'Ad Hoc Distributed Queries', 1 for activating the query passing.

Step 3:  Then run the script: SELECT * INTO [dbo].[tmpTable1] FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;Database=C:\Users \test.xlsx;','SELECT * FROM [Sheet1$]')

Then we can use: select * from dbo.tmptable1 to get data

Using procedure and temporary table we can perform various operation, it is very use for BI and Analytics process


Welcome for the feedback and Thanks for viewing.
Kindly suggest more topics
👍👍👍👱👱👱🌝🌝🌝









Thursday, August 9, 2018

Oracle BI Server Online Repository Creation


                           How to create an online repository for Oracle BI Server

Repository Is use for the creating the relationship between the Physical Data Base and the BI Server for doing functionality.
It is divided into three Section


  1. Physical layer.
  2. Business Model and Mapping Layer.
  3. Presentation Layer.







  • For making Repository we have to creates the OBI Server Data types.
  • Steps For Creating OBI Server Data Source.

    Step 1:

     Open the Control Panel and go to Administrative Tools.


    Step 2:

    Then Select ODBC Source Type According to your System Configuration.

    Step 3:

    Then Select System DSN(Data Source Name) and go to Add

    • DSN :- A data source name (DSN) is a data structure that contains the information about a specific database that an Open Database Connectivity ( ODBC ) driver needs in order to connect to it 

    Step 4:

    Select Oracle BI Server  for the Data Source and select Finish.

    Step 5:

    Enter a Name for the Your Data Source and also write Description about it and Click on next

    Step 6:

    Enter the User and Corresponding Password that we have set at the time OBI Installation.
    • Select Next and then click on Finish.

    Note: Port Number Is 9514.


    Now we did Configuration of the BI Server DNS.

    Part 2

    Then we have to create the Data Source For BI and make it communicate with the Physical Data Base

    As I told Above Repository Divided into 3 parts, here we describe also with creation

    We start with Physical layer

    • It defines the data Source to which Oracle Bi Server communicate with the Physical Data Base.
    • By Importing (Recommended) and designing manually data source table.

    Step 1

    Go to the BI installed folder and go to user_projects and then after domains follow by bi-bitools-bin-admintools.cmd


    Step 2

    Select the File and then select the open and click on the Online.



    Enter the user Name and Password  same as we enter in the Data source creation.

    Step 3

    Right in the Physical Layer Part and select the New Database Creation.

    Step 4


    Enter a name For you data base and Select the type of your data base.

    Step 5

    Right click on the Your Database and select the New Object  follow by Connection Pool

    Step 6

    Enter the Poll Name and then select the interface for the "Oracle 12c- Oracle 10g/11g".

    Step 7

    Then click on the Connection Poll and the That we have made and select import metadata.

    Step 8

    Verify the data source and Name (TNS Name) with the user name and password.

    Step 9

    Select the Sources that you want to import

    Step 10

    Select the user or the table that we want to explore and import 


    Step 11

    Right click on the BBM and select the Create the New Business Model

    Step 12

    Drag and drop the Physical layer data base in the BBM.



    Do same Step in Presentation Layer

    Now your Data Model is Created for BI server
    You can Access in BI Publisher as well as BI Analytics.

    ------------------------------Welcome For Comment and Suggestion.------------------------------------------