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.  Data aquisition, rotate node?

    Employee
    Posted 11-03-2011 15:27

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

    Originally posted by: phudson

    Hi, how do I extract Name and corresponding Service Profile Name from below file format? Note each customer has 10 rows of data.

    Service ID : 1
    Name : kennethpatnett
    Subscriber Name : BTL_BMP
    Service Profile Name : BMAX_512
    SU MAC Address : 00-10-e7-8a-90-92
    Hybrid VLAN Mode : On
    VLAN Classification Mode : Off
    Access Vlan : 243
    Admin Status : Enabled
    Operation Status : Up
    -------------------------------------
    Service ID : 2
    Name : Lo Chih En
    Subscriber Name : BTL_BMP
    Service Profile Name : BMAX_1024
    SU MAC Address : 00-10-e7-8a-88-df
    Hybrid VLAN Mode : On
    VLAN Classification Mode : Off
    Access Vlan : 245
    Admin Status : Enabled
    Operation Status : Up
    -------------------------------------
    Service ID : 3
    Name : Test unit
    Subscriber Name : BTL_BMP
    Service Profile Name : BMAX_1024
    SU MAC Address : 00-10-e7-8a-8f-23
    Hybrid VLAN Mode : On
    VLAN Classification Mode : Off
    Access Vlan : 244
    Admin Status : Enabled
    Operation Status : Up

    I need this result:

    Name, Service Profile Name
    kennethpatnett, BMAX_512
    Lo Chih En, BMAX_1024
    Test unit, BMAX_1024

    Any suggestions? See attachment.
    Attachments:
    BMP 11102011.TXT


  • 2.  RE: Data aquisition, rotate node?

    Employee
    Posted 11-03-2011 22:11

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

    Originally posted by: mgajdosik

    Hi,

    for that you need kind of specific reader, I have created one very simple for you, you probably may need to clean the code a bit, in case of some additional items will appear in your datafile.

    Of course there are thousands of different ways how to handle reading such files, this is only one of them.

    It extracts all the values from your file, not only the ones you specified, you can exclude them in next filter.

    If you have any questions, please let me know.
    Attachments:
    Reader.brg


  • 3.  RE: Data aquisition, rotate node?

    Employee
    Posted 11-04-2011 07:32

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

    Originally posted by: phudson

    Pivot node giving this error: Error while starting execution of node ''
    No executor for type: core::Pivot - Data To Names

    I think it might be an issue with the version of LAE I am using.


  • 4.  RE: Data aquisition, rotate node?

    Employee
    Posted 11-04-2011 14:55

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

    Originally posted by: mgajdosik

    Hi,

    I guess you are not at 4.5 version, so that is why it does not work for you. So instead you can use rotate node, so just replace the last node in the graph I created.

    and put in following params:

    NameField = Field
    ValueField = Value
    PivotField = SID
    IgnoreExtraNames = True

    It should work almost the same way as the previous with small difference. If there is certain field appearing only for some SIDs, then this field will not be in the output. In this case it is VLAN field, which is popullated only for one customer I think.

    once you upgrade to 4.5.X just replace the rotate by the orginal node I sent and you are still ok.

    Let me know if you have any further issues or questions.

    Marek


  • 5.  RE: Data aquisition, rotate node?

    Employee
    Posted 11-12-2011 04:40

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

    Originally posted by: henk01

    Hello,

    Actually, all can be done is a single aggregation node. The key is to keep retrieving values, until a �group� separator is found (here a line with �------�), or when reaching the end of the file.

    When a �group� separator is found, simply output the current values, and reset the values for the next section (after the emit).

    Please find the BRG attached, please note:
    Record.split(" : ")[0] is the same as Record.split(" : ").getItem(0)
    Attachments:
    reader_test_.brg


  • 6.  RE: Data aquisition, rotate node?

    Employee
    Posted 11-13-2011 04:54

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

    Originally posted by: henk01

    Hello,

    Just to clarify, I did mention the �coding� option to show another option which may be of interest. I also assumed that the record does consist of 10 rows.

    Of couse Marek�s solution is a very good one, as no hard-coding of column names is required. No maintenance is required if fields are added in future.

    So just for completeness, including the first solution (Marek�s) as well but using the static data node to produce 10 rows for each record (and using rotate).

    Best regards,

    Henk
    Attachments:
    reader_test_2.brg


  • 7.  RE: Data aquisition, rotate node?

    Employee
    Posted 12-15-2011 15:56

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

    Originally posted by: phudson

    Thanks Henk. Works like a charm!!!


  • 8.  RE: Data aquisition, rotate node?

    Employee
    Posted 12-15-2011 16:14

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

    Originally posted by: phudson

    I have a similar scenario below. I need to be able extract:

    IMSI, 1STPROFILE, 2NDPROFILE, 3RDPROFILE
    702670160001001, PROFILE1 1, PROFILE4 4
    702670160001003, PROFILE1 1, PROFILE4 4
    702670160001010, PROFILE1 1, PROFILE4 4, PROFILE5 5

    from:
    MCC MNC MSIN PDPLIST
    --------------------
    702 67 0160001001
    (PROFILE1 1 $)
    (PROFILE4 4 $) $
    702 67 0160001003
    (PROFILE1 1 $)
    (PROFILE4 4 $) $
    702 67 0160001010
    (PROFILE1 1 $)
    (PROFILE4 4 $)
    (PROFILE5 5 $) $


  • 9.  RE: Data aquisition, rotate node?

    Employee
    Posted 01-11-2012 15:26

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

    Originally posted by: rboccuzzi

    I'm not sure this will work, but on the small set you showed it should....I assume that I can clobber "(", ")", and "$" from your data everywhere. If that is true, I think this works. Note, it needs 4.5.x to work, as I use the new pivot node.

    Cheers
    Rich
    Attachments:
    reader_test_3.brg