Data360 Analyze

 View Only
  • 1.  How can I Add a numbered Index column to my data?

    Posted 05-11-2024 10:51

    Hi all, I hope you can assist me.

    I'm trying to add a numbered index column to my data.

    I have had no luck with finding an option to do this with the vanilla nodes or with Python.

    Has anyone been able to do this?

    Any assistance would be appreciated.



    ------------------------------
    Joshua Wall
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: How can I Add a numbered Index column to my data?

    Employee
    Posted 05-12-2024 02:23

    You can do this in a Transform node with some Python scripting.

    The ConfigureFields script is executed once when the node is run and this happens before the first record is read/processed.

    The metadata and initial value of the counter variable used for the index (Rec_ID) is defined in the ConfigureFields script.

    Using the ProcessRecords script, the counter value is output and then incremented for each input record.



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: How can I Add a numbered Index column to my data?

    Posted 05-12-2024 09:24

    Hi Adrian.

    This worked perfectly!

    Thank you very much for your assistance.



    ------------------------------
    Joshua Wall
    Knowledge Community Shared Account
    ------------------------------