curl -X PUT "http://192.168.10.106:19200/_ingest/pipeline/add_timestamp" -H "Content-Type: application/json" -u "elastic:elastic16313302" -d '
{
  "processors": [
    {
      "set": {
        "field": "timestamp",
        "value": "{{_ingest.timestamp}}"
      }
    }
  ]
}
'


curl -X PUT "http://192.168.10.106:19200/_transform/top10_udid_acctno_smartfds_predict_transformed" -H "Content-Type: application/json" -u "elastic:elastic16313302" -d '
{
  "source": {
    "index": [
      "smartfds_predict"
    ],
    "query": {
      "range": {
        "create_datetime": {
          "gte": "now-180d/d",
          "lte": "now/d"
        }
      }
    }
  },
  "dest": {
    "index": "top10_udid_acctno_smartfds_predict",
    "pipeline": "add_timestamp"
  },
  "pivot": {
    "group_by": {
      "operator_id": {
        "terms": {
          "field": "operator_id"
        }
      },
      "institute_id": {
        "terms": {
          "field": "institute_id"
        }
      },
      "udid": {
        "terms": {
          "field": "diiaInfo__deviceInfo__udid"
        }
      }
    },
    "aggregations": {
      "distinct_acctNumbers": {
        "cardinality": {
          "field": "txInfo__acctNumber"
        }
      }
    }
  },
  "settings": {}
}
'

curl -X POST "http://192.168.10.106:19200/_transform/top10_udid_acctno_smartfds_predict_transformed/_start"