<?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: How to convert the sensor data which is in unusual format to the Jason format. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234672#M196492</link>
    <description>&lt;P&gt;Thanks Matt your reply and its very helpful to me. yes..this is not proper JSON. It's just like RAW data.&lt;/P&gt;&lt;P&gt;That means I have to shape the data first and then convert it to the JSON.&lt;/P&gt;&lt;P&gt;I will try to do that above way you mentioned.&lt;BR /&gt;&lt;BR /&gt;I have a another question about nifi.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What are the key features or benefits of using NiFi and how it different from other products?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance! &lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 18:41:32 GMT</pubDate>
    <dc:creator>charith_dharsha</dc:creator>
    <dc:date>2019-02-21T18:41:32Z</dc:date>
    <item>
      <title>How to convert the sensor data which is in unusual format to the Jason format.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234670#M196490</link>
      <description>&lt;P&gt;I am very new to the nifi and have problem casting stream data are generated through sensors over the Internet of Things environment as follows.I want to convert that data to the Jason format using nifi.  Sensor data in edge side saved into the sensordata.csv file and using [Tailfile processer] in Minifi send data to the Nifi using S2S(siteTosite). Data reached to the nifi side and s2s works fine.  I tried to do this using below procesers in nifi, but not going well.  &lt;/P&gt;&lt;P&gt;convertCSVtoAvro &amp;gt; convertAvroToJason  &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Anyone has good idea to do this?  &lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Edge data as follows.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;"{'magnetometer': (75.26935286935287, 0.14993894993894993, -13.194627594627594), 'barometer': (27.7, 1010.44), 'temperature': 0.0, 'accelerometer': (-0.01123046875, 0.0419921875, 2.02001953125), 'battery': 79, 'timestamp': '2019-02-20 17:52:39.099323+09:00', 'humidity': (27.42401123046875, 46.136474609375), 'lightmeter': (-0.00341796875, 0.03564453125, 2.0185546875), 'address': u'98:07:2d:26:d6:82', 'gyroscope': (-2.4871826171875, 1.15966796875, 0.823974609375)}"&lt;/P&gt;&lt;P&gt;"{'magnetometer': (75.26935286935287, 1.4993894993894994, -12.444932844932845), 'barometer': (27.71, 1010.46), 'temperature': 0.0, 'accelerometer': (-0.01171875, 0.03662109375, 2.02685546875), 'battery': 79, 'timestamp': '2019-02-20 17:52:53.226606+09:00', 'humidity': (27.42401123046875, 46.136474609375), 'lightmeter': (0.0, 0.04443359375, 2.01904296875), 'address': u'98:07:2d:26:d6:82', 'gyroscope': (-2.47955322265625, 0.885009765625, 0.87738037109375)}"&lt;/P&gt;&lt;P&gt;"{'magnetometer': (76.01904761904761, 0.29987789987789987, -10.195848595848595), 'barometer': (27.71, 1010.37), 'temperature': 0.0, 'accelerometer': (-0.0068359375, 0.04541015625, 2.01513671875), 'battery': 79, 'timestamp': '2019-02-20 17:53:07.076272+09:00', 'humidity': (27.40386962890625, 46.234130859375), 'lightmeter': (-0.0126953125, 0.0458984375, 2.021484375), 'address': u'98:07:2d:26:d6:82', 'gyroscope': (-2.35748291015625, 0.946044921875, 0.67901611328125)}"&lt;/P&gt;&lt;P&gt;"{'magnetometer': (73.76996336996336, -0.29987789987789987, -13.194627594627594), 'barometer': (27.71, 1010.44), 'temperature': 0.0, 'accelerometer': (-0.00537109375, 0.041015625, 2.01611328125), 'battery': 79, 'timestamp': '2019-02-20 17:53:21.106742+09:00', 'humidity': (27.40386962890625, 46.234130859375), 'lightmeter': (-0.00537109375, 0.0419921875, 2.01708984375), 'address': u'98:07:2d:26:d6:82', 'gyroscope': (-2.0904541015625, 1.01470947265625, 0.9613037109375)}"&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 18:55:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234670#M196490</guid>
      <dc:creator>charith_dharsha</dc:creator>
      <dc:date>2019-02-20T18:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the sensor data which is in unusual format to the Jason format.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234671#M196491</link>
      <description>&lt;P&gt;Is this a standard format (I know it's not proper JSON but is it some other standard format)? If not, you could write a ScriptedReader to parse your records. If all the data looks like the above though, you could use ReplaceText to replace ( with [ and ) with ], also remove the "u" prefix from some strings (like the address field), thereby converting it to proper JSON so you can use components like JsonTreeReader for example. &lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 22:55:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234671#M196491</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2019-02-20T22:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the sensor data which is in unusual format to the Jason format.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234672#M196492</link>
      <description>&lt;P&gt;Thanks Matt your reply and its very helpful to me. yes..this is not proper JSON. It's just like RAW data.&lt;/P&gt;&lt;P&gt;That means I have to shape the data first and then convert it to the JSON.&lt;/P&gt;&lt;P&gt;I will try to do that above way you mentioned.&lt;BR /&gt;&lt;BR /&gt;I have a another question about nifi.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What are the key features or benefits of using NiFi and how it different from other products?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance! &lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:41:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-convert-the-sensor-data-which-is-in-unusual-format-to/m-p/234672#M196492</guid>
      <dc:creator>charith_dharsha</dc:creator>
      <dc:date>2019-02-21T18:41:32Z</dc:date>
    </item>
  </channel>
</rss>

