Using OLAP as a data source and create a JSON object

Hi All,
I have a question.
I am working on an hospital assessment project which is being developed using AngularJs and MVC WEBAPI. We are using "HIGHCHARTS" for developing the required dashboards and charts by providing JSON objects which are developed using  MVC WEB-API
(from normal SQL procedures). 
Problem is raised when we are trying to build a chart using a table with around 1.2 million records. we are facing severe performance issue while generating the data set. Now, Here is my question "Can
we generate a JSON object using an SSAS cube accessed using MVC"? If it can be done please help me out with some valuable procedure that can be done.
Thanks In Advance.
Regards
Sunil Kumar 
Please mark as answer if it is helpful. Thank You

Hi,
Here is another way of doing it using MDX code. I do not know whether this helps you but... Following MDX query produces the Sales Amount per Sub Category.
SELECT {[Measures].[Sales Amount]} ON COLUMNS,
NON EMPTY{[Product].[Subcategory].[Subcategory].MEMBERS} ON ROWS
FROM [Adventure Works]
Following MDX generates the Output As JSON object array.
WITH MEMBER [Measures].[JSON Object_] AS "{""ProductSubCategories"":[" + Chr(13) +
GENERATE
NONEMPTY
[Product].[Subcategory].[Subcategory].MEMBERS,
[Measures].[Sales Amount]
), Space(10) + "{""SubCategoryName"":""" + [Product].[Subcategory].CurrentMember.Member_Name + """, ""SalesAmount"":""" + CStr([Measures].[Sales Amount]) + """}," + Chr(13)
MEMBER [Measures].[JSON Object] AS LEFT([Measures].[JSON Object_], LEN([Measures].[JSON Object_]) -2) + Chr(13) + "]}"
SELECT {[Measures].[JSON Object]} ON COLUMNS
FROM
SELECT {[Measures].[Sales Amount]} ON COLUMNS
FROM [Adventure Works]
WHERE {([Product].[Subcategory].[Subcategory].MEMBERS)}
Following is the JSON Object OutPut of the above query.
{"ProductSubCategories":[
{"SubCategoryName":"Bib-Shorts", "SalesAmount":"166739.7086"},
{"SubCategoryName":"Bike Racks", "SalesAmount":"237096.156"},
{"SubCategoryName":"Bike Stands", "SalesAmount":"39591"},
{"SubCategoryName":"Bottles and Cages", "SalesAmount":"64274.793600001"},
{"SubCategoryName":"Bottom Brackets", "SalesAmount":"51826.374"},
{"SubCategoryName":"Brakes", "SalesAmount":"66018.711"},
{"SubCategoryName":"Caps", "SalesAmount":"51229.4461000002"},
{"SubCategoryName":"Chains", "SalesAmount":"9377.7102"},
{"SubCategoryName":"Cleaners", "SalesAmount":"18406.9725"},
{"SubCategoryName":"Cranksets", "SalesAmount":"203942.6182"},
{"SubCategoryName":"Derailleurs", "SalesAmount":"70209.4958"},
{"SubCategoryName":"Fenders", "SalesAmount":"46619.5799999995"},
{"SubCategoryName":"Forks", "SalesAmount":"77931.6896"},
{"SubCategoryName":"Gloves", "SalesAmount":"242795.874200003"},
{"SubCategoryName":"Handlebars", "SalesAmount":"170591.3209"},
{"SubCategoryName":"Headsets", "SalesAmount":"60942.1984"},
{"SubCategoryName":"Helmets", "SalesAmount":"484048.532299996"},
{"SubCategoryName":"Hydration Packs", "SalesAmount":"105826.4185"},
{"SubCategoryName":"Jerseys", "SalesAmount":"752259.388399975"},
{"SubCategoryName":"Locks", "SalesAmount":"16225.22"},
{"SubCategoryName":"Mountain Bikes", "SalesAmount":"36445443.9409015"},
{"SubCategoryName":"Mountain Frames", "SalesAmount":"4713672.1469"},
{"SubCategoryName":"Pedals", "SalesAmount":"147483.9098"},
{"SubCategoryName":"Pumps", "SalesAmount":"13514.6873"},
{"SubCategoryName":"Road Bikes", "SalesAmount":"43878790.9970001"},
{"SubCategoryName":"Road Frames", "SalesAmount":"3849853.3438"},
{"SubCategoryName":"Saddles", "SalesAmount":"55829.3882"},
{"SubCategoryName":"Shorts", "SalesAmount":"413522.526999996"},
{"SubCategoryName":"Socks", "SalesAmount":"29745.1280999999"},
{"SubCategoryName":"Tights", "SalesAmount":"201833.006"},
{"SubCategoryName":"Tires and Tubes", "SalesAmount":"246454.527600005"},
{"SubCategoryName":"Touring Bikes", "SalesAmount":"14296291.2698"},
{"SubCategoryName":"Touring Frames", "SalesAmount":"1642327.6862"},
{"SubCategoryName":"Vests", "SalesAmount":"259488.3707"},
{"SubCategoryName":"Wheels", "SalesAmount":"679070.065399999"}
Best regards...
Chandima Lakmal Fonseka

Similar Messages

  • Using XML as a Data Source

    In http://download.oracle.com/docs/cd/E14571_01/bi.1111/e10540/datasource.htm#CHDBCAIJ it states you can use XML as your data source and mentions...
    URLs can include repository or session variables, providing support for HTTP data sources that accept user IDs and passwords embedded in the URL. For example:
    http://somewebserver/cgi.pl?userid=valueof(session_variable1)&password=valueof(session_variable2)
    I'm trying to pass this:
    http://somewebserver/cgi.pl?userid=valueof(NQ_SESSION.USER)
    but when I try that I can see in my web server logs that the content of the userid variable is 'valueof(NQ_SESSION.USER)' so it's not passing the results to the web server, just the text. Any ideas what's going on? Is my syntax correct? Thanks!

    Hey,
    There are a few things to look at when using session and repository variables within the RPD.
    One of the first documents you need to reference is the "What is the Syntax for Referencing Variable?" section within the OBI documentation. In addition look at this section on how to use variables in the RPD, http://download.oracle.com/docs/cd/E14571_01/bi.1111/e10540/variables.htm#BIEMG3104
    Basically you are trying to use NQ_SESSION.USER which is the syntax for trying to show the user name is Presentation Services. Of course you can see this in your web server logs because that is the correct syntax for presentation services web tier but not the RPD where you define your XML Source.
    You need to try either use VALUEOF("USER") or you are simply forgeting to put the syntax surrounded by single-quotes like, http://somewebserver/cgi.pl?userid='valueof(NQ_SESSION.USER)' to pull the system session variable into the XML URL as needed.
    Try those options and let me know if that works.
    Please mark this as the correct answer or helpful.
    Cheers,
    Christian
    http://www.artofbi.com
    Edited by: Christian Screen on May 8, 2011 10:32 AM

  • Create a data source and database tables using WSAD

    Hi, guys:
    the following is from a tutorial:
    http://www-106.ibm.com/developerworks/websphere/techjournal/0306_wosnick/wosnick.html
    "To create the data source and Cloudscape database tables automatically, right click on the HelloWorldServer in the Servers view, and select the Create tables and data sources menu item. A dialog will then display showing that the data source and database tables were created successfully (Figure 5)."
    I am using WSAD 5.0 trial version. I cannot find Create tables and data sources menu item if I right click on the HelloWorldServer in the Servers view. I am wondering if this is because trial version does not have this feature?
    regards

    This question is a little off topic but you may get a reply. Please note this forum is about Sun's J2EE SDK and its related technologies. You may have better luck posting your question to an IBM specific resource.

  • Create a Generic Data Source and deploy a webservice on a domain using WLST

    Hello for everyone,
    I usually create generic data sources and deploy webservices on a wls domain by using the Administrator Console. I wonder if you can pass me a script sample to do this task by using WSLT. On the other hand, if you can pass me a "quick start" guide about WLST, this would be very helpful.
    Additionally, may I be able to create groups, application roles and users to a domain by using WLST?
    Thanks for your help.

    You can use standard infoobjects as well..
    You can create a view on those R/3 tables and use this view for creating a generic datsource in RSO2 transaction..
    Check the below pdf for delta in generic datasources
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33

  • Create two or more data sources and mapping to DSO

    Hi,
    I´m using SAP Netweaver BI 7.0.
    If there are two or three data sources which have to be mapped to DSO which field from Data Sources has to be mapped to which field in DSO?
    Is it possible to have only one DSO or should it be three DSOs because of the three Data Sources?
    The thing is I have created one view out of three tables. For the view I have created one DSO. Everything worked fine. But now the requirements have changed because of currencies.
    The view I have created is now mixing currencies because in the view is only one currency field, which is filled from the three tables. Two tables have different currencies and one table has one currency.
    The one currency of the one table is important and should stay like it is.
    I´m thinking about something like three different currency key fields in DSO which are mapped from data source. Also for every field of data source mapping with corresponding field in DSO.
    Some hints? I have found articles in SDN about creating data sources and so on but they don´t help me in this matter.
    Thank you in advance!

    Thank you guys for explaining! I´m new to SAP BW and trying to better understand.
    I`ll try it also with the view. It sounds "easier".
    But if I´m doing it with the 3 data sources, that means that for each currency field of the data source I will need an corresponding currency field in the DSO for mapping.
    Is it possible to have 3 times the 0Currency field in the DSO and each data source currency field will be mapped to the DSO?
    If that would work the 0Currency has to be contained in the key figures.
    But if the 0Currency is contained in each key figure will the assignment of currency work correct?
    +For example:+
    Data Source1:
    Turnover in Euro.
    (All currency is in Euro)
    Data Source2:
    Profit in Dollar.
    Profit in Euro.
    Profit in Yen.
    Profit in different currencies available.
    Data Source3:
    Sales in Dollar.
    Sales in Euro.
    Sales in Yen.
    Sales in different currencies available.
    For mapping from DataSources to DSO if it is possible to have 3 times 0Currency in DSO:
    Data Source1 currency fiield ---> DSO 0Currency
    Data Source2 currency fiield ---> DSO 0Currency
    Data Source3 currency fiield ---> DSO 0Currency
    Does it make sense?

  • Create a ReportingServices data source and upload to a data connection library

    I have installed reporting services 2012 in SharePoint 2013 integrated mode. I need to create a report data source and upload it to a data connection library using
    C#.
    As I know it uses the ReportingServices2010 class but I cannot explore a reporting server url.
    There is a ReportingServices2010.asmx file in the 15 hive though.
    Also it works fine when I manually set the data source.

    Hi,
    The following materials would be helpful:
    Inserting Data Connections into a SharePoint Library
    https://social.technet.microsoft.com/Forums/en-US/df79dce5-fd92-4506-af4e-11127cb0d655/inserting-data-connections-into-a-sharepoint-library?forum=sharepointdevelopment
    Programmatically exporting reports from SQL 2012 Reporting Services
    http://stackoverflow.com/questions/12199995/programmatically-exporting-reports-from-sql-2012-reporting-services
    Report Server Web Service Endpoints
    http://msdn.microsoft.com/en-us/library/ms155398(v=sql.110).aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Excel data source and the use of add command

    HI, Looking for suggestions on how to work with multiple inputs that cannot be joined directly.  Here's the background.
    The Report currently reads in two different Ecel files and uses 3 SQL commands to query an Oracle Database.  I need to join the 5 data sources and am having issues with the 2 excel files.  In one file I need to be able to derive a field based on another column in the file In order to create the join condition to the SQL commands.  I'd equate this to a case statement in SQL, but how goes one do that using the 'add command' feature?  What is the syntax?
    Next I would need to join (left outer) the two excel files using two fields from file A (a1, a2) and 3 fields from file B (b1,b2,b3), where a1=b1 and b2 <= a2  <= b3 when rows from A exist in B.  If row A does not exist in B then we still want it in the report and available to left outer join to the 3 oractab data sources.
    runtime is also a concern.
    Any Suggestions?

    hi Elena,
    in this case the use of subreports is not recommended. that's because you're exporting to excel and you need data in columns across the report. subreports will not, unfortunately, give you what you need.
    this would bring you back to joining the datasources. what i would recommend is looking into using 'oracle database link' to link your oracle db to excel files. here's one article as an example but you may be able to find a better one. if you have questions on this please ask them on an oracle forum as the syntax that you need will be database specific.
    a lot of databases have this type of technology which allows you to create a view to other data. sql server has 'linked servers', sap hana has 'smart data access'. essentially you are creating a non-materialized view to the external data. then this view is available on the main oracle server where you established this connection. this should be a lot easier than trying to bring a bunch of command objects together off independent datasources inside of crystal.
    -jamie

  • OWB 10g -- Can't Create Database Links for Data Source and Target

    We installed OWB 10g server components on a Unix box running Oracle 10g (R2) database. The Designer Repository is in one instance. The Runtime Repository and the Target are in another instance. The OWB client component was installed on Windows XP. We create a data source module and a target module in OWB. The data source is on another Unix box running Oracle 9i (R2) database. We try to create database links for data source module and target module, respective. But when we created and tested the DB links, the DB links were failed.
    For the database link of data source, we got the following error message:
    Testing...
    Failed.
    SQL Exception
    Repository Error:SQL Exception..
    Class Name: CacheMediator.
    Method Name: getDDEntryFromDB.
    Repository Error Message: ORA-12170: TNS:Connect timeout occurred
    For the database link of target , we got the following error message:
    Testing...
    Failed.
    API2215: Cannot create database link. Please contact Oracle Support with the stack trace and the details on how to reproduce it.
    Repository Error:SQL Exception..
    Class Name: oracle.wh.ui.integrator.common.RepositoryUtils.
    Method Name: createDBLink(String, String, String, String).
    Method Name: -1.
    Repository Error Message: java.sql.SQLException: ORA-00933: SQL command not properly ended.
    However, we could connect to the two databases (data source and target) using the OWB’s utility SQL Plus.
    Please help us to solve this problem. Thank you.

    As I said prior the database link creation should work from within the OWB client (also in 10).
    Regarding your issue when deploying, have you registered your target locations in the deployment manager and did you first deployed your target location's connector which points out to your source?
    I myself had some problems with database link creations in the past and I can't remember exactly what they were but it had something to do with
    - the use of abnormal characters in the database link name
    - long domain name used in as names.default_domain in my sqlnet.ora file
    What you can do is check the actual script created when deploying the database link so see if there's something strange and check if executing the created script manually works or not.

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • SQL ENTERPRISE: The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database

    The error below makes absolutely no sense! I'm using Enterprise Core...yet I'm being told I can't use remote data sources:
    w3wp!library!8!03/05/2015-19:08:48:: i INFO: Catalog SQL Server Edition = EnterpriseCore
    w3wp!library!8!03/05/2015-19:08:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: , Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "The edition of Reporting
    Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.;
    Really? This totally contradicts the documentation found here:
    https://msdn.microsoft.com/en-us/library/ms157285(v=sql.110).aspx
    That article says remote connections are completely supported.
    ARGH! Why does this have to be so difficult to setup?!?

    Hi jeffoliver1000,
    According to your description, you are using Enterprise Core edition and you are prompted that you can’t use remote data sources.
    In your scenario, we neither ignore your point nor be doubt with what you say. But actually we have met the case before that even though the SQL Server engine is Enterprise but the reporting services is still standard. So I would recommend you to find the
    actual edition of reporting services you are using. You can find Reporting Services starting SKU in the Reporting Service logs ( default location: C:\Program Files\Microsoft SQL Server\<instance name>\Reporting Services\LogFiles). For more information,
    please refer to the similar thread below:
    https://social.technet.microsoft.com/Forums/en-US/f98c2f3e-1a30-4993-ab41-acbc5014f92e/data-driven-subscription-button-not-displayed?forum=sqlreportingservices
    By the way, have you installed the other SQL Server edition before?
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Oracle OLAP as OBIEE Data Source

    I've got a couple of questions regarding the use of Oracle OLAP (Analytic Workspace/Cube) as an OBIEE data source.
    First: As a general rule when creating a dimension, we create a total roll-up for the dimension i.e. "Total Product", "Total Geog", "Total Customer" etc... Generally, I don't create a total roll-up for time dimensions. When importing metadata from OLAP to OBIEE, OBIEE creates a "Total" level for all dimensions. Now, I understand why OBIEE does that; to support queries that might exclude one or more dimensions. My question is: what is the best method/procedure to deal with the extra "Total" level?
    Second: I would appreciate it if someone could explain this error for me: [nQSError: 59137] Filter level YEAR is below the projected level Total on dimension CMP_TIME while an externally aggregated measure is present. (HY000). I understand the words, but have no clue what OBIEE is trying to tell me. This error pops up constantly and I see no rhyme or reason that would cause it. the specific case above occurred when I clicked on the sort icon for a measure included in a report.
    Thanks,

    Mark,
    Thanks for the reply. However, I'm not sure I made myself clear. I have created a "Product" dimension in AWM (Analytic Workspace Manager) in the following structure: Product -> Product Line -> Total Product. Withing the context this hierarchy, "Total Product" is the "Grand Total" Level. When this data is imported into OBIEE using "Oracle OLAP" as a data source, the Product hierarchy is created in the Physical Layer as an "Oracle OLAP Dimension". In the BMM Layer, the hierarchy is structured as: Product -> Product Line -> Total Product -> Total. There are now two "Total" Levels. Naturally only one, the OBIEE generated Total, is defined as "Grand Total". The only child of the Total level is Total Product. I have two hierarchy levels that are the same. So, do we need both? should we keep both? Should a dimension defined within AWM for use in OBIEE NOT include a total level? It's not really a problem, it just doesn't seem to make any sense to have TWO total levels within a hierarchy.
    On the second issue, I wish I could provide some detail, but I'm really not sure how I'd do that. That's why I asked for the meaning of the error. What is OBIEE telling me that I'm doing wrong. All I really did was import the metadata, drag it to the BMM Layer, deleted some of the hierarchy level keys, renamed some columns and dragged the stuff over to the Presentation Layer. So, it's pretty much drag-and-drop.
    Another example of the error: We have a Category Dimension (Sub Category -> Category -> Category Group -> Model -> All Categories -> Total) and I want to see the top 10 values of a measure by Category by Model. In an Analysis, adding the Model column works fine, just not the best visualization. Move the Model column to "Sections" and all works; move the Model column to Pivot Table Prompts and it errors. Obviously, I'm asking OBIEE to do something it doesn't want to do, so I'm looking for the root cause of the error.
    Thanks,

  • Can you use SQL as a data source for a project in the same way you can in Excel?

    Excel allows you to create a data source that executes a SQL stored procedure, display that data as a table in a spreadsheet and have that data automatically refresh each time you open the spreadsheet. Is it possible to do the same thing in MS Project, displaying
    the data from the stored procedure as a series of tasks?
    Here's what I'm trying to do - I have a stored procedure that pulls task data meeting a specific criteria from all projects in Project Server. We're currently displaying this data as an Excel report. However, the data includes start dates and durations so
    it would be nice to be able to display it as a Gantt Chart. I've played around with creating a Gantt chart in Excel and have been able to do a very basic one, but it doesn’t quite fit our needs.

    No, You can not use sql as a data source for a project.
    You have 3 options to achieve it:
    1. You can create a Sharepoint list with desired column ,fill desired data in that list then you can create a MS project from Sharepoint List.
    2. You can create a SSRS report in which you can display grantt chart Joe has given you that link.
    3. You can write a macro in MPP which will take data from your excel. In excel you will fetch data from your stored procedure. write a schedule which will run every day to update your data or
    create an excel report in which will update automatically and write macro in mpp which will fetch the data then publish it so that it would be available to team members.
    kirtesh

  • Using Web Service as Data source (Pluggable Data Source) in Oracle Reports

    Anyone using Webservice as a pluggable data source in oracle 10g reports.(Report builder version:10.1.2.0.2)? We need to be able to use web service as one of the data source to create reports.Tried the following and ran into issues:
    Imported the wspds.jar fle from oracle plugin exchage. When tried using it received the following error in oracle reports trace file.
    04/26 22:27:22 java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build([Loracle/xml/parser/v2/XMLDocument;Ljava/net/URL;)Ljava/lang/Object;
    By troubleshooting issue found out that xmlparserv2.jar in 10g is newer than xmlparserv2.jar in 9i. wspds.jar is using xmlparserv2.jar in 9i as it was developed and tested for 9i only. Believe there is no newer wspds.jar file developed specifically for 10g?
    Is there a better/standard solution to use webservice as data source in oracle 10g reports? Does later version of oracle reports supports webservice as a data source without any additional plugins? Any suggestion would be helpful.

    Please provide support for the above request.
    It appears that Oracle 10g reports doesn't support Web Service as pluggable data source. Is this option is available in Oracle 11g Reports or Oracle Discoverer Or OBIEE?

  • Generic Data Source and InfoPackage Data Selection

    Hello,  I'm trying to extract data from a generic data source (composed of a view joining 4 tables) using the Data Selection Criteria in an infopackage.  Sometimes the selection criteria is ignored and more data is pulled than expected.  The number of selectable items in the generic data source has been reduced (in case this was an issue) and for a short time the infopackaged pulled the expected number of records.  Then another change was made to the generic data source and the problem returned.  In any case, the transported generic data source does not work in the target system either.  I'm not sure what is causing this to happen.  Any ideas???  BW 3.5.
    Regards,
    Sue
    Message was edited by: Sue and Enrique
            Ramesh P

    Hi,
         Some of the datasources will not have  default Infopackages for them.You can create the infopackages according to the requirement.There is no big deal for creating Infopackages.You can go ahead creating them.
    Regards
    Karthik

  • Data source and Extract Structure

    Hi all,
    I have a doubt on Data source and Extract Str,
    when i used one info cube with some char and kf's
    after i did extraction shall we change the extract strcuture prequently other wise better to use all the predefined extract strcuture hide in data source.
    if i hide in datasource after extraction i want to use some of hide fields, so we can use it? if we can use how can we extract data for that specified hide fields to bw side.

    If you wont to create the genaric data source at that time
    you can create cube with some char and kf.
    after extraction you wont to modify the structure ? if you mofify
    the structure then replicate the data source and delete the data
    and upload the data from r/3 to bw.its not correct way every time modifying the
    structure.if you put hide means that fields are not coming to
    bw side.if put modify the hide field ,first goto rsa6 edit data source
    remove the hide check box and save after come to bw replicate the data source
    delete the data and load the data (if you wont full data for hide field)
    if you dont load full load means only available upto data only what ever field you modify the
    hide to unhide,

Maybe you are looking for