ip_lookup_formatter.py

import schema

def dat_hnd(rec):
    if not rec.get('raw_ip'):
        rec['raw_ip'] = ''
    return [rec]

def schema_handler_v1(sch):
    schema.drop_fields(sch, "raw_ip")
    schema.add_fields(sch, schema.Field(name="raw_ip", schema=schema.StringSchema()))
    return sch, dat_hnd
  • Table of contents

Was this article helpful?