Example of how group by on ODI

I already post a question on that subject but i didn't succeed to create so if anyone have a example or a tutoriel.
I explain my case :
I have a table with a field containing a bank account, another field containing the amount of an operation on this account. I want to make a sum of operations by account. The request will be something like :
Select SUM(operation),account of TableLedger group by account.
Thanks.

Hi,
If you use the SUM function on the target mapping (operation) then the query that ODI generates will automatically contain a group by.
Cheers
John
http://john-goodwin.blogspot.com/

Similar Messages

  • How to use GROUP BY  in ODI

    how to use GROUP BY in ODI tool

    Hi ,
    you can combine the insert stamt with the select ....so that in the target u will get a single line .....
    SQL> select * from prop_details;
    PROPERTY RELAVANTD NOTICES
    10100 25-JAN-09 30
    10100 03-JAN-09 30
    10100 02-DEC-08 20
    10100 01-DEC-08 10
    10100 31-DEC-08 20
    10101 10-JAN-09 10
    10101 20-JAN-07 15
    10101 30-DEC-08 45
    10101 20-FEB-08 35
    10101 31-JAN-09 25
    10 rows selected.
    SQL> select PROPERTY,max(RELAVANTDATE),SUM(NOTICES) from PROP_DETAILS GROUP BY P
    ROPERTY;
    PROPERTY MAX(RELAV SUM(NOTICES)
    10101 31-JAN-09 130
    10100 25-JAN-09 110
    SQL>

  • Where do I find examples of how to use formula functions? Online help only provides syntax

    Hello,
    I would like to run a formula ( for my custom field in Project 2013)  that allows me to see the Finish Time e.g. 17:15 for a task.  I am trawling through the online help to determine which one is best but I would like to read some examples
    of how a function can be used. I hoped Help may do this but no.
    Hope you can point me into the right direction.  Thanks in advance.
    Alan

    Alan,
    Yeah I agree, the on-line help is lacking in information on how to actually USE a function. However, there are some places that may help. Here are a couple, I'm sure there are many others.
    https://support.office.com/en-nz/article/Project-functions-for-custom-fields-7e525143-380f-4083-8d5a-3ecc6ba44f22
    https://msdn.microsoft.com/en-us/library/office/ee767700(v=office.14).aspx
    Since many of the custom field formulas are also used in VBA, I've found the object library reference for VBA to be very helpful in understanding and setting up custom field formulas. To get the the object library, go to Developer/Code group/Visual Basic.
    Once the Visual Basic Editor window opens, hit View/Object Browser. Hit the Help menu and select the Help for Visual Basic. Type in the function of interest.
    However, you say you want a custom formula to see the finish time for a task. You don't need any customization to see that. Simply go to File/Options/General tab and select a date format that includes the time.
    Hope this helps.
    John

  • Looking for a simple example of how to query all the accounts

    I'm new to the web service model in oracle crm and have been trying to just get a list of the accounts in the system. I generated a .cs class from the account wsdl and added it to my asp.net project. I'm able to get a handle on the account class but not sure the right syntax to make a call out.. As a fyi - i also have been able to login thru the service and obtain a session id.. so I'm that far..
    Are they any existing code examples on how to query this? This is what I have so far but i throws an exception -
    Account act = new Account();
    act.Url = "https://"+dbcon.serverName+"/Services/Integration;jsessionid="+ sID;
    AccountWS_AccountQueryPage_Input qbe = new AccountWS_AccountQueryPage_Input();
    AccountWS_AccountQueryPage_Output qRet;
    qbe.ListOfAccount = new Account1[1];
    qbe.ListOfAccount[0] = new Account1();
    qbe.PageSize = "20";
    qbe.StartRowNum = "0";
    qbe.ListOfAccount[0].AccountId = "";
    qbe.ListOfAccount[0].Description = "";
    //act.CookieContainer = .... is this line needed?
    qRet = act.AccountQueryPage(qbe);
    return qRet.ToString();
    Thanks in advance for your help - Todd
    Edited by: user11139473 on May 6, 2009 6:33 PM

    Hi,
    I am doing the same thing but I am not sure what is Account1 in your case. Can you show me the implementation of Account1 class?
    Account act = new Account();
    act.Url = "https://"dbcon.serverName"/Services/Integration;jsessionid="+ sID;
    AccountWS_AccountQueryPage_Input qbe = new AccountWS_AccountQueryPage_Input();
    AccountWS_AccountQueryPage_Output qRet;
    qbe.ListOfAccount = new Account1[1]; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< qbe.ListOfAccount = new ListOfAccountQuery();
    qbe.ListOfAccount[0] = new Account1(); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    qbe.PageSize = "20";
    qbe.StartRowNum = "0";
    qbe.ListOfAccount[0].AccountId = ""; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    qbe.ListOfAccount[0].Description = ""; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    //act.CookieContainer = .... is this line needed?
    qRet = act.AccountQueryPage(qbe);
    return qRet.ToString();
    On the right is my line of code. The ListOfAccount member of AccountQueryPage_Input has datatype ListOfAccountQuery. In my case, a NULL is returned after the call.
    Did you code work in the end?
    Thanks

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • How do I fix the compatibility issue between my iPhone 4S with iOS 7 and my Pioneer car stereo? There was no problem with iOS 6, but now I get a message saying "this device is not compatible" and so I can't use Netflix for example. How do I fix it?

    How do I fix the compatibility issue between my iPhone 4S with iOS 7 and my Pioneer car stereo? There was no problem with iOS 6, but now I get a message saying "this device is not compatible" and so I can't use Netflix for example. How do I fix it?

    This is a typical response from the manufacturer. Did you try the fix that Lawrence mentioned. When Apple or any other phone manufacturer update phone software, they have the latest Bluetooth installed. It is usually the problem with the radio manufacturer that they devices are using the older Bluetooth protocols. You can try this support document http://support.apple.com/kb/TS3581 and see if anything there helps, but generally it requires the radio manufacturer to update their firmware.

  • Req any examples of how to use a USB midi controller​/keyboards with Labview TIA

    Req any examples of how to use a USB midi controller/keyboards with Labview TIA

    Hi,
    To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
    As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
    Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
    = "http://msdn.microsoft.com/library/default.asp?url​=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.

  • Need an Example for How to call a Stored Procedure using DBAdapter

    Hi
    I am trying to invoke a stored procedure in Oracle Database using DB Adapter. I have successfully invoked and when i try to run it i got the following error.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'ExecuteScript' failed due to:
    Stored procedure invocation error.
    Error while trying to prepare and execute the RESONANCEDEMO.SP_QUERY API.
    An error occurred while preparing and executing the RESONANCEDEMO.SP_QUERY API. Cause: java.sql.SQLSyntaxErrorException: ORA-00917: missing comma
    ORA-06512: at "RESONANCEDEMO.SP_QUERY", line 7
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
    This exception is considered not retriable, likely due to a modelling mistake.
    To classify it as retriable instead add property nonRetriableErrorCodes with value "-917" to your deployment descriptor (i.e. weblogic-ra.xml).
    To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.
    All properties are integers.
    I am trying to have a Out Parameter in my Procedure. Please provide me an example on how to invoke a Stored Procedure using Out Paramter using DB Adapter.

    Hi,
    It looks more like an Oracle error and not within the DbAdapter.
    Try to test first your procedure from PL/SQL or other developer you are using.
    Arik

  • How to call a ODI Job using Command line?

    Hello All,
    Please help me on this..
    How to call an ODI Job using Command line?
    Thanks
    Ravikiran

    Generate a scenario of your package. Then go to <ODI_HOME>/oracledi/agent/bin in command prompt and invoke startscen command .
    startcmd.sh OdiStartScen -SCEN_NAME=scn_load_data -SCEN_VERSION=001 -CONTEXT=GLOBAL -AGENT_CODE=odiSchedAgent001
    Bhabani
    http://dwteam.in

  • How to execute an ODI package from Command Line

    Please can anyone help me to know how to execute an ODI package from the command line without creating a scenario from the package.
    Appreciate your help.
    Thanks
    B

    You can't. Create a scenario and then execute that from the command line.

  • How to failed a odi Scenario

    Hi ,
    I have a situation , in one package i have 5 step like
    step1-----ok----->step2-----ok----->step3-----ok----->step4----ok----->step5
    | |
    | |
    ko ko
    | |
    error_log error_log
    and like that , here if any error occurred in any step it will insert error in error_log , and the package show successfully executed
    but my situation , i hev to call pkg-2 if pkg-1 successfully completed , but here pkg-1 is failed but still i am getting success message in operator
    so , can we make pkg-1 failed if it's failed in any step

    In the step "error_log" add a step to raise the error.
    You can look at these posts:
    Re: How to make an ODI session Error Out
    Re: Jython code to check file in a Directory

  • Simple HTML example on how to display a live stream?

    Hi all
    Is there anyone who has a HTML example (or can give an URL with a page) that has the Adobe Flash player displaying a live stream (and not a file)?
    There is one in the installation under "Flash Media Server Start Screen" but it was too complex for me to understand. I just need a simple example on how to display a live flash stream in Adobes own web player.
    Thank you very much :-)

    Hi,
    Here is the html code.
    <html>
    <head>
    <title>Flash Media Player</title>
    </head>
    <object width="550" height="400">
    <param name="movie" value="player.swf">
    <embed src="somefilename.swf" width="550" height="400">
    </embed>
    </object>
    </body>
    </html>
    And here is the action script code of player.swf.
    import flash.net.NetConnection;
    import flash.events.NetStatusEvent;
    import flash.net.NetStream;
    import flash.media.Video;
    import flash.events.MouseEvent;
    import flash.media.Camera;
    startBtn.addEventListener(MouseEvent.CLICK,mouseHandler);
    var nc:NetConnection;
    var ns:NetStream;
    var vid:Video;
    var cam:Camera=Camera.getCamera();
    function mouseHandler(evt:MouseEvent){
        nc=new NetConnection();
        nc.addEventListener(NetStatusEvent.NET_STATUS,statusHandler);
        nc.connect("rtmp://localhost/sample");
    function statusHandler(evt:NetStatusEvent){
        trace(evt.info.code);
        if(evt.info.code=="NetConnection.Connect.Success"){
            ns=new NetStream(nc);
            ns.addEventListener(NetStatusEvent.NET_STATUS,streamHandler);
            ns.play("LiveStream");
            vid=new Video();
            vid.attachNetStream(ns);
            vid.height=400;
            vid.width=600;
            addChild(vid);
    function streamHandler(evt:NetStatusEvent){
        trace(evt.info.code);
    Please do the following before using the actionscript code:
    Add a button called start in fla and keep its instance name startBtn.
    create an application called sample in FMS and publish a live stream called "LiveStream".

  • Would you please give me an example about how to do an enhancement withPM01

    Hi all :
         Would you pleaes  give me an example about how to do an enhancement withPM01 to HR transactions?
         thanks in advance.
         Best regards
         Frank

    Hi,
    You can perform PA Infotype Enhancement with the transaction code PM01.
    Use the link below for Your reference.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf
    For defaulting the values to the infotype fields you have to make use of the features ( PE03 T code )
    Can you elobarate your requirement..
    For more help refer the following links.
    http://help.sap.com/saphelp_47x200/helpdata/en/1e/728d281d5e11d289d30000e82158f1/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/f7/2fe034ee251f34e10000009b38f83b/frameset.htm
    Regards,
    Jagadish

  • An example of how far ArchLinux has come

    Congratulations to the developers and packagers at Arch! I want to give a perfect example of how great this system is:
    My system hasn't been touched for seven months.  I boot the system up, and do two things:
    1) #! pacman -Sy pacman
    2) #! pacman -Syu
    3) reboot
    Everything still works just like I had it back in January, hats off to y'all

    xerxes2 wrote:Even if you are doing those things sarah31 was talking about it could be mentioned that devfs is going to be taking out of the vanilla kernel and also there's been some xfree vs xorg trouble...
    are you talking about the arch kernel? i use devfs without recompiling. i cannot see devfs being removed from the kernel until udev is more stable/reliable/ etc

  • Example on how to use the NI "saving a front panel img to file" on a prog.

    New to the labview program - I'm trying to save the front panel of the displayed output to file. I downloaded "Panel_Image_to_File.zip" from the NI site. But I'm having problem using the code to our program so as to save the image as a jpeg.
    A simple example on how to use the code or any other code that will be able to save the front panel to a specified folder will be great.

    All you should need is an invoke node of VI class and the the method Get Panel Image. Wire the Image Data output to the Write JPEG File on the Graphics & Sound>Graphics Formats palette. The Invoke Node is on the application Control palette. When it's on the diagram, right click and select Class>VI Server>VI. Right click on it again and select Methods>Get Panel Image.
    Attachments:
    Save to jpg.jpg ‏10 KB

Maybe you are looking for

  • Adobe Acrobat 8.0.1

    Hi Folks, I am currently putting together a document to be handed out at the end of a training week. The document contains questions with multiple choice/ true or false questions. Is there anyway I can configure the document so the students can selec

  • Bootcamp (windows compatability with programs pre-installed to mac)

    Hi, i've recently got a macbook pro on a grant for university. i have today purchased and uploaded the windows 7 programme on bootcamp. the only problem is that on windows it now appears that i have no access to programs which are installed on the ma

  • How to use a custom Persistence Manager

    I'm experimenting with implementing a custom Persistence Manager for CRX/CQ5. How the underlying implementation works is not important, the issue I'm having seems instead to be related to classloading or OSGi inside CQ5. I've implemented a custom Per

  • Mapping Dimension with a composite primary key in AWM

    Hi, I have a dimension with 3 levels in a snowflake scheme. The Primary key (PK) of one of them is a composite pk. Let's say: table1 (code_t1 (pk), desc_t1), table2 (code_t2 (pk), code_t1 (pk+fk), desc_t2)) and table3 (code_t3 (pk), code_t2 (fk), cod

  • Labview is very slow

    Hi i am working on labview 7.1.I am building a VI of big size(50MB).when i am editing the VI it is very very slow and it is taking minutes of time for every action.please suggest me are there any settings to change to avoid this problem.