39:11
2024-05-06 08:57:50
3:11:28
2024-05-06 10:30:19
24:39
2024-05-07 07:20:20
19:49
2024-05-07 08:03:25
1:14:35
2024-05-07 08:35:13
15:41
2024-05-07 10:06:25
38:33
2024-05-07 10:37:03
2:48
2024-05-07 11:19:01
59:37
2024-05-07 11:33:56
6:10
2024-05-07 14:55:25
39:40
2024-05-07 15:02:44
9:45
2024-05-08 06:44:21
29:27
2024-05-08 08:09:24
2:51:40
2024-05-08 12:09:24
Visit the Apache Nifi - GROUP 1 course recordings page
WEBVTT--> Pedro, how are you looking? --> All right, I guess. --> I was able to get the JSON into a... --> I compiled the CSVs into the new JSON format. --> Oh, awesome. --> Now I was just kind of like --> putting some kind of data in there, but I just kind of got stuck. --> Take that data and --> send it to an evaluate JSON processor, and then you can --> extract all of those values if you need. --> And you can then manipulate them. --> The evaluate JSON processor, you want to do --> content as an attribute, and it will save it all as an attribute. --> And then you can actually then go through and, as an attribute, --> modify the data, combine the data, --> do averages, whatever. --> Yeah, I was kind of moving in to see what I can get. --> I was trying to extract the text and then put it into an attribute. --> And then I guess it can be updated. So I was trying to see if I could just put in the --> kind there. --> Look at the evaluate JSON. Evaluate JSON I think will be very helpful. --> Across the board for everyone. Just because it's pretty easy --> once you have where you're at, you can do an evaluate JSON --> and it will pull all --> of that data up as an attribute and you're good to go. --> So if I was designing this flow route and I was trying to do it extremely --> quickly, I would have a git file --> grabbing the two CSVs. I would kind of reuse --> the previous step where I converted that to JSON, --> but then take all three of those JSONs, send it to an evaluate JSON --> processor, extract the values, and then --> once I have them all as an attribute, it's easy to --> manipulate. But I think you're on the --> right path. So yeah, if you see that evaluate JSON path, --> and you send a JSON, a little tip on this one, --> go to the properties and evaluate JSON path, and the destination, --> you want it to be flow file attribute, not content. --> And then say OK. --> And then you can just hit plus and start --> adding in the path --> to extract the data. --> So for instance, --> let me see if I can... --> So if you, for instance, you --> can use, depending on the --> JSON, right, you can... --> OK. So --> can you open up one of your JSON documents right quick? --> Awesome, awesome, awesome. --> So, so, --> for station ID, I would name this one like station ID. --> So go back to your, configure your processor. --> You can do station ID. --> I would do all lowercase and then say OK. --> And then what you're looking for here is the --> path in the JSON. So you want to put --> $. and then look at your JSON --> station ID. --> Just copy that --> and paste it in. And so what it's doing --> is, and you may have to reformat your JSON --> for the rest of this, but what it's going to do, what this would do --> is it would extract station ID and --> create a key pair value as an --> attribute. So if you say OK here and you say apply, when --> that JSON goes through that processor, --> it's going to extract the data from station ID --> and then save that as an attribute. And so what you're --> able to do is --> keep adding these property and values and --> you would be able to extract all of those attributes as key pairs. --> And then you can --> manipulate those, do whatever you need, because they would --> now be an attribute. And then use the attributes to JSON --> to save the file --> as a JSON document with the temperature --> alert or whatever that's in this scenario. --> So, --> yeah, and you just leave the past. --> So basically grab all of the values from my JSON file --> and then store them as something. These are like variables kind of? --> Correct. Store them as an attribute. Yep. --> And then we'll kind of compile all of those into one --> and then you can do whatever you want with that. --> Exactly, exactly. --> So the key here, you're looking at the evaluate --> JSON path, those types of processors, --> you're looking at attributes to JSON to write the final --> JSON document, but you're getting very, very --> close. Awesome, yeah. I mean, I would have to definitely play with it --> a little bit more, but I think I see where you're getting at. OK. Yeah, --> we're a couple minutes over, but just play with it --> and let me know how it goes. But those are definitely --> some of the things that you might want to take a look at. --> And then we'll talk about it in the morning.