<?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/336671#M232342</link>
    <description>&lt;P&gt;The spec below does almost what you need. The only thing is that your data points are numbered starting from 1 and JSON array are zero-based, so when the Jolt transformation is applied the first element of the "measures" array is left null.&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"
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;</description>
    <pubDate>Sun, 20 Feb 2022 11:39:56 GMT</pubDate>
    <dc:creator>araujo</dc:creator>
    <dc:date>2022-02-20T11:39:56Z</dc:date>
  </channel>
</rss>

