This document provides an overview and examples of using MongoDB aggregations. It begins with introductions to MongoDB basics like documents, collections, and simple queries. The bulk of the document focuses on the MongoDB aggregation pipeline, explaining what it is, common stages like $match, $group, $lookup, and examples of queries using those stages like filtering orders by postcode, grouping orders by type, joining products and brands with $lookup. It provides examples of more advanced techniques like lookups with sub-pipelines, grouping, dates, and exercises for readers to try themselves.
Microservices and pineapple on pizza what do they have in common - dos and ...Mauro Servienti
Microservices è una delle buzzword del momento. Sembra quasi che un'architettura a microservices sia fondamentale. È veramente così? Faremo un tortuoso viaggio tra le buzzword del momento cercando di districarci tra cosa è bene e cosa è meno bene, ma soprattutto perché. Obiettivo è quello di comprendere quali sono i limiti di certe scelte architetturali e quali gli errori da non commettere. Il tutto nell'ottica di garantire ai nostri sistemi 'lunga vita e prosperità' (cit.)
1) The document discusses the concept of pure competition and profit maximization for firms in pure competition. It defines the characteristics of pure competition and how demand is perceived by purely competitive firms as perfectly elastic.
2) It then covers the two approaches firms use to maximize profits in the short-run: total revenue-total cost and marginal revenue-marginal cost. Both approaches are shown to result in the rule of producing at the quantity where marginal revenue equals marginal cost.
3) The document concludes by discussing how purely competitive firms maximize profits in the long-run through free entry and exit until economic profits are driven down to zero and price equals minimum average total cost.
Assumptions: Check yo'self before you wreck yourselfErin Shellman
Predicting the future is hard and it requires a lot of assumptions, also known as beliefs, also known as faith. In “Assumptions: Check yo self, before you wreck yo self” we explore the consequences of beliefs when constructing predictive models. We’ll walk through the process of developing a demand forecast for Evo, a Seattle-based outdoor recreation retailer, and discuss how assumptions influence the behavior of your application and ultimately the decisions you make.
Hen 368 lecture 9 structure, conduct, performance, and market analysisGale Pooley
The document outlines key concepts from a lecture on health economics including the structure-conduct-performance paradigm, different market structures like perfect competition, monopoly, and oligopoly. It discusses how the basic conditions of supply, demand, technology, and legal factors influence market structure and firm conduct. Firm objectives like profit maximization are examined along with the impact of public policy tools. Graphs are presented comparing output, price, and profit under perfect competition versus monopoly.
The document contains notes and concepts related to business, economics, and finance. Some key topics covered include demand and elasticity, pricing strategies, accounting principles like balance sheets and ratios, stock market concepts, and the business lifecycle. Micro and macroeconomic theories are also referenced.
Wang ke mining revenue-maximizing bundling configurationjins0618
This document presents algorithms for mining revenue-maximizing bundling configurations from consumer preference data. It discusses how willingness to pay for items can be estimated from online ratings data. The bundle configuration problem of grouping items into bundles to maximize total revenue is formulated and shown to be NP-hard for bundles of size 3 or more. Heuristic algorithms based on graph matching and greedy approaches are proposed to solve the problem approximately. The algorithms are evaluated on a real dataset of Amazon book ratings, demonstrating increased revenue from bundling over selling items individually.
Demand is defined as the willingness and ability to purchase a good. The quantity demanded refers to the actual number of units purchased at a given price. The law of demand states that as price increases, quantity demanded decreases, and vice versa. A demand schedule shows the relationship between price and quantity demanded, and can be represented graphically as a demand curve. A shift in the demand curve indicates a change in demand, whereas a movement along the curve represents a change in quantity demanded in response to a price change. Factors that can cause demand to shift include changes in income, preferences, prices of related goods, and the number of consumers.
This document summarizes key concepts in macroeconomics including:
1. It defines GDP as the total value of goods and services produced domestically over a period of time and explains how GDP is calculated using the expenditure approach.
2. It discusses different types of unemployment like frictional, seasonal, structural, and cyclical unemployment and how the unemployment rate is calculated.
3. It introduces the concepts of the consumption function, marginal propensity to consume, savings function, and multiplier effect which show how consumption and savings impact aggregate demand.
Microservices and pineapple on pizza what do they have in common - dos and ...Mauro Servienti
Microservices è una delle buzzword del momento. Sembra quasi che un'architettura a microservices sia fondamentale. È veramente così? Faremo un tortuoso viaggio tra le buzzword del momento cercando di districarci tra cosa è bene e cosa è meno bene, ma soprattutto perché. Obiettivo è quello di comprendere quali sono i limiti di certe scelte architetturali e quali gli errori da non commettere. Il tutto nell'ottica di garantire ai nostri sistemi 'lunga vita e prosperità' (cit.)
1) The document discusses the concept of pure competition and profit maximization for firms in pure competition. It defines the characteristics of pure competition and how demand is perceived by purely competitive firms as perfectly elastic.
2) It then covers the two approaches firms use to maximize profits in the short-run: total revenue-total cost and marginal revenue-marginal cost. Both approaches are shown to result in the rule of producing at the quantity where marginal revenue equals marginal cost.
3) The document concludes by discussing how purely competitive firms maximize profits in the long-run through free entry and exit until economic profits are driven down to zero and price equals minimum average total cost.
Assumptions: Check yo'self before you wreck yourselfErin Shellman
Predicting the future is hard and it requires a lot of assumptions, also known as beliefs, also known as faith. In “Assumptions: Check yo self, before you wreck yo self” we explore the consequences of beliefs when constructing predictive models. We’ll walk through the process of developing a demand forecast for Evo, a Seattle-based outdoor recreation retailer, and discuss how assumptions influence the behavior of your application and ultimately the decisions you make.
Hen 368 lecture 9 structure, conduct, performance, and market analysisGale Pooley
The document outlines key concepts from a lecture on health economics including the structure-conduct-performance paradigm, different market structures like perfect competition, monopoly, and oligopoly. It discusses how the basic conditions of supply, demand, technology, and legal factors influence market structure and firm conduct. Firm objectives like profit maximization are examined along with the impact of public policy tools. Graphs are presented comparing output, price, and profit under perfect competition versus monopoly.
The document contains notes and concepts related to business, economics, and finance. Some key topics covered include demand and elasticity, pricing strategies, accounting principles like balance sheets and ratios, stock market concepts, and the business lifecycle. Micro and macroeconomic theories are also referenced.
Wang ke mining revenue-maximizing bundling configurationjins0618
This document presents algorithms for mining revenue-maximizing bundling configurations from consumer preference data. It discusses how willingness to pay for items can be estimated from online ratings data. The bundle configuration problem of grouping items into bundles to maximize total revenue is formulated and shown to be NP-hard for bundles of size 3 or more. Heuristic algorithms based on graph matching and greedy approaches are proposed to solve the problem approximately. The algorithms are evaluated on a real dataset of Amazon book ratings, demonstrating increased revenue from bundling over selling items individually.
Demand is defined as the willingness and ability to purchase a good. The quantity demanded refers to the actual number of units purchased at a given price. The law of demand states that as price increases, quantity demanded decreases, and vice versa. A demand schedule shows the relationship between price and quantity demanded, and can be represented graphically as a demand curve. A shift in the demand curve indicates a change in demand, whereas a movement along the curve represents a change in quantity demanded in response to a price change. Factors that can cause demand to shift include changes in income, preferences, prices of related goods, and the number of consumers.
This document summarizes key concepts in macroeconomics including:
1. It defines GDP as the total value of goods and services produced domestically over a period of time and explains how GDP is calculated using the expenditure approach.
2. It discusses different types of unemployment like frictional, seasonal, structural, and cyclical unemployment and how the unemployment rate is calculated.
3. It introduces the concepts of the consumption function, marginal propensity to consume, savings function, and multiplier effect which show how consumption and savings impact aggregate demand.
Mikhail has recently come back from Robocup 2022 in Bangkok, where he and other members of the Australian team rUNSWift has been competing for the world robotics soccer cup. Mikhail will take us behind the scenes and talk about how the robots work and what approach allowed rUNSWift to take another trophy home this time going from the 6th in 2021 to the 3rd place in 2022.
State management with GraphQL [Angular Minsk, Online, 13.06.20]Mikhail Asavkin
- Client subscribes to information of interest from the server
- Server sends updates to the client based on its subscriptions
- If no changes, the server does not send updates
- Client can have multiple subscriptions and receive updates from the server in real-time
What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]Mikhail Asavkin
Everything around us these days depends on technology. Teams of engineers create this technology. Our life depends on great engineers doing their best. On a quest to find and mentor the next generation of great engineers, I sought to identify the traits that make a great engineer. These slides are from the first talk about the subject on which I've been working on for 1.5 years. Here I present the first three of the seven qualities that (according to my research, survey and my very biased opinion) make a great engineer.
Interactive Debugging [Node school Sydney 14.09.19]Mikhail Asavkin
Interactive debugging allows developers to pause execution of an application and inspect its current state without modifying code. A debugging tool attaches to the running program and provides controls like breakpoints, stepping, and viewing variables. This enables finding and fixing bugs during development.
Dissecting different approaches to the app and components architecture, highlighting some of the good and bad decisions, talking about dangerous pitfalls that await other developers embarking on the same journey.
Real-time GraphQL API with minimum coding and maximum benefitMikhail Asavkin
There are many ways to build your GraphQL server in NodeJS. Some will require a lot of work, some will require almost no code at all. This time we'll focus on real-time GraphQL API or so-called 'live query' feature. We'll explore the best libraries and services to use to build your own real-time GraphQL API server, highlight some pros and cons and mistakes to avoid.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Mikhail has recently come back from Robocup 2022 in Bangkok, where he and other members of the Australian team rUNSWift has been competing for the world robotics soccer cup. Mikhail will take us behind the scenes and talk about how the robots work and what approach allowed rUNSWift to take another trophy home this time going from the 6th in 2021 to the 3rd place in 2022.
State management with GraphQL [Angular Minsk, Online, 13.06.20]Mikhail Asavkin
- Client subscribes to information of interest from the server
- Server sends updates to the client based on its subscriptions
- If no changes, the server does not send updates
- Client can have multiple subscriptions and receive updates from the server in real-time
What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]Mikhail Asavkin
Everything around us these days depends on technology. Teams of engineers create this technology. Our life depends on great engineers doing their best. On a quest to find and mentor the next generation of great engineers, I sought to identify the traits that make a great engineer. These slides are from the first talk about the subject on which I've been working on for 1.5 years. Here I present the first three of the seven qualities that (according to my research, survey and my very biased opinion) make a great engineer.
Interactive Debugging [Node school Sydney 14.09.19]Mikhail Asavkin
Interactive debugging allows developers to pause execution of an application and inspect its current state without modifying code. A debugging tool attaches to the running program and provides controls like breakpoints, stepping, and viewing variables. This enables finding and fixing bugs during development.
Dissecting different approaches to the app and components architecture, highlighting some of the good and bad decisions, talking about dangerous pitfalls that await other developers embarking on the same journey.
Real-time GraphQL API with minimum coding and maximum benefitMikhail Asavkin
There are many ways to build your GraphQL server in NodeJS. Some will require a lot of work, some will require almost no code at all. This time we'll focus on real-time GraphQL API or so-called 'live query' feature. We'll explore the best libraries and services to use to build your own real-time GraphQL API server, highlight some pros and cons and mistakes to avoid.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemPeter Muessig
Learn about the latest innovations in and around OpenUI5/SAPUI5: UI5 Tooling, UI5 linter, UI5 Web Components, Web Components Integration, UI5 2.x, UI5 GenAI.
Recording:
https://www.youtube.com/live/MSdGLG2zLy8?si=INxBHTqkwHhxV5Ta&t=0
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
39. MongoDB Basics
● MongoDB = Document-oriented database
● Document = record
● Document structure is almost JSON
● Documents belong to a Collection
● Database has many Collections
@limenutt
49. ● FAST: 10x faster than doing the same in the backend
● EASY TO USE: Build a complex report in a few minutes
Why use Aggregation Pipeline
@limenutt
50. ● Aggregation is a list of operations
What is Aggregation Pipeline
@limenutt
51. ● Aggregation is a list of operations
● Operations performed in order
What is Aggregation Pipeline
@limenutt
52. ● Aggregation is a list of operations
● Operations performed in order
● Output of the previous operation is the input of the next
one, hence Pipeline
What is Aggregation Pipeline
@limenutt
53. ● Aggregation is a list of operations
● Operations performed in order
● Output of the previous operation is the input of the next
one, hence Pipeline
● It’s mapreduce on steroids
What is Aggregation Pipeline
@limenutt
84. T: Filtering ($match stage)
E: List all orders with postcode 2000
Operator ‘equals’ [a, b]
@limenutt
85. T: Filtering ($match stage)
E: List all orders with postcode 2000
Operator ‘equals’ [a, b]
Reference to the field postcode
@limenutt
86. T: Filtering ($match stage)
E: List all orders with postcode 2000
Operator ‘equals’ [a, b]
Reference to the field postcode
@limenutt
87. T: Filtering ($match stage)
E: List all orders with postcode 2000
Operator ‘equals’ [a, b]
Reference to the field postcode
@limenutt
88. T: Filtering ($match stage)
1. List all orders in NSW
2. List all products under $50 (retailPrice)
3. List all products within $50 — $100
@limenutt
89. T: Sorting ($sort stage)
E: Orders sorted by creation date
@limenutt
90. T: Sorting ($sort stage)
E: Orders sorted by creation date
@limenutt
91. T: Sorting ($sort stage)
1. Products sorted by retail price
ascending
2. Products sorted by retail price
descending
@limenutt
101. T: Group accumulator operators
E: Average product retail price
Accumulator operator ‘average’
@limenutt
102. T: Group accumulator operators
1. Maximum product price
2. Sum of prices of all products
3. Total number of products
@limenutt
103. T: Filtering + counting
1. Number of orders with type of
Style Lab
2. Number of products over $100
@limenutt
104. T: Grouping + counting
1. Number of orders by type
2. Number of orders by state
3. Number of colours by name
@limenutt
105. T: Adding fields and Expressions
E: Products with margin amounts
@limenutt
106. T: Adding fields and Expressions
E: Products with margin amounts
@limenutt
107. T: Adding fields and Expressions
E: Products with margin amounts
This stage adds new fields to the documents
@limenutt
108. T: Adding fields and Expressions
E: Products with margin amounts
This stage adds new fields to the documents
Field expression
@limenutt
109. T: Adding fields and Expressions
1. Products with margin percentage
2. Top 10 products with the highest
margin percentage
3. Products by number of variants
@limenutt
114. T: 1-1 Lookups ($lookup stage)
E: Products with brand
Collection to look up from
Field to match from current collection
Field to match from another collection
Field for the result
@limenutt
115. T: 1-1 Lookups ($lookup stage)
E: Products with brand
Collection to look up from
Field to match from current collection
Field to match from another collection
Field for the result
The result is always an array
@limenutt
116. T: 1-1 Lookups ($lookup stage)
E: Products with brand
Collection to look up from
Field to match from current collection
Field to match from another collection
Field for the result
The result is always an array
Turn array into object (for now)@limenutt
117. T: 1-1 Lookups ($lookup stage)
1. Variants with product
2. Variants with retail price
@limenutt
123. T: Lookups with grouping
1. Number of products by category
2. Average product price by brand
@limenutt
124. 1. Top 10 most expensive Casual products
2. Top 5 cheapest red products
3. Products with tags joined by commas
T: Lookups with expressions
@limenutt
125. T: Lookups with sub-pipelines
Order
variants [id, id,...id]
Variant
size
_id
customer
@limenutt
129. T: Lookups with sub-pipelines
Variables to be used in sub-pipeline
@limenutt
130. T: Lookups with sub-pipelines
Variables to be used in sub-pipeline
This pipeline is executed in orders collection
@limenutt
131. T: Lookups with sub-pipelines
Variables to be used in sub-pipeline
This pipeline is executed in orders collection
$in [b, a] operator checks if value b is in the array a
Identity comparison used!
@limenutt
132. T: Lookups with sub-pipelines
1. Products with orders
2. Orders with total amounts
@limenutt
135. T: Dates
1. Sales by year
2. Sales by month-year
3. Sales by a salesperson (owner)
by month-year
@limenutt
136. T: Advanced
1. Most popular products
2. Brands by margin percentage
3. Top 5 most profitable categories
4. Variants by base colours
5. Most popular base colours by month
6. Number of products per $50 price
bracket, sorted by max price ascending
@limenutt