Results 1 to 9 of 9

Thread: Data aquisition, rotate node?

  1. #1

    Default Data aquisition, rotate node?

    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.
    Attached Files Attached Files
    Last edited by phudson; 11-03-2011 at 10:35 PM.

  2. #2
    Contributor
    Join Date
    Aug 2009
    Location
    The Hague, Netherlands
    Posts
    64

    Default Specific Reader

    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.
    Attached Files Attached Files

  3. #3

    Default Pivot node does not work...

    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. #4
    Contributor
    Join Date
    Aug 2009
    Location
    The Hague, Netherlands
    Posts
    64

    Default Rotate Node instead

    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. #5
    Lavastorm Employee
    Join Date
    Jun 2009
    Location
    UK
    Posts
    18

    Default

    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)
    Attached Files Attached Files
    Henk Thomas

  6. #6
    Lavastorm Employee
    Join Date
    Jun 2009
    Location
    UK
    Posts
    18

    Default

    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
    Attached Files Attached Files
    Henk Thomas

  7. #7

    Default

    Thanks Henk. Works like a charm!!!

  8. #8

    Default

    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. #9
    Contributor
    Join Date
    Dec 2006
    Location
    Boston
    Posts
    485

    Default

    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
    Attached Files Attached Files

Similar Threads

  1. Replies: 5
    Last Post: 01-10-2012, 05:38 PM
  2. Problem with code pages when run CSV aquisition node
    By dvs79 in forum Data Acquisition
    Replies: 1
    Last Post: 06-09-2011, 02:58 PM
  3. Rotate Basics
    By phourigan_MDS in forum Nodes
    Replies: 10
    Last Post: 10-23-2009, 06:36 PM
  4. Rotate Data
    By johnpelz in forum Nodes
    Replies: 4
    Last Post: 06-04-2008, 11:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •