1
00:00:01,760 --> 00:00:07,380
Now that you already have some experience writing Gamwell files and defining pipelines in your legacy.

2
00:00:07,710 --> 00:00:13,180
I wanted to go back to the basics of Yamal and what is Yamal anyway.

3
00:00:13,520 --> 00:00:21,860
If we look at Yamal in a very, very simple way, we can say that Yamal is just a key value combination.

4
00:00:22,190 --> 00:00:23,670
So a key value pair.

5
00:00:24,710 --> 00:00:29,870
So, for example, if I define a key code name, I can assign the name John.

6
00:00:31,620 --> 00:00:38,610
So name will be like the variable, the key, and John will be a string and will hold that value and

7
00:00:38,610 --> 00:00:45,060
we can use the to store strings, but we can also use Yamal to store integers, for example.

8
00:00:45,090 --> 00:00:48,960
So if we say age is 29.

9
00:00:50,660 --> 00:00:55,050
Now, this is a new property and it says that John is 29.

10
00:00:56,080 --> 00:00:57,750
The same goes with booleans.

11
00:00:57,750 --> 00:01:01,580
So if you want to say something like mail or e-mail.

12
00:01:03,000 --> 00:01:03,780
This will be true.

13
00:01:06,340 --> 00:01:13,270
Great, apart from that, a very powerful feature in Yamal is the possibility of creating lists or arrays

14
00:01:13,270 --> 00:01:14,590
of multiple items.

15
00:01:15,020 --> 00:01:18,280
So, for example, if we see here stuff.

16
00:01:20,620 --> 00:01:22,670
Let's see what kind of stuff John John has.

17
00:01:23,470 --> 00:01:26,320
So let's type here some stuff like laptop.

18
00:01:30,790 --> 00:01:35,260
That's right here, car and bike, OK, now.

19
00:01:36,750 --> 00:01:45,990
Stuff is the property and now laptop car bikes are all items in a list, so we have here a list of items

20
00:01:45,990 --> 00:01:47,870
or an array, as you prefer to call it.

21
00:01:48,270 --> 00:01:53,700
And we can write it like this, but we can also write lists in this way.

22
00:01:54,000 --> 00:01:57,300
So freeride what kind of food John likes?

23
00:01:58,440 --> 00:02:00,120
We can also writing letters.

24
00:02:01,770 --> 00:02:03,090
Between square brackets.

25
00:02:05,640 --> 00:02:07,350
We can write Petar.

26
00:02:10,620 --> 00:02:19,080
Dunnarts and maybe coke, so this is another way we can write this this way of writing is totally similar

27
00:02:19,080 --> 00:02:19,650
with this one.

28
00:02:20,650 --> 00:02:24,960
If you're writing strength, you can also put in between double quotes.

29
00:02:26,270 --> 00:02:31,370
And that will work as well, but I think it's much more readable if you don't really write really complex

30
00:02:31,370 --> 00:02:32,860
things that you will write them this way.

31
00:02:35,300 --> 00:02:43,610
Now, let's go ahead and put everything within an object so we if we make it like that here person.

32
00:02:46,070 --> 00:02:49,130
And you make here an indentation.

33
00:02:53,630 --> 00:03:00,470
All these properties that we have created so far because they are indented under person, it will be

34
00:03:00,470 --> 00:03:02,480
children of the person object.

35
00:03:02,750 --> 00:03:06,890
So the person will have a property called name A property called H.

36
00:03:08,290 --> 00:03:17,520
Male and so on, so you can see that indentation actually shows us which property belongs to which object.

37
00:03:19,470 --> 00:03:24,460
Additionally, nothing stops us from adding other objects within an existing object.

38
00:03:24,600 --> 00:03:26,460
So, for example, if we say here, friend.

39
00:03:29,720 --> 00:03:31,550
Let's go ahead to create a list of Frente.

40
00:03:34,020 --> 00:03:34,680
And.

41
00:03:37,330 --> 00:03:38,500
A friend can be Jane.

42
00:03:40,090 --> 00:03:42,790
And she may be 19.

43
00:03:46,320 --> 00:03:47,640
Not a friend can be, Mike.

44
00:03:49,920 --> 00:03:55,530
And Mike is 22 now, what have done here, I have again, a list.

45
00:03:58,080 --> 00:04:04,230
Friends and now I don't have a list of strings, actually, now I have a list of object.

46
00:04:05,750 --> 00:04:06,430
So that's about it.

47
00:04:06,770 --> 00:04:12,200
You need to pay attention to indentation and to see how everything is listed, but apart from that,

48
00:04:12,200 --> 00:04:15,580
I think Yamal is pretty easy to understand.

49
00:04:17,320 --> 00:04:23,770
Sooner or later, you would want to write a comment or to explain something, or maybe you want to disable

50
00:04:23,770 --> 00:04:28,960
something, I don't know if you want to write a comment, you can do it by using no sign.

51
00:04:33,460 --> 00:04:41,080
Like this, this is a comment and you will see that in my idy, this has a different color and his and

52
00:04:41,080 --> 00:04:42,520
has been marked as a comment.

53
00:04:43,870 --> 00:04:52,150
There's an important distinction here because Yamal is pretty similar to Jason actually can transform

54
00:04:52,150 --> 00:04:53,720
Yamal in Jason.

55
00:04:54,370 --> 00:04:56,500
Jason doesn't allow comments, but Yamal does.

56
00:04:56,680 --> 00:04:58,990
So I think this is a very important feature.

57
00:04:59,440 --> 00:05:06,610
But if you are more familiar with Jason and you're still not sure this indentation exactly how it works,

58
00:05:06,910 --> 00:05:14,110
but Jason is something that you have worked in the past and you're familiar with from APIs or from anything

59
00:05:14,110 --> 00:05:19,480
else, they are online converters that can take Yamal and convert it to Jason.

60
00:05:19,750 --> 00:05:23,650
Just to give you this understanding on exactly what is everything?

61
00:05:23,950 --> 00:05:26,200
How does this configuration actually work like?

62
00:05:26,560 --> 00:05:28,750
So what I'm going to doing on a simply copied is.

63
00:05:30,710 --> 00:05:36,350
And I met this online Yamal convertor, and you'll find a link as a resource to this lecture.

64
00:05:36,500 --> 00:05:42,050
I'm going to simply paste this configuration here and I'm going to click here, Yamal, to Jason.

65
00:05:42,950 --> 00:05:47,490
Now, as soon as I have done this, you will see here that this takes the shape.

66
00:05:47,940 --> 00:05:51,200
Now, I have a person as a property to an object.

67
00:05:52,140 --> 00:05:59,940
And again, this property is again an object on its own and it has different properties and you will

68
00:05:59,940 --> 00:06:01,830
see here that stuff is in the array.

69
00:06:02,010 --> 00:06:03,470
Food is an array as well.

70
00:06:03,930 --> 00:06:07,010
PERENT is an array of objects.

71
00:06:07,860 --> 00:06:10,960
And yeah, hopefully this will give you a better understanding.

72
00:06:11,310 --> 00:06:15,120
Now, the idea, again, of the Yamal is to make it easier to read.

73
00:06:16,370 --> 00:06:23,020
I think in the beginning, it takes a bit of practice to get used to YAML and only after writing YAML

74
00:06:23,030 --> 00:06:29,180
on your own, you can really get a feeling if it's easier to write or not.

75
00:06:29,540 --> 00:06:35,660
But if you have written Jason in the past, you'll probably be happy not to write so many quotes and

76
00:06:35,660 --> 00:06:38,330
this will be a much nicer format to work with.

