We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Hashing Data to verify integrity

Comments

3 comments

  • Avatar
    Gerry Mullin

    I think this will get you started at least. Using a Transform node, I took it that you wanted all of the data on single row and then to hash the combination of that row. On each new row variable toHash is set to a blank string, from there I just keep on appending the data into a large string (excluding Nulls) and then finally use hash() on it, to get a has for a row.

    toHash = ''

    for fn in fields:
    fv = str(in1[fn])
    if fv is not Null:
    toHash += fv

    hashValue = hash(toHash)
    out1.HashResult = hashValue
    0
    Comment actions Permalink
  • Avatar
    Pablo Gonzalez

    Thanks so much Gerry! I'm having trouble getting any rows out, could you please have a look and help me understand what I'm doing wrong?

     

     

    Attached files

    HasshingAddresses.lna

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    You need to define the metadata for the new output field that is to hold the computed hash value. In the example below a 'long' data type is being used (but you could specify it as 'unicode' if you wanted the value to be output as a string instead of a numeric value). The final statement in the ProcessRecords script assigns the hash value to the new field in the output record.

    0
    Comment actions Permalink

Please sign in to leave a comment.