Well, thank you for having me and thanks to Maxime and Anton for for Maxime and Anton was here somewhere. Oh, yes, here. Thank you for organizing this wonderful event. It's a privilege to be around on such a great occasion. I love this photo. It's typical. Oh, and this is typical Samson's. His brain is always working even during other talks, so I hope that this will be inspiring to him.  Not just people from who we learn. The process of learning is very natural, smooth and logical. That should be a status quo we learn all the time. Inspiration is needed when we need to break out of status quo and Samson in many ways is anything but the status quo. So he truly inspired me throughout life to stick to my beliefs, to think what I think and sometimes against the odds or what circumstances demand. When I think about Samson, it resonates with me this famous campaign by Steve Jobs of Think Differently. So it inspires you to stick to your individual values and truth and it says that this is to troublemakers. They're on pegs and square holes. The ones who see things differently, they're not found by rules and they have no respect to status quo. You can code them, you can disagree with them, you can agree with them, it doesn't matter. You can do anything you want but you can't ignore them. So thank you. My computer is not Apple, but I truly admire both of these people and thank you Samson. Really thank you. So today was the day of two-dimensional theories and also QCD. So I'll try to combine both of this and this last talk. So hopefully it will be a nice culmination for this day. One way to motivate what I'm going to tell you is just study this theory. It's a theory of gauge field and coupled to spinners or quarks and some simple, most minimal representation of whatever the gauge group is. So otherwise known as QCD. I'll make the problem very simple by again putting it in two dimensions. So that will be my way to connect to other speakers from today. So we'll simplify or we'll try to tackle much, much simpler theory than four-dimensional QCD. And we'll simplify it even further by asking supersymmetric version where we could have some hints from hopefully supersymmetry. So in two dimensions there are all kinds of supersymmetries usually labeled by two integers referring to supersymmetry in left and right sector. So here I show examples with so-called 0, 2 and 2, 2 theories which are compared quite often in their physical behavior to four-dimensional theories super QCD with n equals 1 and n equals 2 supersymmetry. In fact, going back to early work of Samson with loss of a necrosis where they studied in fact some parallel between theories of 4D n equals 2 and 2D 2, 2 supersymmetry. In this part of the diagram you typically encounter holomorphic quantities such as pre-potential and twisted super-potential. And that work in fact was in some sense predecessor of gauge-better correspondence and many other developments in particular used by Misha Schiffman in the context of vortices who also popularizes this idea that hierophysics is very similar even though we go across dimensions. And hierophysics is very similar in a sense you can expect dynamical suzie-breaking. You don't typically have moduli spaces of vacua with this amount of supersymmetry and respectively 2 and 4 dimensions. So again, there are many similarities and we'll talk more about them today. But correspondence was discovered in that paper in 1998 when we tried to do the instanton integral. The one of hyperintegration over Higgs-Bart. Actually here I was referring to freckled instantons. But it's very similar, so indeed. So when you reduce, it doesn't matter. Once you reduce from 4 dn equals 2 and break half of suzie you basically land here. And we'll use several of such reductions today. So in that sense we're standing on shoulders of our fathers. Why 22a 040? Well I'll comment on other amounts. This is just like introduction because I'm saying that I'll try to make my life very easy by a going to 2 dimensions and b introducing suzie. And honestly I came to this question in the context of two-dimensional such super-KCDs on various brain systems. And I needed this as an application. So I thought that this should be in textbooks. I thought that this should be solved by far. So in fact the reason is very simple. That first of all as far as basic physics goes in two dimensions even a billion theories can find. Simply because in 4d if you solve Laplace equation on three spatial dimensions you get one over r, Coulomb potential. If you do the same in one plus one dimensional system you find linear potential. v of r is proportional to r. So you get exactly what you expect in confined theories. In fact Schwinger, we know this as a Schwinger effect or Schwinger mechanism or Schwinger model for in a two-dimensional electrodynamics. Schwinger he beautifully demonstrated that this happens and you can actually solve the system in a sense of predicting the spectrum and understanding its strongly coupled behavior. So this is really old and this history goes back far back. So to remind you how old it is I put here some events that happen around the same time from that year. So in fact the date Schwinger's paper was submitted or received in a journal happens to be Monday. And the reason I know this is that Sam Walton opened his first Walmart store in the state of Arkansas. This was also the year when Landau got a Nobel Prize. This was a year off Cuban Missile Crisis as many of us know. It was unfortunately the year when Erlin Monroe died of drug overdose also during the summer around the same time. And the Warhol drew his famous painting of cans of Campbell soup and so on. So then it's also ancient because even in a non-Abelian case the next stage in this development of two-dimensional QCDs was the work of Hooft who solved two-dimensional super QCD or just QCD with NF equals 1. So there was one type of flavor and showed that it has many characteristics of four-dimensional theory we expect and particularly it has a rejet trajectory of meson states. So this was the year of Muhammad Ali's famous wins. Nixon introduced a 55 speed limit in every state and then left the office over Watergate scandal. Unfortunately, this was the year when Pompidou died but Leonardo DiCaprio was born. This was the year when Charles de Gaulle Airport, which every one of us passed either on the way here or on the way out, was open in the way we know it. And Solzhenitsyn was arrested and then expelled from Soviet Union around the time. Cyrus Tower in Chicago became the tallest building. That was all of year 1974. That's actually a good one. So I was curious about this too. What's the connection? So one is a mathematician, the other is a writer or a literature expert. So what's the connection? So indeed it's a good thing to explore and I did some googling. So the history is so ancient that again when I came to this kind of problems involving this two dimensional theories with supersymmetry or super QCD. Yes, it's a model of QCD but I thought I should be able to find the answer in text book. So I was really surprised that that wasn't the case. So even though the history is very ancient, the progress then was very, very slow, surprisingly. So some of the heavy lifting we had to do ourselves. So next landmark in this development was around 90s, not even 80s, when we're still talking about n equals zero non-supersymmetric theories now with a joint matter. And around the same time was a lot of confusion what happens if you have a joint matter. So there was a little bit of progress in particular in some of these papers by our colleagues who clarified whether or tried to clarify whether it's screening, confinement, big question. And there is approximations such as DLCQ, numerical approximations analogous to lattice amount to color was what happens if mass of the quarks goes to zero. It's really fun to read this numerical literature because there was a lot of confusion around the time just before that. And what they find is that in theories with a joint matter you start finding stringy-like spectrum which is also very natural, of course. This was in a way precursor to many ADS-CFT developments where this of course happens. But again, the gap is pretty big and the reason I mentioned here I join is for two reasons. So this is not the minimal, not the smallest representation of matter, but it's useful if you start thinking about supersymmetrization because basically supersymmetry requires you to introduce partners, in particular to gluons, in a joint representation. So that's a very nice thing to do. And then if you ask about supersymmetric theories, despite all the interest in mirror symmetry, linear sigma models and all this and that, it's interesting that until very recently we had very poor understanding of non-Abelian dynamics with 2-2 supersymmetry. So here I mentioned just a couple of developments which happen in the range of years from 2006 to 2016. But again, it's to me kind of surprising that relatively recently we started to understand quantitatively what happens in non-Abelian theories, even with supersymmetry. So when we encountered this problem, we needed 0-2 version, which is one aspect of what I'm going to tell you about. And by analogy with n equals 1 theories in four dimensions, you might expect and people did expect that it should exhibit some kind of cyber-type duality, that it should have dualities relating to different theories with different gauge groups. So that's what expected and unfortunately that A did not exist. There was absolutely no non-Abelian duality in 0-2 gauge theories as of 2013. I was totally shocked that there was no single paper, no single result on non-Abelian gauge dynamics with this type of theories. And after looking into this, it turned out that not only you have a analog of cyber duality, it's actually a triality. So number three will be playing a very interesting role in this talk and I leave you with many questions in particular why certain things happen the way they are. And here I can ask why is it a triality? Where does number three come from? Can we see in simple way why it's a triality? And I think at a very intuitive, simple level, we still don't quite understand this. So it would be nice to understand either from brain models or otherwise. So then I'll also talk about 0-1 theories. This is the most minimal amount of supersymmetry you can possibly have. Not much of a help really. It's very close to non-supersymmetric theories. And again, until very recently there was no single statement about non-Abelian dualities about such theories. Surprisingly, despite the fact that both 0-1 and 0-2 supersymmetry in two dimensions is what you require for heterotic worldshed, there was very minimal, almost nothing on non-Abelian gauge dynamics in this context. So again, I'll report on some recent work with Dupay and Pavel Putrov, two young guys who are instrumental in solving these theories. So as we do this, we'll in the process learn something about topology of theory space and some new anomalies. Again, something I'll leave you with as a question that naturally comes out of the story but I don't have a full answer to. So there will be interplay between anomalies and dynamics of quantum field theories in various directions which is the common theme, in fact, the name of this meeting quantum field theories and anomalies. So let's start with basic 0-2 theories. If you want to build the most elementary two-dimensional super QCD with 0-2 supersymmetry what do you do? You start by putting gauge node in the square notation then some number of colors, say SU and C, that's going to be a gauge group and you couple it in the minimal way to matter. In two-dimensional 0-2 theories there are two types of multiplets called fermi. These are basically chiral fermions denoted by the dashed line and chiral multiplets which have scalars in them and right moving fermions in my notations and let's say NB of those. So in a quiver notation that would be the kind of theory that you want to solve and ask does it confine, does it flow in the deep infrared to super conformal fixed point or what happens? The way I presented it, for generic values of these three parameters and again generic such theory will be specified by three numbers, number of colors and two types of metro multiplets. For generic values it would be anomalous so you have to think of how to cancel the gauge anomaly and one minimal way is to introduce another set of multiplets, which are called P, which are chiral, but in anti-fundamental representation of the gauge group. So that's in some sense most economical or simplest solution to the problem. So then you get this sort of quiver diagram representing single gauge group and interacting with matter and again you ask a question now, okay, this is simplest gauge theory, what does it do? Where does it flow? As expected, depending on ranges of these parameters, you can either supersymmetric suzy breaking, dynamical suzy breaking or flow to super conformal points or some free theories in the infrared. So in that sense it is similar to cyber type dualities and structure of n equals one super QCD in four dimensions. So here is a diagram because now such theories are labeled by three numbers, colors, number of bosonic or chiral multiplets and number of fermi multiplets. I have to plot by choosing two of these numbers representing the axis and then the other number will roughly set the scale of diagram. So here I plotted and color versus and fermi of flavors and some of the regions in this diagram are fairly easy to understand. For example, if you have a lot of glue in your theory, it doesn't matter what kind of theory it is, but in typical suzy theories with small amounts of supersymmetry you get dynamical suzy breaking if you have too many gluons compared to matter. And that's basically what this region represents. And then if you have reasonable balance or more matter than glue, then you typically flow to something with nice modular space or super conformal dynamics in the deep infrared. So that's what happens here. Before something more interesting happens, notice that this region carved out by suzy breaking and interior is where you have some interesting non-trivial super conformal dynamics in the infrared is of a triangular shape. If you add a point of infinity, then it becomes more like a triangle. In fact, you can bring this to a nice symmetric form if instead of emphasizing the rank of the gauge group, you re-label these nodes and pay attention to the flavor groups. You call them n1, n2, nn3. Then you notice that such basic super QCDs actually enjoy complete symmetry with respect to permutation of n1, n2, n3. So it is doing something. If you recompute what the rank is in terms of n1, n2, and n3, then rank will be changing. So it is like cyber duality, but it is really a triality. And again, question is why in two dimensions cyber duality is replaced by trialities? Where are these three coming from? So again, I would love to have intuitive answer to this question. And even though by now this has been explored from many different angles, some are present today, we still don't have a simple intuitive answer. Mathematically, one way to understand or approve or justify this duality is the following curious fact that this duality predicts at the level of chiral algebras. Many of us know a simple fact about Grasmanians that studying Grasmanians of k planes in n dimensional space is the same as studying Grasmanians of n minus k dimensional planes in n dimensional space. You just take orthogonal complement. So Grasmanians come equipped with very natural bundles, such as tautological bundle and the quotient bundle. Those exchange the role under this basic duality. But again, this is a duality. It's not a triality. So this is quite known, but what's less known is that same bundles and same Grasmanians actually do enjoy a triality and that's what such models predict. Namely, if you take some combination, certain combo of this quotient bundle and tautological bundle on a Grasmanian and study chiral-deram complex that's a fancy cohomology of such combination, then claim is that it's completely symmetric with respect to n1 and 2 and n3 and such symmetry is not manifest on the right hand side. Can you go back to the triality picture? So your evidence for this is tough anomaly matching. By now, all kinds of things, not just various anomaly matchings. I'll talk more about anomalies a bit later. There are calculations of elliptic genera, various brain constructions, and I'll get to this by engineering them from high-dimensional theories in various ways. So it's still a conjecture. I want to emphasize just like cyber duality is actually a conjecture, but there is a lot of evidence, especially in 02K. I'll give much more provocative statements which are more fun conjectures that I think are more at risk. And then you'll have to catch the train, unfortunately. Was there another question? Is it connected to an n-efficon or n-efficon to Nc for dimension? Where you have also 3. Nf equals, say again? Oh, I don't know. That's a good question. Explanation of the sword is something very simple which puts number 3 right at the forefront would be lovely. I don't think we have that now. I'll present something more uglier than that, yeah. You haven't seen some connection to either topological vertex? I would love to. Again, I would love to. It's very suggestive. Solgibrid the corner? Yeah, something like that. VOA of the corner is just VOA. It's not a theory. So this is physical theory, but I'll comment on 04K where we also were expecting tryality. Surprisingly, in 2D theory systems, tryality will persist. You will see it over and over again. So again, it suggests that something geometric like brain construction with three types of brains and you just rotate them or something like this or tryality in SOA in fact would be responsible for this. We don't have this. So it begs for very simple intuitive explanation even in this basic case. Right. So what I presented to you is a very nice large class of theories which are labeled by number of colors and matter content which is basic SQCD theories, but they're not the most basic. So if you go to the boundary of this region, you can construct simpler theories. So let me try to redo this construction from scratch starting over again. I pick a gauge group and a simplest non-Abelian gauge group since I emphasize that non-Abelian is something that was lacking in the literature quite surprisingly. Let's take SU2 as a simplest non-Abelian gauge group. So in general, if you pick SUNC, it would have gauge anomaly minus NC. So in this case, it would be minus 2 in my normalization. So to cancel that, you have to introduce some matter and the simplest matter if you focus on fundamentals will be four copies. Then they'll cancel the gauge anomaly and the simplest kind of Ising model of such theories would be therefore SU2 SQCD with four flavors. Conjecture is that it's dual to a theory with no gauge interactions whatsoever and interactions of the Lundau-Ginsburg type where you have six chiral fields and one fermi interacting by a simple super potential. So if you think about such system and such duality, first question to ask in terms of evidence is, for example, what is the... if I try to integrate out gauge interactions which are very strong in two dimensions. So as you go down our G-flow, temptation is to write everything immediately in terms of gauge invariant operators. So here it would amount to asking what is the space parameterized by scalar fields and the chiral multiplets mod out by gauge group? It's easy to see that it's a cone and the base of the cone is basically our space of matter fields divided by U2. So if I replace SU2 by U2, then such quotient is precisely the Grassmanian, namely 2,4 of two planes and four-dimensional space. So then this Grassmanian can be also described by Plukar relation which is a single relation and this is nothing but the relation imposed by this super potential. If again you introduce additional U1, kind of think of gauging U1 here making the group U2 and also gauging six chirals, always charged plus one, then you effectively make six-dimensional space divided by U1 which is Cp5. And this relation on side Cp5 is yet another description of the same base of the cone or modular space if you include U1. So is it 5,3,4? Is it 5,1,2,1,2? Yeah, probably there is a typo. Thank you so much. It's a Plukar relation for Grassmanian 2,4. So it should be different. It should be 3,4, correct. So by looking at such simple things you for example start seeing the evidence why a model with gauge interaction so this is trying to understand more and more basically what's going on. So this is kind of appetizer if you wish for much more interesting trialities but in this case it's a duality relating such most basic SQCD with 0,2 supersymmetry to something still interacting but very, very simple. So this is essentially Landau-Ginsburg model or now Ising type model. So another topic that Samsung worked on a lot and in fact that was already alluded on some of our earlier discussion and questions is topological twists of high dimensional theories in particular four dimensional theories and when I was a kiddo I really loved various TQFTs and topological twists so to me the issues that's how they refer to the paper join paper with Nikita and Andrei Losev was basically a Bible to learn a lot of things including some of the cool things most recent that I'm going to report on. So 4D and equals 1 theories that I mentioned earlier they do not admit topological twists on a general four dimensional space time they exhibit interesting phase structure something that I already mentioned earlier in the sense of cyber dualities and so on but they can be topologically twisted on smaller manifolds so we can try to do that we can try to take not 4D and equals 2 theories which produce Donaldson type twists but 4D and equals 1 theories that have smaller supersymmetry. Here I want to point out that this is analogous diagram to what I was showing you before the phase structure of 0,2 supersymmetry involves three numbers because we have two types of matter in four dimensions you have one basic type of matter namely carol multiplets so it's easier to plot it becomes just one dimensional line instead of two dimensional picture and here the landmarks involve relative to number of colors three half mc and mc plus one these are cool interesting values where something happens I'll come back to this in a second so what you can do in 4D and equals 1 theories is take one of the cyborg duels and try to topologically twist theory on a Riemann surface on a two manifold so supersymmetry is enough to do that and in fact this kind of topological twist had been studied by Samson collaborators and Misha Bershatsky was actually around here so he in famous work with Volodya Sadev and Johansen and Kumran studied such compactifications now called partial topological twists because you twist along partial part of the spacetime not entirely the full spacetime so if you do that you get precisely this relation to two dimensional theories with either four super oh sorry yes if you do n equals two twist you get four supercharges here I'm illustrating at four n equals one theories where you get two real supercharges namely zero two supersymmetry and if you start with dual pair in four dimensions you might expect that you'll find a dual pair after compactification this logic has to be taken very carefully and seriously and revisited because there could be many caveats but I'll show you example where this literally works so you don't have to worry about any details so in this partial topological twist first question is what happens if I take my basic multiplets a vector multiplet becomes a vector multiplet in two dimensions plus a joint chirals related in number to the genus of your surface this is basic color to client reduction there is nothing fancy here and if you do the same for a chiral multiplet you find that because of the topological twist the number of effective either chiral or fermi multiplets in two dimensions is affected by the r-charge of the original chiral multiplet in four dimensions with respect to vector multiplet there is no such choice you can study such compactifications on basic two manifold which are spheres this is something that again goes back to that earlier work we mentioned of Samson with Nikita and Lossiv and more recently younger guys like Sergei there the other Sergei myself and others worked on so it's a fun called the client reduction which connects different types of 4D and 2D physics with similar gauge dynamics let's take this simplest cyber pair which actually has SU2 gauge group just like what we want in two dimensions but we'll take a different matter content we'll have nfql3 and here we get nxql4 so it's actually fun to go through this and see how this emerges first of all nfql3 really means six doublets in dimension 4 that's the usual notation but also I want to point out that with respect to ncql2 nfql3 is also nc plus one as well as 3 half nc so it's a very special value where these two different landmarks actually coincide and the theory is famously dual to just the theory of mesons even on four dimensions so it's very similar to what we were proposing in two dimensional case there is no tryality so this is in that sense it's a simpler model it's a basic structure but unfortunately it's not a tryality so in the more general class question still remains but here it's an example of how you get duality from duality yeah and in my opinion tryality is in some sense more mysterious more interesting this is something more traditional that's why it connects to 4D theories that we also understand in a way that you guys also studied so what happens here is that you have to choose our charge assignment to do this reduction and the way number 4 comes out of this six doublets is because to make non anomalous our charge assignment you have to choose some charges and two of them have to be one so as a result you get here SU2 with four flavors and if you trace what happens on the dual side you get exactly the spectrum and interactions as proposed before so that's in fact one evidence for this duality so this is one application where you can derive something two-dimensional from four-dimensional physics from high-dimensional theories again there is no such good understanding of realities at least there are proposals and they shed light on the physics but there are more cumbersome and number 3 is not just glaring at you from the page that's what you guys were suggesting and that's still lacking I want to emphasize there is no number 3 this is duality that's not a tryality it's a simpler thing but in my opinion it's a little bit more boring so it's on a outside of that class you can say it belongs to a tryality where one of the three corners of the tryality degenerates to nothing unfortunately is that this theory is close to nothing? no no no it's again that's a figure okay I forgot I'll clarify there are not that many tryalities in four dimensions exactly that's why number 3 is mysterious tryality of some three prong brain network or something is suggestive for candidate but again there has been nothing like this so far anyway going backwards we can try to learn something both ways so here I showed you how from high dimensions we learn about dualities and 2D system but then we can also learn something about high-dimensional systems from these dualities in fact if you can't rectify and understand this reduction on Riemann surfaces and get good control over this 2D physics which again is easy to do I just showed you an example you get a glimpse of what happens in a high-dimensional theory when it's actually twisted on a general four manifold as long as you have your 4D n equals 1 theory flowing to 4D n equals 2 theory you can get a lot of mileage by going backwards by understanding such twists and this is especially useful if your theory is non-lagrangian because then it should still admit topological twist but it won't have a very simple description about Donaldson type TQFT it will be something more interesting and mysterious and question in fact already posing that paper on issues as well as testing cyberquit and solution was what happens with Argyris-Douglas theories which are simplest examples of non-lagrangian 4D n equals 2 theories so they should have topological twists and question what do they compute on a general four manifold but that's a very delicate point so question is indeed what happens what the answer I don't know the answer actually nobody does on a general four manifold but I can propose you an answer on a very simple manifold or class of manifolds of the form one cross a general three manifold so in that case you can think about this theory if you compactify on a swan but it's important that we're still working with four-dimensional theories so you basically keep all the colors a client mode that's important as a three-dimensional TQFT on a M3 and then you can pose a question okay what is it as a 3D TQFT on M3 so claim as that it's described by usual axioms of three-dimensional TQFTs and particularly you can associate modular tensor category which has cutting and gluing relations described by S&T matrices and for every Arduis Douglas theory you get a set of S&T matrices that can be computed from the beta vacuum so this is particular if you wish development or application of gauge-beta correspondence the way in fact it was envisioned lifted all the way to four-dimensional and equals to business so in the most basic Arduis Douglas theory which sometimes in literature is called 2,5 Arduis Douglas theory that's the theory that Arduis and Douglas studied in great detail what you find is so-called Fibonacci modular tensor category that describes Fibonacci anions it has two simple objects and S&T matrices are close cousin of what we see in Ising type MTC or other simple modular tensor categories okay enough of 0,2 let's talk a little bit about 0,1 so this is where we have half of the supersymmetry so we're quickly losing control but equations are recognizable in this case so they are Samsung is asking if beta equations are recognizable in this case sometimes they are not quite I don't know we should I can show you the equations and hopefully you'll tell me what the integrable system is I don't know that's a very good question are you actually solving this beta type system yes so the matrices are obtained from data of some fixed points on modular spaces or critical points of potential and potential is involves some elliptic function so it could be an interesting integrable system but again I don't remember to answer Samsung's question of the sum I have so let's talk a little bit about 0,1 super QCD again going back to this motivation how come our fathers of the subject such as Schwinger and Hooft and others didn't solve it for us it's such a simple theory we have almost no supersymmetry and we're in two dimensions so shouldn't this be done in 70s 80s or at least 90s that's right but 74 when Hooft's paper was written that's exactly the year when supersymmetry came to the shelves so yeah it should have been done back in 80s so here Chris Hall who is here and again classified super multiplets and they're actually less famous because somehow at least these days younger generation goes immediately to higher dimensions and maybe doesn't learn this too often so therefore I decided to summarize them for you they're complete analogs of this carol multiplets and Fermi multiplets in 0,2 case except that carol multiplet does not deserve to be called carol in a sense of holomorphy because scalar here is a real scalar and fermions involved are Majorana while fermions so they're left moving right moving depending on multiplet but they're all real so everything is real you completely lose power of supersymmetry in a traditional sense so if 0,2 was somewhat useful 0,1 is here very very weak so you have interactions in the form of super potential which again is a real super potential and vector multiplets so let's do the same let's build the simplest QCD so we take vector multiplet because now it has half of the gluinos of 0,2 theory the anomaly is half of mc with one sign so you have to compensate it and previously we had nf equals 4 in 0,2 notations so here we're going to have nf equals 2 in 0,2 notations so here I'm assuming that we take complex doublets and there are two of them so that's a natural way how SU2 can have complex representation so again anomaly is cancelled basic question is what does this theory do in the deep infrared so you kick it off it goes via our g-flow where you do end up confined is it a massive gap phase or gapless phase interacting theory what happens proposal is that it flows to a free multiplets free scalars and the logic could be obtained in a way similar to the previous scenario in fact you can try to think of this proposal that I'm going to give you as a soft perturbation of the previous duality that we studied first of all the modular space you can analyze in a similar manner is a quotient by the gauge group which is SU2 of matter fields scalars in the matter multiplets and now there are two complex doublets so it's a C2 turns over C2 some a-dimensional real space divided by SU2 and again it looks like a cone it's a cone whose base is a 7 divided by SU2 and this quotient is actually S4 it's a famous one of the famous Hopf vibrations so the cone on a force here is R5 so that's part of the reason why we are proposing that this could be just R5 parameterized by real scalars again very simple duality again it's a duality if you try to construct more interesting theories with 0,1 supersymmetries again you find surprisingly not a set of dualities if you construct simple 0,1 supersymmetries again you find trialities I have no idea why this so happens in two dimensions that having just one gauge group and asking how does non-abelian gauge interactions in two dimensions exhibit dualities immediately leads you to number 3 this is very funny very strange very mysterious in fact something else happens something we didn't quite resolve and that connects to a question Vasili was asking in the case of two-dimensional theories with 0,2 supersymmetry we were dealing with groups SU N or SUMC in the case of N equals 0,1 supersymmetry which is even simpler what I'm showing you here is class of theories which exhibit this triality and behavior nicely but natural thing to act on a real representation on real fields and real representations is at all because you don't have a complex structure and then we were naturally expecting that if you ask about 0,4 supersymmetry which came up in Ruben's question as well as in Vasili's question we were naturally expecting that you should have your SP and in fact we were hoping to connect to this corner and other developments and somehow there is a check mark here and check mark here so I claim that there is another triality which is much more delicate so this is real conjecture in that sense you sure you're going to make the train I'll leave after you finish this because this is more speculative so this is cool conjecture so this is conjecture to which again it's fresh of the oven until last year there was nothing on 0,1 theories or dualities with non-abelian gauge groups there were no dual pairs and again claim is that they come from trees so where the hell number 3 come from I don't know moreover this is kind of conjecture which is very risky so I don't know if this is really true but that's our conjecture and I'll give you some of the evidence so it checks out but this didn't work so part of the reason this work was delayed for several years we were hoping to get to other cases shortly after 0,2 in past 5 years or so the reason it took so long is that this case didn't work out we don't have any good set of non-abelian analogous so we were expecting realities but again somehow they didn't work in the 0,4 case so I present this as a challenge and SP even if it appears it actually is more relevant here somehow not really in that case so I don't know there are lots of questions so again statement is that here you get that same reality and it's much more delicate so here you cannot use the usual techniques from holomorphy and very simple anomalies you actually have to think a lot about very delicate type of anomalies which were behind the scene and checking every previous duality I mentioned so that's part of the anomalies and the title and in connection to our general subject but here this anomalies appear in several flavors first of all there are simple perturbative tooth like anomalies which you can compute from one loop diagrams so those are easy those check out and those I would call perturbative but then there are also global because they care about global structure of the gauge group anomalies that have somewhat non-perturbative nature and take values in this torsion part of spin-bordism group of classifying space of G where G is your symmetry so these are much more delicate anomalies and this is kind of cool and interesting for example if you try to build the simplest example of a theory with 0, 1 supersymmetry which exhibits this anomalies you can take n scalar multiplets and just one Fermi multiplet which enforces by super potential this condition that all of your scalars square to some constant so you're trying to describe a target space which is hard to see here but which is a sphere of dimension n minus 1 so no gauge fields but then if you try to gauge z2 which acts as antipodal maps so out of n-dimensional sphere you're trying to make rpn basically by gauging z2 what you find is that this anomaly is actually non-trivial and in fact the group that's relevant here for z2 happens to be z8 and as a result such theory only makes sense or is non-anomalous when n is multiple of 8 so this is a simplest example where such global or non-abelian sorry non-petrobative anomaly happens so I mentioned previously that for understanding z2 theories it was sometimes useful in fact that's how they came about in our first work with Putro-Vangada we were trying to get them from various brain configurations and high-dimensional theories so z1 theories have very little supersymmetry cannot easily get them from 4 dimensions reducing on Riemann surfaces you can but you have to be very inventive about how you do it but they actually come very naturally on the boundary of 3D theories so here is a paper which intended to study walls, lines and all kinds of phenomena related to spectral dualities in 3D unequals 2 theories and was using gauge-bethic correspondence in a crucial way so in this paper we cite some some work effluently and it's easily generalizable to 3D unequals one context where on the boundary you naturally get 2-dimensional physics with 0, 1 supersymmetry so we can try to ask which 3-dimensional systems can give us some of the proposed 0, 1, 2-dimensional super QCD like theories so these are usual 2-flag anomalies that you get from various building blocks, 3-dimensional matter, 2-dimensional matter again you want to make sure that they cancel as far as gauge interactions are concerned and here is an example you can take 3D unequals one system with just SUM vector-multiplet again it's going to be minimal supersymmetry in three dimensions at turn Simons level N over 2 is believed to have one vacuum, one massive vacuum so the theory flows to supersymmetric vacuum and with choosing Neumann boundary conditions on both sides for this gauge-multiplet you basically get different anomaly inflow on boundaries turn Simons level causes the fact that on one boundary it contributes with a plus sign on another boundary with minus sign so on one boundary you don't have to do anything the inflow is trivial but on the other boundary you have to compensate it with something and because we're imposing Neumann boundary conditions we get SUM interactions and simplest spell to compensate it is to add n fundamental flavors that's precisely the duality or the system that I was proposing and system in a bulk flows to one gap vacuum so you would expect that in the deep infrared is described by gauge invariant quantities so that's this five scalars one unequals to do but then there are more interesting inventive ways to engineer it in fact somewhat more natural more natural way would be in fact to take 3D unequals one theory with SUMC gauge group and the same number of fundamental flavors so it's also supposed to engineer on the boundaries in the same way but now in a non-trivial way because both boundaries would contribute the dynamics of zero one theory of the type that I showed you before and therefore the dynamics of zero one theories makes a prediction that first of all this theory does not break supersymmetry dynamically and suggest that it should have a dual but as far as I know the dual of the 3D unequals one system is not known so that's one of the questions I promised you several questions so that's one of the questions I want to leave with you and finally I promise new dualities as you can see in the world of supersymmetric dynamics or gauge dynamics we're getting into more and more delicate effects so I'll finish with the most delicate type of anomalies if you wish that don't have interpretation even in terms of this discreet global anomalies that I showed you a moment ago actually in two dimensions you don't have to answer them or you don't have to introduce us there are also Bezumina, Karol, there are many ways to introduce them you use the box that you had first necessary you introduce left hand fermions if it's the same anomaly particularly you could have coupled it chirally to W2W1 that's true but you have to keep track of anomaly one way or the other there are many mechanisms the other one probably is harder to supersymmetrize I totally agree what I was showing on these previous slides is that there are several ways to engineer the same system and some of them may be relating to questions that we don't know about in this case high dimensions that's still of same general spirit of trying to get 2D theories from high D right so in this last part let me ask about the topology of this theory space so this is space where every theory is represented by point or G flows are represented by flow line very much like in dynamical systems and you try to connect all possible theories going from one critical point to another and so on ask what this topology looks like so in fact studying the 01 theories in a joint work with Dupais, Pavel Putrov and Kumran we had to make a conjecture in order to make peace with many facts from physics and math so we had to conjecture that this space of theories which I call T has the following property first of all the space is graded by gravitational anomaly this is kind of obvious because well first of all gravitational anomaly is one of the most obvious things and 2D super conformal theories it's the difference of left and right central charge and clearly by any RG flow you can never go from one value of this number N which is the difference to another value so this theory space is clearly consists of islands which are different connected components labeled by different M but then we further had to conjecture that each graded component has a funny property that if you ask about its homotopy types then shifting this index of pi by K is the same as shifting this value so that's kind of strange that's very interesting thing it's a rather non-trivial conjecture again I don't know I'm going an increasing complexity of conjectures and my risk of failing them therefore losing credibility but this is what we were led to conclude and the reason this is funny is because it says that apart from gravitational anomaly which distinguishes different connected components in the theory space there are some other kinds of anomalies because these groups again compute them and so on they have torsion a lot of torsion and torsion doesn't come just in multiples of two so you don't get just Z2, Z8, Z16 which we often get from fermion anomalies you start getting multiple of three appearing and I told you that in this talk all my mysteries will be related to number three so here one of the mysteries is why three or how Z3 appears as a home for anomaly not from complicated co-boardism groups but rather we can see it immediately right in front of us so here is the first example Z24 but there are lots of Z3s that appear further down the road and five or seven never appear so it's only two or three for two, origin is usually typically very simple as it has origin and fermions but again three is something mystery so here is an illustration of what this type of anomalies, new anomalies I don't know how to interpret and there again not of the type that I showed you before that they cannot be as far as I know expressed in terms of co-boardism groups or generalized higher form symmetries again maybe they can but it hasn't happened yet so again, you can move between the pms by attacking a free fermi multiple right? Yes so how can they be fundamentally different you just attack a free fermi multiple yeah so this gives a lot of information about structure of each of them basically that's right so they're all very similar I would say they are isomorphic but I can't explain what this means so this implies a lot of relation on each individual copy they're isomorphic but if you take say, well abstractly one of them it's a huge infinite dimensional space and what this gives is humongous information it's very constrained system precisely because of this relation what pk of a given fixed guy is so you immediately know the whole tower basically exactly exactly such spaces are extremely rare and this is what's called structure of infinity spectrum and amygospectrum and there are very extremely rare things so that's why I'm saying this conjecture is something much stronger than even zero one triality that I mentioned so the way to think about it is to follow so if I say that there are different components labeled by gravitational anomaly what does different additional things tell us is that each one of them may have basically subdivisions so here is an illustration of thinking about them that this one gets divided into two parts some numbered parts and so on and so forth so they're basically different way more connected components than you thought they could be so again I don't have a good explanation of this type of anomalies that play a role in the zero one theories this seems to be a consistent network or as Nadia Cyberg would say web of statements or conjectures but this definitely require are required by some of the dualities in zero one theories that I mentioned earlier some of them have natural interpretation but in very low rank for example this is basically refinement of with an index where you look at kernel of supercharge or the same thing in one of the fermion numbers you still have supercharge on the right in zero one system so you can analyze that and what two index is candidate or is it's not much of a conjecture this is really true but again I don't have an explanation for the entire tower so this is in that sense it's showing that it's something delicate something rather subtle so therefore I leave you with this question and again happy very happy birthday Samsung maybe two questions and other questions we'll do at the dinner did you talk to some typologists like we can recognize the spectrum yes so this last part which I presented in a very short way in fact is highly motivated by theory of topological modular forms exactly so we did talk to Mike as well as Peter Dichner at MPI so we're using those resources heavily what's about five like I said I don't know to me appearance of number three in two dimensional physics was a big surprise five does not appear seven does not appear no other prime number appears so big challenges to explain any of the three either in form of anomalies or in form of realities or otherwise let's finish


