gravy_mapper_schemas.yaml

schema_mappings:
  gravy_geo_to_aqfer_geoevent_mapping:
    input_schema: gravy_precision_geo_input
    output_schema:
      name: geoevent_mapping
    if_missing: ""

    column_mappings:
      tenant_id:
        type: const
        value: "t1"
      entity_type:
        type: const
        value: "prsn"
      entity_domain: "devicetype"
      event_date:
        type: expr
        expr: "${timestamp}"
        transformations:
          - type: type_conversion
            output_data_type: long
          - type: type_conversion
            output_data_type:
              type: date_part
              format: "yyyyMMdd"
      event_hour:
        type: expr
        expr: "${timestamp}"
        transformations:
          - type: type_conversion
            output_data_type: long
          - type: type_conversion
            output_data_type:
              type: date_part
              format: "HH"
      run_id: $runid

      entity_id: "advertiserid"
      aq_evid:
        type: const
        value: ""
      event_id:
        type: expr
        expr: "${advertiserid}-${timestamp}-${devicetype}-" #! timestamp will be appended by python
      event_timestamp: "timestamp"
      event_type:
        type: const
        value: "geoev"
      event_subtype_1:
        type: const
        value: ""
      event_subtype_2:
        type: const
        value: ""
      event_actions:
        type: list
        elements: [ ]
      hashed_ip:
        type: expr
        expr: "${ipaddress}"
        transformations:
          - type: hash
            algorithm: SHA-256
      source:
        type: const
        value: "gravy"
      browser:
        type: const
        value: ""
      browser_version:
        type: const
        value: ""
      device_type:
        type: const
        value: ""
      network:
        type: const
        value: ""
      network_type:
        type: const
        value: ""
      os:
        type: const
        value: ""
      os_version:
        type: const
        value: ""
      throughput:
        type: const
        value: ""
      user_agent:
        type: const
        value: ""
      area_code:
        type: const
        value: ""
      city:
        type: const
        value: ""
      country_code:
        #! value defined from python code
        type: const
        value: ""
      dma:
        type: const
        value: ""
      fips:
        type: const
        value: ""
      global_region:
        type: const
        value: ""
      latitude: "latitude"
      longitude: "longitude"
      msa:
        type: const
        value: ""
      region_code:
        type: const
        value: ""
      timezone:
        type: const
        value: ""
      zip:
        type: const
        value: ""
      other_geo:
        type: map
        entries:
          geo_hash: "geohashnine"
      http_status_code:
        type: const
        value: ""
      other_event_ids:
        type: map
        entries: { }
      others:
        type: map
        entries:
          forensicflag: "forensicflag"
          timezone: "timezone"
      metrics:
        type: map
        entries: { }
      horizontal_accuracy:
        #! TBD
        type: const
        value: 0

      other_entity_keys:
        type: list
        elements:
          - type: inner
            column_mappings:
              entity_type:
                type: const
                value: "ip, grid"
              entity_domain:
                type: const
                value: "raw, raw"
              entity_id:
                type: expr
                expr: "${ipaddress}, ${grid}"

      policy:
        type: list
        elements:
          - type: inner
            column_mappings:
              policy_id:
                type: const
                expr: ""
              policy_effective_date:
                type: const
                value: ""
              effectivity:
                type: const
                value: ""
              policy_detail:
                type: list
                elements: [ ]
  • Table of contents

Was this article helpful?