Welcome back. In this video, I will show you how to generate the DW by using drag and drop. And also with the help of data fence, or do I mean by data fence? Let us see. It happens project scatter gather start, I'll be working on it to show you a demo. Here.
This is a flow which is making a call to rest API for slash products. And I know the output will be Jason, which is nothing but list of products. I want to be converted to a list of Java objects products. This is what I want to achieve. So do I have sample data? No, I have I don't have sample data.
I have sample data in this Transformers complex and copy I should know sample data Firstly, copy paste here. Okay. Now, in transform message here right now I have just written payload, right. I want to do transformations complex things. So to maximize it I'll define the input metadata by clicking on define metadata is click on Add and say broad duck products JSON. Create guide and I know it's of type Jason select example.
And point to see me resources, forex or Jason, okay. So I know the input manager. It is shown like this on the left side, let us see, let's wait till it is resolving the metadata. So the left side, I know that it is an area of product. On the right side, I want to convert a list of Java product. So I'll click on output metadata and say products list.
I know that it is of type Java on the right side, I'll convert it to object. What is the list right? So I select this Java object. product type here. Yep. So if we sell a product actually It is single product, I want to wrap it in a collection element.
Select looks up. Let's see on the right side. It is an edit in the right city underrated also. I will clear this metadata the green defilement product insert what I'll do is I'll select Java object and select the data structure. Select an option. product list is a pipe production.
I'll wrap it in a collection Kurt Samson. I don't won't do any modification. So output metadata should be an area for this. Now what I'll do is on the left side I have brand name I'll drag and drop from here to here. See you're automatically the DW is generated. Excellent.
Now in I will drag and drop product ID. Exactly. Yes, Nene. Yes. Description. Yes.
Offer price. Offer valid until if I try to drag offer on top of offer just concatenating is it plus, plus or wrest control. I want to remove a mapping. I will right click on this and I'll say remove field mappings. Remove field mappings, drag offer on top of this offer the same thing, right? Yes.
Select that what I dragged and Robin Mmm. So basically, the left side of Transformers is component. If there is any component where we can actually specify the metadata based on the metadata, I'll be able to actually see the input here and I'll drag and drop, select it for anything. You can actually use drag and drop. And then see here for this transform message, actually, the left side is consume that service consumer. And let's observe the input right now.
Just resolving the metadata Yeah. So, you can see the input like this, you can even define the input mandate output image editor drag and drop it select that by using drag and drop, you can actually convert ad input to any output on the right side. So the solution is, whenever you want write transformations, first define the metadata of the input and output drag and drop and maybe some small modifications inside your dw. You can do it by just typing whatever small small modifications formattings you want in the result nj resultant. dw. Actually, for database component if you see here, it's firing a query Select star from product define the input metadata no Actually, this database endpoint supports something called Data sense.
It automatically define some metadata. We don't need to define the metadata. After the database component, it supports data sense. If there is any component which supports data sets to the left side or right side of transform message, we don't need to define the metadata explicitly. Right? So that's a very good feature of mule soft data.
Since there are many components which support data sense, database endpoint is one which supports right. And actually, a web service consumer also should support you can see that here on the left side is trying to resolve the metadata. Just wait on the left side, let us see what shows it's not actually showing the examiner. Why. And here I'm seeing there are marks because I didn't Start my soap dot bat. Actually, if the soap web service is started, and if it is reachable, the web service consumer will automatically make a call to the wisdom, download the wisdom and automatically generate the metadata.
But since I didn't start my soap web service, actually, I'm not able to see the metadata, right. But if I have a soap web service running, the input, metadata will be automatically generated, we can just drag and drop to generate any of the web. Right? So that's about drag and drop and data science. I will see you again next time.