Hi there, and welcome to another episode of Visual Studio Toolbox. I'm excited to be back once again with my friend Eric Kang. Eric, welcome to the show. Thank you, Dimitri. Thank you for coming back. Well, we've been doing a three-part series on SQL Server Data Tools, a topic that a lot of our viewers are interested in, certainly a great way to do database development. Today, you're back to talk about a third part in our series. This is something we were hoping to get to and we finally got to it. So what are we going to talk about today? Okay. In the first episode, we talked about the key concept, the core concept, and the key features of SSTP. What is this thing and how can it help our community? Exactly. In that episode two, we talked about the database CI and CD. Today, we are going to talk about database unit testing. Awesome. Well, I think that brings us to every bullet you wanted to hit. So that's really, really awesome. And if folks say, if you missed the episode that we did, the other two that we just talked about, they're up on channel line, of course, go to Visual Studio Toolbox or go to the Visual Studio YouTube channel, you'll find those shows there. But hey, we've got a great topic, so we're going to jump right into it. So Eric, why don't you take it over? Okay. Thank you very much, Dimitri. Okay. So today, we are going to talk about unit testing in DevOps pipeline. So let's set a goal for the demo. I will just jump right into the demo and instead of talking too much before the demo. Our audience wants more slides actually. Really? I'm getting tweets already. I only prepare always. I want two slides. You only have only two slides? All right. We're going to have to deal with it. Okay. Let's set up a goal for today's episode. As a developer in DevOps practice, I want to unit test my database codes like C-Shop, a Java program to achieve high code coverage. So if you're an application developer, you already practiced unit testing, integration testing, and functional testing, right? So why don't we bring that good practice, test the practice into database as well? I'm going to talk about that one. Sure. Let me ask you a question to that point. As a developer, I'll be honest, I never had unit tests on my data layer. That was just not where we went. I mean, we barely had unit tests on our code side. But I guess the way that I always thought about it, and again, I'm just speaking honestly for myself, is that we're testing the code that ran against the SQL, I was testing the SQL, right? So that was sort of an indirect way. What would be some of the benefits of testing SQL at the data layer? I see. So it's kind of a fundamental way of changing in terms of a fundamental way of thinking. So before, we traded database as more like a runtime. That has data and as your application to run, then you need to have a database as runtime, and then you focus on application testing, right? Yeah. The data was just a structure, and the data was the data, right? And the app is really what mattered was a lot of the mindset. But in reality, your database like a store procedures and functions have the business logic for your application as well. So if you want to have the good practice of testing, validating your outcome end-to-end, then why you miss out database, right? That is basically a very fundamental thought. And nowadays, instead of thinking the database as runtime, SQL Server instance as the database in the runtime, you think more holistically application, most applications have a database layer, and in a holistic view, application and database is an integral part of application as a whole solution, right? So that is a way of thinking. And with a CI CD, you want to put the application and database into the CI CD pipeline. Then for application case, you always have a gated build using tests as a part of the CI process. Makes sense, yeah. Then now it makes sense to have a database test in your CI build so that you can always have a gated build in your CI pipeline. Right, so you put validation this way all across your application, and for sure we've all had those monster store procedures with tons of logic and sometimes hard to test from the app code because of by the time you get to it, right? Or which paths of code won't get to my SQL, right? There's always that question that you're struggling with is building the unit test in the code side. So I guess we're building against SQL directly, you're making sure that you really do test every input parameter you care about and every other scenario there. So the common practice of unit test for application is that you test the program's business logic at the smallest unit like functions, right? So if you apply the concept to database, your store procedures and functions and the triggers, those are like functions in your application and those are the subject of the unit testing. If you test your application with other modules and then other components, including database, then it is a stage of integration test. So you already graduated the unit testing. So if you just focus on database testing and the integration testing or functional testing, then you end up having no unit tests for database, right? So today we are going to kind of show you how you can easily enable unit testing on your database. If it takes like a days and days to learn and enable, then it's too hard, right? Yeah, it gets harder. Right. So the techniques and technology solution that I'm going to show you today, probably you can enable it within an hour. Awesome. All right. Let's jump in. Okay. Okay. Before we go, I will briefly introduce you the open-source DB unit test frameworks. It's new. It's my pleasure to introduce Slacker and SlackerRunner. T-SQL T is another open-source unit test, database unit test framework, which is more popular. I will first tell you what is kind of the principle for me when I look for a database unit test and the framework. One thing is that, as I mentioned, it should be very easy to set up and run, right? And because it has, it's dealing with the data, I always look at if it is flexible to mock or generate test data, okay? And of course, it has to be easy to develop, like assert logics and test logics in the test framework, and easy to debug test when there is an issue or code that the test reports adder. So we can see the detail adders coming from the test cases, and then we can go and fix our code easily. Those are kind of debugging matter. And lastly, we are talking about, in terms of DevOps and CI-CD world, right? So we should be seamlessly integrated to the CI-CD pipeline that you're using. It can be Visual Studio Team Services, it can be other open-source like Octopus Deploy, JetBrains Team CD and those kind of stuff. So those are my category. And these two framework that I listed here, Slacker and SlackerRunner, there are others as well, but the key thing that I can tell you is that these two frameworks meet these criteria, right? And Slacker is developed by a very large software development consulting firm, software development, you know, a firm, and the developers actually adopted SSDT database project-based DevOps pipeline in their core software development business for the company. And thankfully, they made it as an open-source. That's awesome, I remember you mentioned it and it's awesome to see it as an open-source. So I guess one of the big takeaways here, these two frameworks are not Microsoft frameworks, right? They are not, yeah. We are showing two things that are built by the community and they're not the only two things in there, they're just two that met your criteria, the USETS sort of baseline of being very productive for the kind of tests you want to provide. Right, right. Cool. Okay, so, oh, sorry, I meant to, I told you that I only have two slides, so I went to the last slide. We'll get to the resources. All right, so, okay, so let's start our demo. Ideally, whenever you have schema changes in your database, then in ideal perspective, you should have a unit test or more unit tests associated with the change. It's a really tough task. Yeah, yeah, schema change is a lot, but then especially at the beginning of the project, right? Right. But if you use a SSDT database project, then you can save a ton of time because SSDT compiles database project and reports errors for all reference and integrity, like your storage area is referencing a table, a table has a foreign key relationship, all that. Yeah, your build is already a very rich validator for the foundational things. Yeah, those dependence issues are all detected by SSDT at the compile time and reports it. So, if there's any error, then you cannot actually deploy anything to your database, right? So, it's a compile time validation is one of the key feature of SSDT. Then you can rely on SSDT to handle that part of the changes on your database and then now you can focus on business logic in your store procedures, functions, triggers. That is basically the main, the subject of a unit testing. So, you can kind of make your job more efficient in that case. Yeah, it's funny, like when you're just talking about, let's say, C-sharp code, you don't even think about it anymore. The build just did what the build did for the longest time for database developers. We've all had many years of just not being there. So, it's good to point out, SSDT gives it a baseline and these frameworks lets you go off to the logic. Exactly. So, let's quickly show you what happens. So, for the first part of the SSDT validation, I just opened up the person.sql, which is the table source code for person-to-person table. One day I feel like I want to rename that table to person-to-persons, the s in it, right? Yeah. So, if I do that... Famous rename challenge we have as programmers. Right. Then, as soon as I change, if you notice at the bottom, it's already done. So, SSDT, analyze your code immediately and then reports error. Oh, there's more than 102 errors and all that. Right, because you didn't use any refactoring tool here, you just made one change to one SQL file. Right. That just doesn't work when you have stuff referencing that. So, I'm just demonstrating one sample, but any changes like that violate those reference integrity or dependency relationship within your schema, that will be detected and then tell you so that you can always make sure that your code change is valid. Of course, the correct way of changing it is instead of changing it directly, you can use a refactor rename functionality. Then, SSDT handles it. But it was just a demonstration purpose, so I just directly modified it under code. Yeah. Okay, good. So, let's jump into today's demo. So, in starting episode two, I started using my demo application, which is a bunch of words directory services that has like employee phone books and the org chart, the functionality, that just renders the chart. Yeah, we did some masking of the data. That is right. So, it's kind of the version two of that scenario. So, I will just click the band miller and we show all the detail of the band miller. But this one is a public application. And we are showing all the detail of employee to the public. So, what we want to do is that we want to mask this information. Now, it is the version two part if it is used by public application user. If internal user or internal app is using the same data, then we don't want to mask it. We want to show email phone number, all that information without masking. So, that's our goal, right? So, let me go back to our solution. What I did is that I added these two users. So, internal apps and public apps, as I mentioned, it has different permission sets. It has a different usage in terms of how we show the masked data without with mapping, even though the database has the masking definition enabled. So, let's do the same thing that we did in the episode two. That means go to email address the SQL, which is an email address, the table. And I will, okay. I'm running my demo on the virtual machine, so it can be a little bit slow. It takes a few seconds. All right. So, I changed my code to enable masked with close in my code. And let's build. Okay, it will come out all successful in a second. Okay, that's great. And let's publish it to our local development environment. Let's do run the unit test. Let's do it. So, I already made the publish profile. What it does is that basically defines the connection string to my local machine and deploy my database project to the target unit test database and to be able to run the unit test. One thing that I added in the publish profile is SQL command variables. So, what it does is that it can control the conditional deployment. If I define deployment configuration variable value as unit test, then it deploys unit test related logins and users to be able to run the unit test from the test module. We need to have a connection to SQL server. But the login and the user for the unit test, we don't want that in production or test environment. It should just stay in the unit test environment. So, that's why we can have the conditional deployment and create user, login and user only for that unit test database. This is what makes it all work, right? Giving you the flexibility to deploy when you need this parameter in a particular environment. That is correct. So, I'm clicking the publish button. Within a second, it'll be done. Okay, it's creating, analyzing the project and building the back pack output. It's done. So, I'm gonna go through how we enable the test. Before that, let's run the test first and then talk about that. Sure. Okay. So, we go to test menu, run all tests. It opens up the test explorer. It runs. Okay, there is a failure. This is expected failure. Let's click it and see what has failed in our test. So, make it a little bit bigger. Okay. So, we had the two unit tests and both failed. One is that when we are running our code, the code which is basically coring the email address as a public user, public apps user, then we were expecting master value. The result, as you see here, result was correct, but with the code change, we didn't update our test case. That was the issue. So, it's a test of the code issue. And the second issue is about running the same test as an internal app user. We defined that for internal app user, we don't want to mask our data. We want to show the data without masking. Yeah, we show everything to internal and public people, we want the masking. So, the unit tests need to reflect that. Right. But what you see here is that, so we were expecting the data without masking, but the returned data was masked. So, the test is correct. We just detected the code issue. For our change, we didn't update necessary change to make that happen. So, let me close it. Little bit. So, let's fix those. First one is that, let's first fix the app issue. So, we defined internal apps user here. And one thing that we didn't do was that, let me copy and paste. We didn't give internal apps user unmask permission. Unmask permission basically tells SQL server not to mask, even though the column has a mask with definition. So, it's an override at the user level. So, this user will just not see mouse data in the matter where it's defined. So, now we gave the correct permission to internal app user. One of the impact that we can think of is that, without unit testing, this type of issue could have slipped through all our DevOps pipeline and it was possible that customer detects this issue. Now, let's talk about that impact. So, this AdventureWorks database is serving my demo application, but it is also serving other applications like CRMs and then your communication application within your company. So, sales team as a customer, they rely on email address and the phone number. People would use it in many reasons. Right, they make a sales activities, do the sales activities. Now, it's all stopped because all the email and phone number are masked and as a sales person, now you cannot make any communication. Your phone starts ringing at that point as the developer. It can be a huge loss in your potential sales, right? Yeah. Well, that is a real monetary value impact for this type of change. And let's look at then the sales team contact the support line, right? And support line, support team needs to investigate where is the root cause of this issue. If they can get developers email and phone number, they can contact your development team, right? Yeah. And then when the DAV team gets this fixed request, now time's ticking, potential loss in business and lots of pressure, now you have to fix it. Let's assume that you fixed it like what we did. Yeah. How can you guarantee that your fix is not causing any more additional bug? Yeah. Anytime you change anything related to security, you're asking, you get a little bit nervous as a developer so you won't test on it if you can. Exactly. So, will you have a unit test on your database or not? Right. Right? So, I could have a unit test on my database so I could detect this one all the way. So, it matters when you detect the same issue in your pipeline. If you detect it all the way during your development time, then it is a much less priority than the customer detects the issue. The cause goes up exponentially. The closer you get to your customer, the more expensive it gets to fix the issue. Right. So, we fixed the first one. The second one we're gonna fix is that it's a test issue. The test is expecting mass to value and now I'm going to show you how the test is structured. And which test framework are we using in this particular case? It's a slacker. The slacker. Yes. So, if you take a look at my solution, there are two projects. One is a database unit test and the test specs. I will look at the test spec project first. This one is a slacker project. Is it just a regular C-Sharp assembly project? What kind of project type is it that's, what is it trying to build here? Because there's no code in it, right? There's no C-Sharp code, just SQL code, but VS is rendering it as a C-Sharp. That's a good question. So, slacker is written in Ruby in the R spec. To be able to put it in our solution, we just need to have a placeholder. So, I used the C-Sharp empty project as a placeholder and I marked it as a do not build and it's just they will hold that in a structure. That's basically what it is. Okay. Okay, and then I added slacker project structure in that the C-Sharp empty project. That is basically what I did. So, you're basically impacting the file system more than the C-Sharp. Yeah, that is right. That is right. In that case, I can check in all this as part of my solution and then it travels along with the rest of my database and application code and then they can go through a CIC pipeline altogether. That is basically the region that I did it. Right. Okay. So, as I mentioned, the slacker is written in the Ruby. In terms of a learning curve, I mentioned that it should be very easy to start and use it, right? And I never used the Ruby language before I tested the slacker and the building this demo and stuff. But I could learn Ruby for slacker usage within a day and I could start producing my own test specs in there. In the Ruby R-spec term, the things that we call as test class and test case is called the tested spec, okay? And then in the spec folder, each of those R-spec Ruby files contains that. So, in my application, I use get a direct manager and get direct reports, store procedures. I created a unit test for each of those. It is very simple. So, each spec can contain multiple test methods in the Ruby term, R-spec term, it's examples, okay? And I can have a single or multiple. It's very simple, I will highlight it. So, each method or example runs when you run the spec during the run all test type of action, we'll go through each spec and then they run methods. So, what I did- Is it just running kind of vertically the first one, second one? That is what the sequential is just run those. So, the key thing is that as I mentioned, I need to be able to mark or generate the unit test data. You're not gonna have to test unit test cases against your production size of database four terabytes of database. So, usually what you need is that for the unit testing, you can have a lookup tables and reference data and for user data, you can just start with empty. And for your logic testing, you should be able to quickly generate mock data for your unit testing, right? So, that is one. So, I have created a function because I'm going to mock, add the mock data repeatedly across my test cases. I just made it as a function. I will go to that one. Yeah, it makes sense. You may make a generic across all the tests and then the test input in the expect below is just the individual test you're actually doing. Right. So, I insert those mock data and then I call expect to function. What it does is it calls this file, ccall.adventureworksexec, human resources get direct report. It's not something special. It's just a SQL statements. It's a file that has your SQL statements that is basically calling your supercedure with variable ID. And then once it is executed, then it matches with your expected value in CSV file. If it matches, then your test fails. If it doesn't match, then the test fails. So, all these utility functions like a matching, being able to load the values, the CSV values into your table and then being able to generate even those CSV data during the run time so that you can provide the key values but the rest of the value that you don't really care about your testing, you can, the slacker can generate those data automatically for you. So, it's very powerful framework in my perspective. Yeah. It gives you all the foundational things. You need to be able to do these sort of tests. Right. So, let's quickly look at the SQL file. So, it's a simple, it's a SQL statement. Only difference is this passing the parameter value. That's it. Rest of them is the simple. So, this is my main logic for application to generate org chart structure, hierarchical structure and it runs. Then the last piece that I want to show you is the data part. So, I have a seed data and the expected result data. I will make it bigger. You can separate out the mock data part from your test logic. So, you can manage your mock data separately from the test logic development. So, what I have is all the CSV files. These are, this contains like one or two rows that I really need to unit test my store procedure and functions. Yes. The minimal viable amount of data. Right. And it's very flexible to define it in the CSV and then they use it. And the expected result is, it is a values that you want to compare, match after you run your statistical statements and the result should match with this one. So, you can define all those in CSV file and you can also source control this together. So, that's a value of having this one. Okay. So, let's get back to our main business of fixing the code. So, it was defined in XKit as user spec. And as we mentioned, what we are expecting is that instead of expecting the email in clear data format, we want to have it masked. Right. So, this is correct. When I just added it for demo purpose. So, I can fix my test. So, this is correct. The broken test is now the expected test. Right. So, for public user, it should expect the masked value. For internal apps, it shouldn't be masked. Yeah. It should be the real value. Right. So, that's the change. And let me run the test one more time. And run all this. This is, you know, the kind of like, the user is a great example because the user could just be right in your machine with the configuration. The granted permissions could just be right in your local dev box. Right. It's something that I can easily see myself overlooking when you move environment. So, having this in multiple environments, especially when you get to the cleaner like UAT where you have hopefully a lot less sort of chaos going on. Right. And you can run this, make sure things are still good. Oh, we forgot the one step. So, we made the code fix in internal apps, right? Mm-hmm. And... Oh, redeploy, of course. Yeah. We need to build it. I was thinking we should do that. And then... Why didn't you tell me? You get me too excited about the other things we're looking at. Okay. It should be done by now. Okay. It's done. Yeah. So, let's publish one more time. Oh, let's use it. But our unit tests all proved useful, right? That's right. It is still giving us. Yeah. It is testing our testing. All right. Okay. Great. So, in a few seconds, it will be done. Okay. It's done. So, let me run the unit test one more time. All right. It's passed. Awesome. So, now we are ready to check in. All right. Let's check in. And let me name it as a channel nine demo. Changes. And I'll commit. Okay. It's committed. And here down below, I'll show you. Oh, we'll push it to our repository. Here. Push. Okay. It'll be done. Great. So, it's checked in. So, let's go and check our builds. So, now we see two builds kicked off because our change that we just made. The first one is what we already had in the episode two. The second one is called Tools Unit Test CI Dev, which is the new build definition that I added. So, let's go and check it out. If you see, there is a database unit test step added in our build definition to have a gated build. While it's running, let's take a look at the history of our builds. Okay. So, if you take a look at the, out of the history there, it was a failed one. Okay. If I click then. The good thing is that Visual Studio Team Services with the Slacker Runner integration, it shows all the test results in the same build dashboard. So, whenever there's a build or failure, you can always go and check what has failed. Clicking the reports will show you exactly what has failed. So, you have a full history of your CI build. If any test fails, then your entire build instance will fail. That means you're not going to have a build out. Then it doesn't, the CI-CD pipeline stops at that level so we can gate it. Yeah, and it's the same amount of information you get in Visual Studio in the Test Explorer, right? So, you have the full fidelity of the info being available. That is correct. Yeah, very cool. Okay, let's go back to our build. It's all done. So, let me quickly show you what I have changed in the build definition. So, it's all the same except the database unit test. Yeah, and when we say the same, we mean like to the previous one. Oh, from the episode two. So, if you want to kind of correctly follow up, you know, I suggest watch the episode one, two, and the three. If you have already done that, then it'll be easy to just follow up. I can't help but think of Star Wars every time we talk about episodes one and two. The marketing has worked, I'm converted, but yes, we're not talking about anything made by Disney here. Okay. Okay, thank you for the clarification. Yes. So, I made a little bit of a change in the build task. Instead of just the building it, I also added publish. Okay, I will make it big. What I want to do is that as a part of CI build process, after build is successful, then I want to publish it to a unit test environment, which right now is the same environment as a build agent. Sure. So, you're publishing your T-SQL for all the changes that they've built successfully. So, the first part is the build, right? That's the basic validation we're talking about. And now, that's the second part. In order to run the test, we need to have something to run against with some data, with some structure to it. Yes. Yes. And then one more parameter that, property that I added is a SQL published profile path. In the Visual Studio, we added the published profile for unit test use. And we just defined it here, because we are defining the server instance as local host, where it goes, it runs on the same box. So, in this case, we have installed the SQL server on the build agent, and it runs there. Even though it is an enterprise, my production is running on Azure or enterprise edition of a SQL server instance. On the build agent, you can use Express or developer. As a part of SQL Server 2016 SP1, the great feature expansion was we expanded all the program mobility surface area. So, all those, most of those enterprise edition level of feature is also available in the Express and all the way up. Yeah, that's the change that folks might have missed potentially, right? By the way, we're excited. It was one of my fun projects, so. Right. So, on the build agent, you don't have to run the enterprise edition to test enterprise version of a SQL instance. Okay, so you have flexibility. On the test side, I didn't change anything. What I did was just a click add test, and there's a test category. And if you go all the way down, there's a Visual Studio test. Because our solution has a slacker test, and then the slacker runner, I'm going to show you in a second. Visual Studio test automatically picks up our test project and run it as a part of this task definition. Okay, so you just add and you didn't customize it besides the name? No. Okay. So, that's basically what happened. Okay. And then, for that matter, I will quickly show you our project one more time, and then database unit test project. It is the same as Visual Studio C-Sharp test project. And after you create, let me show you, you go to add new project, and it's the same as this one. Okay? Unit test project. So, just the default unit test project. And then I see over there in the references, over in solution explorer, I mean. Right. You added a slacker runner. Right. So, it is a NuGet package. You can easily install this NuGet package from NuGet installer. Slacker runner and X unit. These are what you can get from NuGet package. I have a setup guide that I published in my GitHub public project. So, I have a reference to do that. And you can just follow the step by step, and you can have the same thing. But there is no additional coding that you need. You just add a NuGet package. And the test case, which is a Visual Studio test framework, test the case. What you can do is this is like a template. So, you can copy paste the same code, and then I put it in the test-spec.cs. And it will pick up all the specs that you have defined in Slacker project as a specs, and then just run it in sequential. So, you're making it very generic, and this just enables the magic glue to get everything working together. For people who have been using the Visual Studio test project, test the framework a long time, you can do all other magics, right? Instead of running all, you can run it individually, and then you can do, but you can apply the same technique here, just for the demo, I just made it really simple, and the template level to pick up all the specs and run it. All right, so let's check our application. So, now our change is again deployed to our unit test environment, the usual acceptance test environment, so that now we can do the functional testing on that one and the usual acceptance test. Cool, that's very cool. Okay, so that was the demo that I wanted to show you. So, the key thing is that using the unit test, you could detect test the code and your real code issue in the database, so that before it slips through the, to the all the way to the production, and then they're getting the customer reported issue with the heavy pressure to fix it and validate it. So, there is a value that you can apply the database unit test in the perspective. I will go to the references. I have listed all the references about the technologies that we used and then the tutorials that we went through. So, for Slacker and Slacker Runner, you can go to GitHub Project, both are open source, and then you can learn from here. And for, if you're interested in T-Tecility, T-Tecility has its own homepage, and it's open source, but it also have a lot of community contributions. So, it's been a lot longer from what I can think of. It's a longer than the Slacker. And for episode one, our SSDD DevOps episode one and episode two, there is a link.  And I made it two projects in my GitHub account, so you can go to these two GitHub projects and clone it and simply run it and see what's in there. Awesome. So, if you have any question, then you can send me an email to EricKangatMicrosoft.com or you can follow us, it's called Data Tools on Twitter. So, that's basically what we offer. Awesome. Well, I hope folks out there enjoyed this episode. I think we covered a lot. I think the test frameworks are really cool to see the community investing into the SQL space for us and us having such great integration. I mean, I'm sure it would have taken me some time to learn, but it doesn't seem like it's way more than something you can learn. It's a days of work and then hopefully your project benefits for years to come. Right. So, if you're a developer, as a developer, as a PM, I could learn it in one day, right? As a developer. A developer could be maybe 10 minutes. Yeah, maybe 10 minutes. All right, Eric, well, thank you so much and I'm sure we'll have you on again for other topics, but thank you for being on. It was great to have you. Thank you, Dimitri. And thank you, folks, for watching. We'll be back next time on Digital City Toolbox. Have a good one.