Assign group identifier during ETL? Need suggested approach

Ok, so I need to pull in some data to a "staging" table.  During the process that loads the destination db, I need to assign a value to a field that will be a unique identifier for a group of records that share the same values for a set of
columns.
The overall process looks like kinda like this
Database A -> ETL -> Staging Database B -> ETL -> Database C
I suppose one way to do this is to simply use a calculated column in the statement that selects the data to be loaded into C.  
In  a staging  table in B, there will be records that are related to one another based on a set of columns.  Its this set of column values that I would want to use to generate a "calculated" group identifier in the destination table
in C.
Suggestions?  I suppose my main concern is the generation of the group id, but what to do with those records that couldnt be assigned a group id?

I need to assign a value to a field that will be a unique identifier for a group of records that share the same values
for a set of columns.
Sounds like using DENSE_RANK function to generate unique value for each group of values.
You can also use HASHBYTES function passing the concatenated list of columns and generated byte value corresponding to
them to identify the group of records
see an example here
http://visakhm.blogspot.in/2014/06/ssis-tips-implementing-scd.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Assigning Numeric Identifiers Based on Group

    Hi there,
    Currently I have a set of data consisting of an unique identifier (ID), four product properties (Brand.1.1, Brand.1.2, ...), and a preference.
    What I would like to do is for each product category (i.e. Brand, Price, and Preference) is assign numeric identifiers to values - that is, common values will be assigned the same identifier within each category. If possible, I would also like a legend to be
    created automatically. It is possible that the same input exists in different categories, but they should not be seen as equivalent to each other.
    My current method involves creating a chart of unique values for each category and using lookup functions but this is a slow process when I have multiple product categories to go through (Size, Price, Brand, Warranty, Features, Delivery, etc.).
    Example:
    ID
    Brand.1.1
    Brand.1.2
    Price.1.1
    Price.1.2
    Preference
    ID001
    Apple
    Cereal
    50
    25
    Cereal
    ID002
    Cereal
    Bread
    32
    41
    Cereal
    ID003
    Bread
    Apple
    50
    32
    Apple
    ID004
    Cereal
    Eggs
    41
    25
    Eggs
    Assign numeric values:
    Brand.1.1
    Brand.1.2
    Price.1.1
    Price.1.2
    Preference
    ID001
    1
    3
    1
    2
    1
    ID002
    3
    2
    3
    4
    1
    ID003
    2
    1
    1
    3
    2
    ID004
    3
    4
    4
    2
    3
    Legend:
    Brand:
    Apple - 1
    Bread - 2
    Cereal - 3
    Eggs -4
    Price:
    $50 - 1
    $25 -2
    $32 -3
    $41 -4
    Preference: (Notice how it has same input-values as Brand but doesn't necessarily assign the same numbers since it's a different category)
    Cereal -1
    Apple -2
    Eggs -3
    I imagine VBA will be required but any thoughts/help would be appreciated.

    Hi,
    If you don't want to use VLOOKUP function, also ,you'd like the legend to be created automatically. The only way I can think is VBA code.
    As this forum is for discussing Office Client issue, to help you better, I suggest you submit a new case on MSDN forum as they will be more professional on your issue.
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
    Thanks for your understanding.
    Wind Zhang
    TechNet Community Support

  • Error while assigning group

    Hi friends,
      1. Iam getting the following error when assigning the group to a user.
      <b>An error occurred while adding group assignments; to see the correct status, perform a new assigned groups search</b>
    2. When uploading the template also its throwing the java.null exception..
       template contains , user name, password, roles , mail_id, group..
      after uploading the template all the above information is created except group
      when i search for the user which is created based on uploading template ,
      the group is not assigned.
       I need to send users list asap with groups assigned. but its giving problem...
      can anyone suggest me on this..
      Thanks & regards
      Sireesha.

    Hello Sireesha,
    Have u followed standard format while uploading the text file....
    If not use this format while preparing the groups and users etc.....
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/7cdf3dffadd95ee10000000a114084/content.htm
    Rgds
    Pradeep

  • Account Assignment group is blank in billing dcoument !

    Hi,
    In some order Account assignment group is blank in billing document which led to Account determination error in production system .
    I have checked account assignment group is already maintained for material(mm03) and customer(xd03) in the PEC.
    In VF02 for only one item in order AAG is coming as blank . that is why in account determination analysis for that item 'No G/L account found in Account determination type KOFK' is coming . And User is getting Account determination error . I have checked in VKOA G/L account is maintained.
    I know manually I can enter the value of AAG in VF02 for the item &  error will get resolved but I want to find the reason since it is in PEC system.
    Can anyone provides solution k why AAG comes blank for  billing document that led to  account determination error. ?
    thanks in adv.
    Reg,
    Rahul.

    Hi Rahul,
    Kindly refer the answers below:
    Q. Can you suggest where/how to check all condition table which is being used to determine G/L account
    A. After creating the invoice, go to VF02 transaction code by providing your billing document nnumber and enter it. In main menu bar, you need to choose Environment --> Acc.determ.analysis --> revenue Accounts. Here you will get on what level GL code is getting determined. Further in transaction VKOA, you can check on what basis / selection parameters G/L codes are aligned. In VKOA initial screen, you will have the table column. If table is showing as 230, that means in SE16 transaction code, it will be C230.
    Q. Why  AAG value is  blank in Billing document.
    Regards. 

  • Account assignment group in Invoice.

    Hi,
    In standard settings, account assignment group of customer is flown from Payer function. But my requirement is to get account assignment group in invoice from ship to party.
    Please suggest what are the customization required for above.
    Thanks,
    Anup.

    You will have to use a routine at the time of billing/account posting . You can create a Ztable (copy of the standard account assignement) and in the Account assignment Group of customer, which contains values from the payer , maintain the Account assignement group  indicataor( value) from the ship to party.
    During account posting , at runtime....using the above routine (requirement) replace the value of the Account Assignemnet group from the standard table with the value from the Ztable ( which contains the Account Assignment Category from Ship to Party).  This will take care for all the customers for whom you want to determine  account assignment group from Ship to party and for remaining customers, the system will behave in the standard way.
    Regards,
    Ashok

  • G/L account determination through material account assignment group

    Hi ,
           I would really appreciate any help on this . The scenario is .
    We changed the account assignment group of maetrial to 01 just 2 days back.
    We have old open sales order line up for this particular material . When I am trying to Bill these open orders , the system is not recognizing the account assignment grp change which happened 2 days back ,because of which I am getting a A/C determination error .
    This is a I/C order and we have PO linked to it. I am suggesting to back out everything (Do Invoice reversal,MIGO cancellation,PO cancellation , then cancel invoice ,delivery and sales order ) so that we can create a new cycle and  the system will recognize the account assignment grp change and determines  the G/L whwn it comes to acounting .
    1. Is this the right way
    2. Is there any other way by which I can make the accounting happen
    It was very obvoius that when I see the account determination analysis ,the system wasn't able to find the account assignment grp for the material .
    Thanks
    Sridhar

    Dear Sridhar
    First of all, I dont think, you will be able to change the Account Assignment Group of a material in sale order if any subsequent document is generated bcoz the said field will become uneditable.  Moreover, via MASS, this is not possible as the field name of Account Assignment Group for material (KTGRM) is not available in MASS.
    So the other option is via MASS, you can assign Reason for Rejection for existing orders.  To assign Reason for Rejection in bulk is run T.Code MASS, input [BUS2032]  as Object Type and execute.  There block he Sales Order Item Data and click on Fields and block the field MASSVBAP-ABGRU and execute.  Input the sale orders if possible otherwise leave it blank and once again execute.  Now you can assign Reason for Rejection in mass.
    Meanwhile, you have to create new orders for all those open items.
    thanks
    G. Lakshmipathi

  • Account Assignment Group for Customer........

    Hi Experts,
    We have created few new account assignment groups as per our customer requirement.....now if we want to update those new AAG for the already created documents like open sales order,sale order with delivery & open billing,how to proceed with that?.....any transctions do we have to execute this?.........Looking forward for your reply..........
    Regards,
    S.Kumar

    Hi,
    You can change the account assignment group in completely open orders via tcode "MASS" by selecting object type BUS2032.
    since the account assignment group will be picked from sales order, need not to be changed in open delivery or billing.
    Also for partial processed order would advise pls do not change the account assignment group. Another option could be to close the open orders and creat equivalent qty new order with correct account assignment group.
    Pls check & revert.
    Regards
    Sanjay

  • Change in Account Assignment group in Open Sales orders

    Dear All
    In SAP 4.7 there are 100 nos of Sale order item having Account Assignment Group .
    I need to change the account assigment group field from open sale orders, but the field is grey.
    Is it possible to change the subject field.? Please help
    Regards
    BGLimaye

    If I am correct, even in creation mode, this field (Account Assignment Group) will be in grey mode and cannot be maintained manually in sale order. 
    Whatever you maintain in material master, that only will flow.  Due to some reasons, if the same is not flowing in sale order and you want to rectify this,  if you ask me, the only option is close those line items, maintain the account assignment group in material master, create LSMW for VA02 and include as new line items.
    thanks
    G. Lakshmipathi

  • Looking for a good group texting app. Any suggestions?

    hey,
    i'm looking for an app that lets me create a group and then have a group conversation with everyone in that group where we can all see the comments of other people. For example, if i need to talk to the family in a group conversation I want to create a group and call it my "my family" And type in "my family" when I want to do a group message. I need it to work on both iOS and android. I welcome any suggestions. Thank you!

    WhatsApp.

  • Material Account Assignment Group, in Sales Order Mass Update

    Sd Experts,
    We just went live, our consultant updated Account assignment group at the material level but did not updated existing materials. When we caught the problem and updated exisisting materials there were some existing orders already created. Which now I am getting an account determination error due to this field being empty at the material level.
    We have some sales orders that I need to update but they are just too many, currently I have been fixing them thru VF02, for to the material and update manually.
    Does anyone has any idea how to mass update this field for all existing orders, to update "Account Assignment Group" field automatically
    Your help will be greatly appreciated.

    Hi
    In Mass transaction choose object type as #BUS2032,after executing in the next screen from the tables choose#Sales Order Item Data, and from the fields choose#AcctAssgGr (MASSSDHE)-MASSSDHEAD_S-KTGRD, now execute to find fields Sales document and Sales Document item , here load all the Sales Orders for which the change is needed along with the items for which the changes are needed execute again to find the next screen with Sales Documet, Sales Document item and Account assignment which needed to be changed,now select the entire block enter new values in the Account assignment  box in the above, click on the 'Carry out MAss change button ' and then save, it will take some time basing the change tobe carried and issues a log as to how many documents were changed
    Hope this is clear,please do a test run before.
    Regards
    Chandra

  • Mass change of account assignment group in sales order

    Dear All.
    We have created a new Account assigement group and assigned revenue accounts to it.When the orders are registered this data will flow from the master data automatically.Where as in the open orders i need to make the changes manually.Is there a provision in std SAP to Mass change a filed in  sales order .Like we do in MM17 or XD99 .Kindly let me know.
    Thanks in advance .
    regards,
    K.Vivek

    Hi,
    Go to XD99,
    1. Select the table ie KNVV in the tables tab, select the fields tab and select the fields u would like to change for eg Acct assignment group
    2. Execute the report
    3. U will come to the screen where u can restrict the entries.
    Enter the criterion say
    Cust: Test 1
    Sales Org 8000
    Dist 08
    Div 08
    4. Again press execute
    5. Enter the new values you would like to have
    6. Now select columns of the new values and press carry out mass maintainence button in the new values area
    7. Press Save
    8. u will then receive a success message
    Best regards
    Mahesh

  • Need suggestion

    hi....i need suggestion on my problem.i've been given a complete atand-alone java application.my assignment is to make the system,a web-based system so that when we want to make a demo we did not need to bring an installer.just show to from the browser.i thought of using java web start.it's just my opinion.so,i want to hear others opinion......
    Tq

    Java Web Start is the solution I would choose. You must bear in mind that a browser is not enough to run Java Web Start - the client PC must have the correct version of the run-time environment (JRE) installed as a minimum - which, I think, is somewhere about a 10-15 megabyte installation.
    The run-time environment for end-users is best/readily installed from the http://www.java.com site. Click the "get it now" button and away you go!
    Alternatively, I think some PCs actually recognise when you've clicked on a JNLP link and automatically check your to see if you have a version of the JRE and download it if necessary - but I'm not 100% sure if this can be relied upon across all platforms/browsers...
    I think you can also program your JNLP file as to where to look for the JRE installer (ie: maybe on your LAN instead of www.java.com), but I haven't researched that one yet.

  • Account Assignment Group in DBM Order

    Hey Experts,
    When I change the account assignment group (AcctAssgGr) in DBM order split screen for the customer in the transaction level it is not taking the changed accont assignment group. Basically I want to overwrite the account assignment group given in the customer master record. Please advice.
    This requirment is basically since the customer is defined as a credit customer, but at times the customer will have cash sale transactions as well. Thus the account that needs to be posted is different. For this I need to change the account assignment group in the transaction level without changing the master record.
    Hope the question is clear.

    Hi,
    yes I found that this is standard behavior programmed, i.e. AAG is picked from customer master while passing to billing document. Only way I think is to use user exit
    USEREXIT_FILL_VBRK_VBRP in program SAPLV60A
    Below is sample code:
       DATA: lo_order   TYPE REF TO /dbm/cl_order.
       FIELD-SYMBOLS:  <ls_splhdr>   TYPE /DBM/SPLIT_COM.
       if xkomfkgn-/dbm/vbeln IS NOT INITIAL.
       and xkomfkgn-/dbm/splnr IS NOT INITIAL.
       PERFORM get_order_object_for_billing IN PROGRAM /dbm/saplorder_int
                                                    USING fkomfkgn-/dbm/vbeln
                                                 CHANGING lo_order.
       CHECK lo_order IS BOUND.
    * transport charg from order item to the invoice
       READ TABLE lo_order->MT_SPLHDR_COM WITH KEY vbeln = fkomfkgn-/dbm/vbeln
                                                SPLNR =  fkomfkgn-/dbm/splnr
                                                  ASSIGNING <ls_splhdr>.
        VBRK-ktgrd = <ls_splhdr>-ktgrd.
       endif.

  • Rev account determ based on customer account assign group of ship to party

    Hi
    In our company revenue account gets determined based on Sales org/cust acc assignment group / mat acc assignment grp / Dest Cntry / ActKy (VKOA table 502) . Customer account assignment group and Dest country are from sold to party customer account assignment group.
    Our client wants these to come from ship to party rather on sold to party, I checked fields and tables in SPRO-> sales & dist  How can we achieve this?
    Thanks,
    Vaishnavi

    Hello,
    As per my knowledge, the Dest country, Shipping Address & other shipping related data are determine from SH-Ship to party.
    Whereas, pricing & shipping condition related data are determines from Sold to Party.
    To add 501-Sales org/cust acc assignment group / mat acc assignment grp / Dest Cntry / ActKy for your VKOA is not a standard table. check the same using tcode in V/14.
    Thus, I like to conclude by stating that the Destination country is actually is determined from Ship to Party, not Sold to Party and the table suggest/maintain is the best solution to your customer requirement.
    Thanks & Regards
    JP

  • Suppress duplicate notifications if member and manager in assignment group are same

    Hello All,
    We are currently using out of the box notification mechanism in HPSM 9.32. I have added few notifcations for SD, IM, CM and PM Modules.
    I would like to know if there is a way to suppress duplicate email notification being sent to the same person if he/she is of the member as well as manager or coordinator of the same group.
    Currently HPSM is sending 2 emails notifications to the same person one which configured to be sent to the manager of the group and another to the assignment group. Hence, manager is also one of the member in the assignment then he is getting 2 email notifications.
    I need your assistance in suppressing such duplicate email notifications.
    Regards,
    NSEIL

    I have CRXI, so the instructions are for this release
    you can create a formula, I called it cust_Matches
    if = previous () then 'true' else 'false'
    IN your GH2 section, right click the field, select format field, select the common tab (far left at the top)
    Select the x/2 to the right of Supress  in the formula field type in
    {@Cust_Matches} = 'true'
    Now every time the {@Cust_Matches} is true, the CustID should be supressed,
    do the same with the other fields you wish to hide.  Ie Address, City, etc.

Maybe you are looking for