LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  splitting dataset into two tables

    Employee
    Posted 09-11-2013 17:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tekaleka

    Hi, I have the following data which i wish to split into two different tables please.

    AnsTime AnsDate Charge Instance ANumber BNumber ActualDuration CallDuration CallCost Balance
    22:59:56 9/7/2013 500 24294062 7777777 777777777777 0 0 5 1508
    22:59:56 9/7/2013 500 24294061 7777777 777777777777 0 0 5 1008
    22:59:54 9/7/2013 500 24147060 1111111 111111111111 0 0 5 1057
    22:59:54 9/7/2013 500 24147059 1111111 111111111111 0 0 5 557
    22:59:45 9/7/2013 500 24293946 2222222 222222222222 0 0 5 903
    22:59:45 9/7/2013 500 24293945 2222222 222222222222 0 0 5 403
    22:59:18 9/7/2013 500 24146624 3333333 33333333333333 0 0 5 991
    22:59:18 9/7/2013 500 24146623 3333333 33333333333333 0 0 5 491
    22:58:47 9/7/2013 500 24146263 4444444 44444444444444 0 0 5 907
    22:58:47 9/7/2013 500 24146262 4444444 44444444444444 0 0 5 407
    22:58:30 9/7/2013 500 24293001 5555555 55555555555555 0 0 5 1044
    22:58:30 9/7/2013 500 24293000 5555555 55555555555555 0 0 5 544

    I need to be able to split this into two separate table preferably using Instance or Balance field.

    Really appreciate your help.


  • 2.  RE: splitting dataset into two tables

    Employee
    Posted 09-12-2013 12:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tekaleka

    soory if i am unclear..i need to slit this data into two separate sets of data...from the data you can see that for every 'ANumber' and 'BNumber' the rest of the fields are dublicated except for 'Instance' and 'Balance'..so if possible i need to split this data using thr 'Instance' or 'Balance' filed please...for example the first 2 rows can be splitted using the difference of the 'Instance' for R1 and the R2.


  • 3.  RE: splitting dataset into two tables

    Employee
    Posted 09-13-2013 01:52

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hey,

    So I'm not sure if this is exactly what you want, but the attached graph splits out all of the fields except Instance and Balance into the first input.
    Then, the Instance, Balance, ANumber, BNumber, AnsDate and AnsTime are written to the second output.
    The details from the first output are reduced such that there are no duplicates based on ANumber, BNumber, AnsDate and AnsTime.
    I sort of assumed that you would want the ANumber, BNumber, AnsDate and AnsTime information on the second output, since this could then be used as a key to join the two tables back together again.

    Regards,
    Tim.
    Attachments:
    DatasetSplit.brg


  • 4.  RE: splitting dataset into two tables

    Employee
    Posted 09-15-2013 13:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tekaleka

    fanxz Tim..this will work...but what i needed is for the data to be spilted and the output should be like shown below pelase

    AnsTime AnsDate Charge Instance ANumber BNumber ActualDuration CallDuration CallCost Balance AnsTime AnsDate Charge Instance ANumber BNumber ActualDuration CallDuration CallCost Balance
    22:59:56 9/7/2013 500 24294062 7777777 777777777777 0 0 5 1508 22:59:56 9/7/2013 500 24294061 7777777 777777777777 0 0 5 1008
    22:59:54 9/7/2013 500 24147060 1111111 111111111111 0 0 5 1057 22:59:54 9/7/2013 500 24147059 1111111 111111111111 0 0 5 557
    22:59:45 9/7/2013 500 24293946 2222222 222222222222 0 0 5 903 22:59:45 9/7/2013 500 24293945 2222222 222222222222 0 0 5 403
    22:59:18 9/7/2013 500 24146624 3333333 33333333333333 0 0 5 991 22:59:18 9/7/2013 500 24146623 3333333 33333333333333 0 0 5 491
    22:58:47 9/7/2013 500 24146263 4444444 44444444444444 0 0 5 907 22:58:47 9/7/2013 500 24146262 4444444 44444444444444 0 0 5 407
    22:58:30 9/7/2013 500 24293001 5555555 55555555555555 0 0 5 1044 22:58:30 9/7/2013 500 24293000 5555555 55555555555555 0 0 5 544

    appreciate your assistance


  • 5.  RE: splitting dataset into two tables

    Employee
    Posted 09-16-2013 04:07

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hey,

    In this case, it looks like you don't really want to split the data into two outputs - rather, you want a single output, where each record contains all data for a given instance and balance.
    Is this correct?
    If so, then first, you won't be able to have the data as shown in your example, since you have a lot of duplicate fields names ("ANumber", "BNumber", "ActualDuration", etc).

    Also, from your original description, you state: "from the data you can see that for every 'ANumber' and 'BNumber' the rest of the fields are duplicated except for 'Instance' and 'Balance'.."

    If this is the case, then it doesn't seem like it makes sense to have these fields twice on each record.
    However, the attached agg node will output the two different "Instance" and "Balance" fields for each combination of 'AnsTime', 'AnsDate', 'Charge', 'ANumber', 'BNumber', 'ActualDuration', 'CallDuration' and 'CallCost'.

    If this isn't what you want, then I'm not sure I understand what you are trying to do.

    Tim.
    Attachments:
    DatasetSplit2.brg


  • 6.  RE: splitting dataset into two tables

    Employee
    Posted 09-18-2013 13:21

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tekaleka

    Attached are the raw data I am dealing with..the scenario i am facing is this..for a specific time of the month we give our customer free credits that is for every time they buy $5 credit they will receive $5 free credit as well and for every time they buy $10 credit they will receive $20 free credit and for every time they buy $20 credit they will receive $60 free credit.
    *$5 credit purchase = $5 free credit + $5 purchase credit
    *$10 credit purchase = $20 free credit + $10 purchase credit
    *$20 credit purchase = $60 free credit + $20 purchase credit

    What i want to do is to differentiate the purchased credit from the free credit as they are both combined in the 'Balance' filed once the credit is being purchased as you can see in the attachment. Maybe introduce a new filed called 'Purchase Credit' and 'Free Credit', anyways i leave it to you guys.


    thanks in advance for your assistants
    Attachments:
    Raw.txt


  • 7.  RE: splitting dataset into two tables

    Employee
    Posted 09-30-2013 13:37

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: tekaleka

    Tim,

    Hi..How can I make your above example in DatasetSplit2.brg work for the following data

    AnsTime AnsDate Charge Instance ANumber BNumber ActualDuration CallDuration CallCost Balance
    22:59:56 9/7/2013 500 24294062 7777777 777777777777 0 0 5 1508
    22:59:56 9/7/2013 500 24294061 7777777 777777777777 0 0 5 1008
    22:59:54 9/7/2013 500 24147060 1111111 111111111111 0 0 5 1057
    22:59:54 9/7/2013 500 24147059 1111111 111111111111 0 0 5 557
    22:59:45 9/7/2013 500 24293946 2222222 222222222222 0 0 5 903
    22:59:45 9/7/2013 500 24293945 2222222 222222222222 0 0 5 403
    22:59:18 9/7/2013 500 24146624 3333333 33333333333333 0 0 5 991
    22:59:18 9/7/2013 500 24146623 3333333 33333333333333 0 0 5 491
    22:58:47 9/7/2013 2000 24146263 4444444 44444444444444 0 0 20 2907
    22:58:47 9/7/2013 1000 24146262 4444444 44444444444444 0 0 10 907
    22:58:30 9/7/2013 6000 24293001 5555555 55555555555555 0 0 60 8544
    22:58:30 9/7/2013 2000 24293000 5555555 55555555555555 0 0 20 2544

    thanks