Nested List Ingest Pipeline

Hey Folks.

I have a nested list inside of a list (obs - below) in some data from my tempest weather station. I want to split out the csv and I have the field names. I tried a foreach and a foreach with an append... no joy. Im pretty awful at painless. Anyone see a straight forward way to do this that I am missing?

Its quite simple to do in python outside elastic but want to figure out how to do it.

Elasticsearch: 8.5.2


        "serial_number": "ST-00000512",
        "type": "obs_st",
        "hub_sn": "HB-00013030",
        "obs": [
        "firmware_revision": 129

Figured it out… was not pretty and used a combo of painless to reassign the value to a string and then used CSV to break it out.

            "script": {
                "lang": "painless",
                "source": "ctx.temp_obs = ctx.obs[0].toString();"
            "csv": {
                "field": "temp_obs",
                "target_fields": [
                "separator": ",",
                "trim": true

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.