<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Converting SQL record to JSON in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Converting-SQL-record-to-JSON/m-p/336674#M232344</link>
    <description>&lt;P&gt;I've added a "remove" operation to the chain to solve the problem I mentioned in the last post, removing the "null" in the first position of the "measures" array:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "LevelID": "assetId",
      "PLCTime": "datapoints[0].timestamp",
      "Data*Type": "datapoints[0].measures[&amp;amp;(0,1)].name",
      "Data*": "datapoints[0].measures[&amp;amp;(0,1)].value"
    }
  },
  {
    "operation": "remove",
    "spec": {
      "datapoints": {
        "*": {
          "measures": {
            "0": ""
          }
        }
      }
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should give you the exact output you were looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 01:31:16 GMT</pubDate>
    <dc:creator>araujo</dc:creator>
    <dc:date>2022-02-21T01:31:16Z</dc:date>
  </channel>
</rss>

