SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Graph Gurus
Episode 14
Pattern Matching using GSQL Interpreted Mode
© 2019 TigerGraph. All Rights Reserved
Welcome
● Attendees are muted
● If you have any Zoom issues please contact the panelists via chat
● We will have 10 min for Q&A at the end so please send your questions
at any time using the Q&A tab in the Zoom menu
● The webinar will be recorded and sent via email
2
© 2019 TigerGraph. All Rights Reserved
Today's Gurus
3
Victor Lee
Director, Product Management
● BS in Electrical Engineering and Computer
Science from UC Berkeley
● MS in Electrical Engineering from Stanford
University
● PhD in Computer Science from Kent State
University focused on graph data mining
● 15+ years in tech industry
Mingxi Wu
VP, Engineering
● BS in Computer Science from Fudan University,
China
● MS in Computer Science from University of Florida
● PhD in Computer Science from University of
Florida
● 19+ years in data management industry &
research
© 2019 TigerGraph. All Rights Reserved
Agenda
4
● Pattern Matching Uses in Data Analytics
● GSQL Pattern Matching Syntax and Semantics
● Pattern Matching Using LDBC SNB Data (Demo)
● A Recommendation Application (Demo)
● Q&A
© 2019 TigerGraph. All Rights Reserved
Graph Use Cases
5
By Dan McCreary https://medium.com/@dmccreary/a-taxonomy-of-graph-use-cases-2ba34618cf78
© 2019 TigerGraph. All Rights Reserved
Graph Use Cases
6
Rule
Enforcement
Flexible
Modeling, Data
Integration
Insight from
Relationships
Reporting,
Auditing
Clustering,
Community,
Similarity,
Ranking
Finding
Connections,
Deep Link
Analysis
Anti-Fraud
Recommendation
Master Data
Management
Machine Learning,
Explainable AI
Entity
Resolution
Ad Hoc
Exploration,
Visual
Explainable
Results
Knowledge
Inference
Risk
Management
Data
Provenance
© 2019 TigerGraph. All Rights Reserved
Graph Use Cases
7
Rule
Enforcement
Flexible
Modeling, Data
Integration
Insight from
Relationships
Reporting,
Auditing
Clustering,
Community,
Similarity,
Ranking
Finding
Connections,
Deep Link
Analysis
Anti-Fraud
Recommendation
Master Data
Management
Machine Learning,
Explainable AI
Entity
Resolution
Ad Hoc
Exploration,
Visual
Explainable
Results
Knowledge
Inference
Risk
Management
Data
Provenance
Pattern
Matching/Search
© 2019 TigerGraph. All Rights Reserved
Graph Patterns
Any arrangement of connected nodes, used as a search input:
"Find all the occurrences like this"
Pattern Types
● Transactional Patterns
● Social Patterns
● Event Patterns
● Hybrid Patterns
Uses
● Recommendation
● Fraud/Crime
● Security/Risk/Rules
● Trends/Insight
© 2019 TigerGraph. All Rights Reserved 9
Detecting Phone-Based Fraud by Analyzing Network or Graph
Relationship Features at China Mobile
Download the solution brief at - https://info.tigergraph.com/MachineLearning
© 2019 TigerGraph. All Rights Reserved
Pattern Matching Overview
10
● What is a pattern?
○ Pattern is a traversal trace on the graph schema
○ Use regular expression to represent the repetitive steps
○ Pattern can be linear, or nonlinear (tree, circle etc.)
● Example
○ Imagine a schema consisting of a Person vertex type and a
Friendship edge type.
○ A pattern
■ Person-(Friendship)-Person-(Friendship)-Person
■ Person-(Friendship*2)-Person
© 2019 TigerGraph. All Rights Reserved
Pattern Matching Overview
11
● What is Pattern Matching?
○ Pattern matching is the process of finding subgraphs in a
data graph that conforms to a given query pattern.
○ Input
■ Query Pattern P
■ Data Graph G
○ Output
■ Collection of matched instances M = {subgraphs of G}
© 2019 TigerGraph. All Rights Reserved
Query Pattern P
Data Graph G
© 2019 TigerGraph. All Rights Reserved
Query Pattern P
Data Graph G
First Match
© 2019 TigerGraph. All Rights Reserved
Query Pattern P
Data Graph G
First Match
Second Match
© 2019 TigerGraph. All Rights Reserved
Query Pattern P
Data Graph G
First Match
Second Match
Third Match
© 2019 TigerGraph. All Rights Reserved
GSQL Pattern Matching Overview
16
● Simple 1-Hop Pattern
● Repeating a 1-Hop Pattern
● Multi-Hop Linear Pattern
© 2019 TigerGraph. All Rights Reserved
Simple 1-Hop Pattern
17
Classic GSQL Syntax:
FROM X:x -((E1 | E2 | E3):e1)-> Y:y
● Semantics: Traverse from Left to Right
GSQL Pattern Matching Syntax:
FROM X:x -((E1> | <E2 | E3):e1)- Y:y
● Semantics: Pattern is a whole;
each edge's direction is a detail about the pattern
© 2019 TigerGraph. All Rights Reserved
Simple 1-Hop Pattern - Variations
18
1. FROM X:x -(E1:e1)- Y:y
○ E1 is an undirected edge. x, y bind to the end points of E1. e1 is alias to E1.
2. FROM X:x -(E2>:e2)- Y:y
○ Right directed edge, x binds to the source of E2, y binds to the target of E2. e2 is alias of E2.
3. FROM X:x -(<E3:e3)- Y:y
○ Left directed edge, y binds to the source of E3, x binds to the target of E3. e3 is alias of E3.
4. FROM X:x -(_:e)- Y:y
○ Any undirected edge pattern. "_" means any undirected edge type. e is alias of "_".
5. FROM X:x -(_>:e)- Y:y
○ Any right directed edge. "_>" means any right directed edge type. e is alias of "_>".
© 2019 TigerGraph. All Rights Reserved
Simple 1-Hop Pattern - Variations
19
6. FROM X:x -(<_:e)- Y:y
○ Any left directed edge. "<_" means any left directed edge type. e is alias of "<_".
7. FROM X:x -((<_|_):e)- Y:y
○ Any left directed or any undirected. "|" means OR. e is alias of (<_|_).
8. FROM X:x -((E1|E2>|<E3):e) - Y:y
○ Disjunctive 1-hop edge. (x,y) are connected by E1 or E2 or E3. e is alias of (E1|E2>|<E3).
9. FROM X:x -()- Y:y
○ any edge (directed or undirected) match this 1-hop pattern
○ Same as this: (<_|_>|_)
© 2019 TigerGraph. All Rights Reserved
Simple 1-Hop Pattern (cont.)
20
© 2019 TigerGraph. All Rights Reserved 21
© 2019 TigerGraph. All Rights Reserved
Repeating a 1-Hop Pattern - Unbounded Variations
22
1. FROM X:x - (E1*) - Y:y
○ X connect to Y via 0 or more repetition of undirected E1. * is called the Kleene star.
2. FROM X:x - (E2>*) - Y:y
○ X connect to Y via 0 or more repetition of rightward E2
3. FROM X:x - (<E3*) - Y:y
○ X connect to Y via 0 or more repetition of leftward E3
4. FROM X:x - (_*) - Y:y
○ X connect to Y via 0 or more undirected edges of any type
© 2019 TigerGraph. All Rights Reserved
Repeating a 1-Hop Pattern - Unbounded Variations
23
5. FROM X:x - (_>*) - Y:y
○ X connect to Y via 0 or more right-directed edges of any type
6. FROM X:x - (<_*) - Y:y
○ X connect to Y via 0 or more left-directed edges of any type
7. FROM X:x - ((E1|E2>|<E3)*) - Y:y
○ Either E1, E2> or <E3 can be chosen at each repetition.
© 2019 TigerGraph. All Rights Reserved
Repeating a 1-Hop Pattern - Bounded Variations
24
1. FROM X:x - (E1*2..) - Y:y
○ Lower bounds only. There is a chain of at least 2 E1 edges.
2. FROM X:x - (E2>*..3) - Y:y
○ Upper bounds only. There is a chain of between 0 and 3 E2 edges.
3. FROM X:x - (<E3*3..5) - Y:y
○ Both Lower and Upper bounds. There is a chain of 3 to 5 E3 edges.
4. FROM X:x - ((E1|E2>|<E3)*3) - Y:y
○ Exact bound. There is a chain of exactly 3 edges, where each edge is either E1, E2>, or <E3.
© 2019 TigerGraph. All Rights Reserved
Repeating a Pattern - Remarks
25
1. Edge aliases cannot be used together with a Kleene star.
○ When an edge is repeated, it would not clear which instance of the edge
the alias refers to.
2. Shortest path semantics.
○ When an edge is repeated with the Kleene star, we consider shortest path
matches only.
○ Counting and existence check of matched shortest path pattern is
tractable.
© 2019 TigerGraph. All Rights Reserved 26
Example: Shortest Matching Path
In above figure, for the pattern, 1 - (E>*) - 4, the following paths can reach 4 from 1.
1. 1->2->3->4
2. 1->2->3->5->6->2->3->4 (1 loop)
3. Any path 1>2, looping through 2->3->5->6->2 two or more times, and exiting
2>3>4
Only the first one is the shortest, and considered a match for the pattern.
© 2019 TigerGraph. All Rights Reserved 27
Specifying How Many Repetitions (cont.)
© 2019 TigerGraph. All Rights Reserved 28
Specifying How Many Repetitions (cont.)
© 2019 TigerGraph. All Rights Reserved
Multiple-Hop Linear Pattern
29
● 2-hop pattern
○ FROM X:x - (E1:e1) - Y:y - (E2>:e2)-Z:z
1st hop 2nd hop
Similarly, a 3-hop pattern concatenates three 1-hop patterns in sequence,
every two connecting patterns share one endpoint. Below Y:y and Z:z are
the connecting endpoints.
● 3-hop pattern
○ FROM X:x - (E2>:e2) - Y:y - (<E3:e3)- Z:z - (E4:e4) - U:u
1st hop 2nd hop 3rd hop
© 2019 TigerGraph. All Rights Reserved
Multiple-Hop Linear Pattern
30
● SELECT Clause
○ select pattern’s endpoints only
○ FROM X:x-(E2>:e2)-Y:y-(<E3:e3)-Z:z-(E4:e4)-U:u;
● FROM Clause
○ FROM pattern can be shortened
■ FROM X:x-(E2>:e2)-Y:y-(<E3:e3)-Z:z-(E4:e4)-U:u ⇒
■ FROM X:x-(E2>.<E3.E4)-U:u; //note: no alias is allowed for E.E style
● WHERE Clause
○ Conjunction of local hop predicate only
○ Last hop local predicate can refer to the starting end point
○ Kleene star breaks local hop predicate
● ACCUM and POST-ACCUM Clause
○ ACCUM clause executed for each matched instance
○ ACCUM to endpoints only
© 2019 TigerGraph. All Rights Reserved
How To Use In Upcoming Release 2.4
31
● Session Parameter
○ set syntax_version="v2" //for pattern match
○ set syntax_version="v1" //default, classic syntax
● Invoke Interpret GSQL Engine
○ INTERPRET QUERY QueryName (p1, p2, ..) //run existing query
○ INTERPRET QUERY () FOR GRAPH graphName { } //adhoc query
● Query Level Syntax Setting
○ CREATE QUERY (p1, p2.,.) Name FOR GRAPH test SYNTAX("v2") { }
○ INTERPRET QUERY () FOR GRAPH test SYNTAX("v1") { }
© 2019 TigerGraph. All Rights Reserved
Demo Setup
32
© 2019 TigerGraph. All Rights Reserved
Demo Setup
33
E1 1,003,605
E2 2,052,169
E3 1,003,605
E4 229,166
E5 1,611,869
E6 90,492
E7 2,698,393
E8 713,258
E9 309,766
E10 16,080
E11 1,575
E12 6,380
E13 2,052,169
E14 1,003,605
E15 9,892
E16 1,343
E17 111
E18 70
Total :
3.18M vertices
17.25M edges
11 vertex types
25 edge types
Vertex Stats
Edge Stats
Total comment post
compan
y university city country continent forum person tag tagclass
# attributes 6 8 3 3 3 3 3 3 10 3 3
# vertices 3.18 M 2,052,169 1,003,605 1,575 6,380 1,343 111 6 90,492 9,892 16,080 71
E19 180,623
E20 1,438,418
E21 751,677
E22 1,040,749
E23 1,011,420
E24 7,949
E25 21,654
© 2019 TigerGraph. All Rights Reserved
Demo Setup
34
© 2019 TigerGraph. All Rights Reserved
Demo On Docker
35
© 2019 TigerGraph. All Rights Reserved
Summary
36
Version 2.4
Available End Jun
● Pattern Matching enables
● Demo: Pattern Match Using LDBC Social Network Benchmark Data
○ Interpreted Mode on laptop Docker -- run queries instantly as
soon as you write them
● Demo: Pattern Matching in a Recommender Application
○ Interpreted Mode again
Q&A
Please send your questions via the Q&A menu in Zoom
37
© 2019 TigerGraph. All Rights Reserved
Developer Edition Available
We now offer Docker versions and VirtualBox versions of the TigerGraph
Developer Edition, so you can now run on
● MacOS
● Windows 10
● Linux
Developer Edition Download https://www.tigergraph.com/developer/
38
© 2019 TigerGraph. All Rights Reserved
NEW! Graph Gurus Developer Office Hours
39
Catch up on previous episodes of Graph Gurus:
https://www.tigergraph.com/webinars-and-events/
Every Thursday at 11:00 am Pacific
Talk directly with our engineers every
week. During office hours, you get
answers to any questions pertaining to
graph modeling and GSQL
programming.
https://info.tigergraph.com/officehours
© 2019 TigerGraph. All Rights Reserved
Additional Resources
40
New Developer Portal
https://www.tigergraph.com/developers/
Download the Developer Edition or Enterprise Free Trial
https://www.tigergraph.com/download/
Guru Scripts
https://github.com/tigergraph/ecosys/tree/master/guru_scripts
Join our Developer Forum
https://groups.google.com/a/opengsql.org/forum/#!forum/gsql-users
@TigerGraphDB youtube.com/tigergraph facebook.com/TigerGraphDB linkedin.com/company/TigerGraph

Weitere ähnliche Inhalte

Was ist angesagt?

The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageNeo4j
 
Delta lake and the delta architecture
Delta lake and the delta architectureDelta lake and the delta architecture
Delta lake and the delta architectureAdam Doyle
 
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...Amazon Web Services
 
Understanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityUnderstanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityDevOps.com
 
DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDatabricks
 
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAmazon Web Services
 
Big data real time architectures
Big data real time architecturesBig data real time architectures
Big data real time architecturesDaniel Marcous
 
Neptune, the Graph Database | AWS Floor28
Neptune, the Graph Database | AWS Floor28Neptune, the Graph Database | AWS Floor28
Neptune, the Graph Database | AWS Floor28Amazon Web Services
 
Graph Databases for Master Data Management
Graph Databases for Master Data ManagementGraph Databases for Master Data Management
Graph Databases for Master Data ManagementNeo4j
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Databricks
 
Data Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & AthenaData Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & AthenaAmazon Web Services
 
Modernizing to a Cloud Data Architecture
Modernizing to a Cloud Data ArchitectureModernizing to a Cloud Data Architecture
Modernizing to a Cloud Data ArchitectureDatabricks
 
Data Architecture Strategies
Data Architecture StrategiesData Architecture Strategies
Data Architecture StrategiesDATAVERSITY
 
Modern Data architecture Design
Modern Data architecture DesignModern Data architecture Design
Modern Data architecture DesignKujambu Murugesan
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoDimko Zhluktenko
 
Intro to Data Vault 2.0 on Snowflake
Intro to Data Vault 2.0 on SnowflakeIntro to Data Vault 2.0 on Snowflake
Intro to Data Vault 2.0 on SnowflakeKent Graziano
 
Snowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleSnowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleAdam Doyle
 
Apache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshConfluentInc1
 

Was ist angesagt? (20)

The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
 
Delta lake and the delta architecture
Delta lake and the delta architectureDelta lake and the delta architecture
Delta lake and the delta architecture
 
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...
Effective Data Lakes: Challenges and Design Patterns (ANT316) - AWS re:Invent...
 
Understanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityUnderstanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application Quality
 
DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
 
Data Sharing with Snowflake
Data Sharing with SnowflakeData Sharing with Snowflake
Data Sharing with Snowflake
 
Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3
 
Big data real time architectures
Big data real time architecturesBig data real time architectures
Big data real time architectures
 
Neptune, the Graph Database | AWS Floor28
Neptune, the Graph Database | AWS Floor28Neptune, the Graph Database | AWS Floor28
Neptune, the Graph Database | AWS Floor28
 
Graph Databases for Master Data Management
Graph Databases for Master Data ManagementGraph Databases for Master Data Management
Graph Databases for Master Data Management
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Data Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & AthenaData Catalog & ETL - Glue & Athena
Data Catalog & ETL - Glue & Athena
 
Modernizing to a Cloud Data Architecture
Modernizing to a Cloud Data ArchitectureModernizing to a Cloud Data Architecture
Modernizing to a Cloud Data Architecture
 
Data Architecture Strategies
Data Architecture StrategiesData Architecture Strategies
Data Architecture Strategies
 
Modern Data architecture Design
Modern Data architecture DesignModern Data architecture Design
Modern Data architecture Design
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
 
Intro to Data Vault 2.0 on Snowflake
Intro to Data Vault 2.0 on SnowflakeIntro to Data Vault 2.0 on Snowflake
Intro to Data Vault 2.0 on Snowflake
 
Snowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at ScaleSnowflake Data Science and AI/ML at Scale
Snowflake Data Science and AI/ML at Scale
 
Apache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data Mesh
 

Ähnlich wie Graph Gurus Episode 14: Pattern Matching

An Efficient Model for Line Clipping Operation
An Efficient Model for Line Clipping OperationAn Efficient Model for Line Clipping Operation
An Efficient Model for Line Clipping OperationKasun Ranga Wijeweera
 
Algorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsAlgorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsChandan
 
Output Units and Cost Function in FNN
Output Units and Cost Function in FNNOutput Units and Cost Function in FNN
Output Units and Cost Function in FNNLin JiaMing
 
WachemoUniversity_Cryptography_and_Network_Security.pdf
WachemoUniversity_Cryptography_and_Network_Security.pdfWachemoUniversity_Cryptography_and_Network_Security.pdf
WachemoUniversity_Cryptography_and_Network_Security.pdfLegesseSamuel
 
5. Signal flow graph, Mason’s gain formula.pptx
5. Signal flow graph, Mason’s gain formula.pptx5. Signal flow graph, Mason’s gain formula.pptx
5. Signal flow graph, Mason’s gain formula.pptxAMSuryawanshi
 

Ähnlich wie Graph Gurus Episode 14: Pattern Matching (7)

An Efficient Model for Line Clipping Operation
An Efficient Model for Line Clipping OperationAn Efficient Model for Line Clipping Operation
An Efficient Model for Line Clipping Operation
 
ae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.pptae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.ppt
 
Algorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsAlgorithm of some numerical /computational methods
Algorithm of some numerical /computational methods
 
Output Units and Cost Function in FNN
Output Units and Cost Function in FNNOutput Units and Cost Function in FNN
Output Units and Cost Function in FNN
 
1 sollins algorithm
1 sollins algorithm1 sollins algorithm
1 sollins algorithm
 
WachemoUniversity_Cryptography_and_Network_Security.pdf
WachemoUniversity_Cryptography_and_Network_Security.pdfWachemoUniversity_Cryptography_and_Network_Security.pdf
WachemoUniversity_Cryptography_and_Network_Security.pdf
 
5. Signal flow graph, Mason’s gain formula.pptx
5. Signal flow graph, Mason’s gain formula.pptx5. Signal flow graph, Mason’s gain formula.pptx
5. Signal flow graph, Mason’s gain formula.pptx
 

Mehr von TigerGraph

MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATIONMAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATIONTigerGraph
 
Better Together: How Graph database enables easy data integration with Spark ...
Better Together: How Graph database enables easy data integration with Spark ...Better Together: How Graph database enables easy data integration with Spark ...
Better Together: How Graph database enables easy data integration with Spark ...TigerGraph
 
Building an accurate understanding of consumers based on real-world signals
Building an accurate understanding of consumers based on real-world signalsBuilding an accurate understanding of consumers based on real-world signals
Building an accurate understanding of consumers based on real-world signalsTigerGraph
 
Care Intervention Assistant - Omaha Clinical Data Information System
Care Intervention Assistant - Omaha Clinical Data Information SystemCare Intervention Assistant - Omaha Clinical Data Information System
Care Intervention Assistant - Omaha Clinical Data Information SystemTigerGraph
 
Correspondent Banking Networks
Correspondent Banking NetworksCorrespondent Banking Networks
Correspondent Banking NetworksTigerGraph
 
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...TigerGraph
 
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...TigerGraph
 
Fraud Detection and Compliance with Graph Learning
Fraud Detection and Compliance with Graph LearningFraud Detection and Compliance with Graph Learning
Fraud Detection and Compliance with Graph LearningTigerGraph
 
Fraudulent credit card cash-out detection On Graphs
Fraudulent credit card cash-out detection On GraphsFraudulent credit card cash-out detection On Graphs
Fraudulent credit card cash-out detection On GraphsTigerGraph
 
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraphFROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraphTigerGraph
 
Customer Experience Management
Customer Experience ManagementCustomer Experience Management
Customer Experience ManagementTigerGraph
 
Graph+AI for Fin. Services
Graph+AI for Fin. ServicesGraph+AI for Fin. Services
Graph+AI for Fin. ServicesTigerGraph
 
Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.TigerGraph
 
Plume - A Code Property Graph Extraction and Analysis Library
Plume - A Code Property Graph Extraction and Analysis LibraryPlume - A Code Property Graph Extraction and Analysis Library
Plume - A Code Property Graph Extraction and Analysis LibraryTigerGraph
 
GRAPHS FOR THE FUTURE ENERGY SYSTEMS
GRAPHS FOR THE FUTURE ENERGY SYSTEMSGRAPHS FOR THE FUTURE ENERGY SYSTEMS
GRAPHS FOR THE FUTURE ENERGY SYSTEMSTigerGraph
 
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...TigerGraph
 
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...TigerGraph
 
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUI
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUIMachine Learning Feature Design with TigerGraph 3.0 No-Code GUI
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUITigerGraph
 
Recommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine LearningRecommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine LearningTigerGraph
 

Mehr von TigerGraph (20)

MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATIONMAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
 
Better Together: How Graph database enables easy data integration with Spark ...
Better Together: How Graph database enables easy data integration with Spark ...Better Together: How Graph database enables easy data integration with Spark ...
Better Together: How Graph database enables easy data integration with Spark ...
 
Building an accurate understanding of consumers based on real-world signals
Building an accurate understanding of consumers based on real-world signalsBuilding an accurate understanding of consumers based on real-world signals
Building an accurate understanding of consumers based on real-world signals
 
Care Intervention Assistant - Omaha Clinical Data Information System
Care Intervention Assistant - Omaha Clinical Data Information SystemCare Intervention Assistant - Omaha Clinical Data Information System
Care Intervention Assistant - Omaha Clinical Data Information System
 
Correspondent Banking Networks
Correspondent Banking NetworksCorrespondent Banking Networks
Correspondent Banking Networks
 
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
 
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
 
Fraud Detection and Compliance with Graph Learning
Fraud Detection and Compliance with Graph LearningFraud Detection and Compliance with Graph Learning
Fraud Detection and Compliance with Graph Learning
 
Fraudulent credit card cash-out detection On Graphs
Fraudulent credit card cash-out detection On GraphsFraudulent credit card cash-out detection On Graphs
Fraudulent credit card cash-out detection On Graphs
 
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraphFROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
 
Customer Experience Management
Customer Experience ManagementCustomer Experience Management
Customer Experience Management
 
Graph+AI for Fin. Services
Graph+AI for Fin. ServicesGraph+AI for Fin. Services
Graph+AI for Fin. Services
 
Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.
 
Plume - A Code Property Graph Extraction and Analysis Library
Plume - A Code Property Graph Extraction and Analysis LibraryPlume - A Code Property Graph Extraction and Analysis Library
Plume - A Code Property Graph Extraction and Analysis Library
 
TigerGraph.js
TigerGraph.jsTigerGraph.js
TigerGraph.js
 
GRAPHS FOR THE FUTURE ENERGY SYSTEMS
GRAPHS FOR THE FUTURE ENERGY SYSTEMSGRAPHS FOR THE FUTURE ENERGY SYSTEMS
GRAPHS FOR THE FUTURE ENERGY SYSTEMS
 
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
 
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
 
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUI
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUIMachine Learning Feature Design with TigerGraph 3.0 No-Code GUI
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUI
 
Recommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine LearningRecommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine Learning
 

Kürzlich hochgeladen

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Kürzlich hochgeladen (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Graph Gurus Episode 14: Pattern Matching

  • 1. Graph Gurus Episode 14 Pattern Matching using GSQL Interpreted Mode
  • 2. © 2019 TigerGraph. All Rights Reserved Welcome ● Attendees are muted ● If you have any Zoom issues please contact the panelists via chat ● We will have 10 min for Q&A at the end so please send your questions at any time using the Q&A tab in the Zoom menu ● The webinar will be recorded and sent via email 2
  • 3. © 2019 TigerGraph. All Rights Reserved Today's Gurus 3 Victor Lee Director, Product Management ● BS in Electrical Engineering and Computer Science from UC Berkeley ● MS in Electrical Engineering from Stanford University ● PhD in Computer Science from Kent State University focused on graph data mining ● 15+ years in tech industry Mingxi Wu VP, Engineering ● BS in Computer Science from Fudan University, China ● MS in Computer Science from University of Florida ● PhD in Computer Science from University of Florida ● 19+ years in data management industry & research
  • 4. © 2019 TigerGraph. All Rights Reserved Agenda 4 ● Pattern Matching Uses in Data Analytics ● GSQL Pattern Matching Syntax and Semantics ● Pattern Matching Using LDBC SNB Data (Demo) ● A Recommendation Application (Demo) ● Q&A
  • 5. © 2019 TigerGraph. All Rights Reserved Graph Use Cases 5 By Dan McCreary https://medium.com/@dmccreary/a-taxonomy-of-graph-use-cases-2ba34618cf78
  • 6. © 2019 TigerGraph. All Rights Reserved Graph Use Cases 6 Rule Enforcement Flexible Modeling, Data Integration Insight from Relationships Reporting, Auditing Clustering, Community, Similarity, Ranking Finding Connections, Deep Link Analysis Anti-Fraud Recommendation Master Data Management Machine Learning, Explainable AI Entity Resolution Ad Hoc Exploration, Visual Explainable Results Knowledge Inference Risk Management Data Provenance
  • 7. © 2019 TigerGraph. All Rights Reserved Graph Use Cases 7 Rule Enforcement Flexible Modeling, Data Integration Insight from Relationships Reporting, Auditing Clustering, Community, Similarity, Ranking Finding Connections, Deep Link Analysis Anti-Fraud Recommendation Master Data Management Machine Learning, Explainable AI Entity Resolution Ad Hoc Exploration, Visual Explainable Results Knowledge Inference Risk Management Data Provenance Pattern Matching/Search
  • 8. © 2019 TigerGraph. All Rights Reserved Graph Patterns Any arrangement of connected nodes, used as a search input: "Find all the occurrences like this" Pattern Types ● Transactional Patterns ● Social Patterns ● Event Patterns ● Hybrid Patterns Uses ● Recommendation ● Fraud/Crime ● Security/Risk/Rules ● Trends/Insight
  • 9. © 2019 TigerGraph. All Rights Reserved 9 Detecting Phone-Based Fraud by Analyzing Network or Graph Relationship Features at China Mobile Download the solution brief at - https://info.tigergraph.com/MachineLearning
  • 10. © 2019 TigerGraph. All Rights Reserved Pattern Matching Overview 10 ● What is a pattern? ○ Pattern is a traversal trace on the graph schema ○ Use regular expression to represent the repetitive steps ○ Pattern can be linear, or nonlinear (tree, circle etc.) ● Example ○ Imagine a schema consisting of a Person vertex type and a Friendship edge type. ○ A pattern ■ Person-(Friendship)-Person-(Friendship)-Person ■ Person-(Friendship*2)-Person
  • 11. © 2019 TigerGraph. All Rights Reserved Pattern Matching Overview 11 ● What is Pattern Matching? ○ Pattern matching is the process of finding subgraphs in a data graph that conforms to a given query pattern. ○ Input ■ Query Pattern P ■ Data Graph G ○ Output ■ Collection of matched instances M = {subgraphs of G}
  • 12. © 2019 TigerGraph. All Rights Reserved Query Pattern P Data Graph G
  • 13. © 2019 TigerGraph. All Rights Reserved Query Pattern P Data Graph G First Match
  • 14. © 2019 TigerGraph. All Rights Reserved Query Pattern P Data Graph G First Match Second Match
  • 15. © 2019 TigerGraph. All Rights Reserved Query Pattern P Data Graph G First Match Second Match Third Match
  • 16. © 2019 TigerGraph. All Rights Reserved GSQL Pattern Matching Overview 16 ● Simple 1-Hop Pattern ● Repeating a 1-Hop Pattern ● Multi-Hop Linear Pattern
  • 17. © 2019 TigerGraph. All Rights Reserved Simple 1-Hop Pattern 17 Classic GSQL Syntax: FROM X:x -((E1 | E2 | E3):e1)-> Y:y ● Semantics: Traverse from Left to Right GSQL Pattern Matching Syntax: FROM X:x -((E1> | <E2 | E3):e1)- Y:y ● Semantics: Pattern is a whole; each edge's direction is a detail about the pattern
  • 18. © 2019 TigerGraph. All Rights Reserved Simple 1-Hop Pattern - Variations 18 1. FROM X:x -(E1:e1)- Y:y ○ E1 is an undirected edge. x, y bind to the end points of E1. e1 is alias to E1. 2. FROM X:x -(E2>:e2)- Y:y ○ Right directed edge, x binds to the source of E2, y binds to the target of E2. e2 is alias of E2. 3. FROM X:x -(<E3:e3)- Y:y ○ Left directed edge, y binds to the source of E3, x binds to the target of E3. e3 is alias of E3. 4. FROM X:x -(_:e)- Y:y ○ Any undirected edge pattern. "_" means any undirected edge type. e is alias of "_". 5. FROM X:x -(_>:e)- Y:y ○ Any right directed edge. "_>" means any right directed edge type. e is alias of "_>".
  • 19. © 2019 TigerGraph. All Rights Reserved Simple 1-Hop Pattern - Variations 19 6. FROM X:x -(<_:e)- Y:y ○ Any left directed edge. "<_" means any left directed edge type. e is alias of "<_". 7. FROM X:x -((<_|_):e)- Y:y ○ Any left directed or any undirected. "|" means OR. e is alias of (<_|_). 8. FROM X:x -((E1|E2>|<E3):e) - Y:y ○ Disjunctive 1-hop edge. (x,y) are connected by E1 or E2 or E3. e is alias of (E1|E2>|<E3). 9. FROM X:x -()- Y:y ○ any edge (directed or undirected) match this 1-hop pattern ○ Same as this: (<_|_>|_)
  • 20. © 2019 TigerGraph. All Rights Reserved Simple 1-Hop Pattern (cont.) 20
  • 21. © 2019 TigerGraph. All Rights Reserved 21
  • 22. © 2019 TigerGraph. All Rights Reserved Repeating a 1-Hop Pattern - Unbounded Variations 22 1. FROM X:x - (E1*) - Y:y ○ X connect to Y via 0 or more repetition of undirected E1. * is called the Kleene star. 2. FROM X:x - (E2>*) - Y:y ○ X connect to Y via 0 or more repetition of rightward E2 3. FROM X:x - (<E3*) - Y:y ○ X connect to Y via 0 or more repetition of leftward E3 4. FROM X:x - (_*) - Y:y ○ X connect to Y via 0 or more undirected edges of any type
  • 23. © 2019 TigerGraph. All Rights Reserved Repeating a 1-Hop Pattern - Unbounded Variations 23 5. FROM X:x - (_>*) - Y:y ○ X connect to Y via 0 or more right-directed edges of any type 6. FROM X:x - (<_*) - Y:y ○ X connect to Y via 0 or more left-directed edges of any type 7. FROM X:x - ((E1|E2>|<E3)*) - Y:y ○ Either E1, E2> or <E3 can be chosen at each repetition.
  • 24. © 2019 TigerGraph. All Rights Reserved Repeating a 1-Hop Pattern - Bounded Variations 24 1. FROM X:x - (E1*2..) - Y:y ○ Lower bounds only. There is a chain of at least 2 E1 edges. 2. FROM X:x - (E2>*..3) - Y:y ○ Upper bounds only. There is a chain of between 0 and 3 E2 edges. 3. FROM X:x - (<E3*3..5) - Y:y ○ Both Lower and Upper bounds. There is a chain of 3 to 5 E3 edges. 4. FROM X:x - ((E1|E2>|<E3)*3) - Y:y ○ Exact bound. There is a chain of exactly 3 edges, where each edge is either E1, E2>, or <E3.
  • 25. © 2019 TigerGraph. All Rights Reserved Repeating a Pattern - Remarks 25 1. Edge aliases cannot be used together with a Kleene star. ○ When an edge is repeated, it would not clear which instance of the edge the alias refers to. 2. Shortest path semantics. ○ When an edge is repeated with the Kleene star, we consider shortest path matches only. ○ Counting and existence check of matched shortest path pattern is tractable.
  • 26. © 2019 TigerGraph. All Rights Reserved 26 Example: Shortest Matching Path In above figure, for the pattern, 1 - (E>*) - 4, the following paths can reach 4 from 1. 1. 1->2->3->4 2. 1->2->3->5->6->2->3->4 (1 loop) 3. Any path 1>2, looping through 2->3->5->6->2 two or more times, and exiting 2>3>4 Only the first one is the shortest, and considered a match for the pattern.
  • 27. © 2019 TigerGraph. All Rights Reserved 27 Specifying How Many Repetitions (cont.)
  • 28. © 2019 TigerGraph. All Rights Reserved 28 Specifying How Many Repetitions (cont.)
  • 29. © 2019 TigerGraph. All Rights Reserved Multiple-Hop Linear Pattern 29 ● 2-hop pattern ○ FROM X:x - (E1:e1) - Y:y - (E2>:e2)-Z:z 1st hop 2nd hop Similarly, a 3-hop pattern concatenates three 1-hop patterns in sequence, every two connecting patterns share one endpoint. Below Y:y and Z:z are the connecting endpoints. ● 3-hop pattern ○ FROM X:x - (E2>:e2) - Y:y - (<E3:e3)- Z:z - (E4:e4) - U:u 1st hop 2nd hop 3rd hop
  • 30. © 2019 TigerGraph. All Rights Reserved Multiple-Hop Linear Pattern 30 ● SELECT Clause ○ select pattern’s endpoints only ○ FROM X:x-(E2>:e2)-Y:y-(<E3:e3)-Z:z-(E4:e4)-U:u; ● FROM Clause ○ FROM pattern can be shortened ■ FROM X:x-(E2>:e2)-Y:y-(<E3:e3)-Z:z-(E4:e4)-U:u ⇒ ■ FROM X:x-(E2>.<E3.E4)-U:u; //note: no alias is allowed for E.E style ● WHERE Clause ○ Conjunction of local hop predicate only ○ Last hop local predicate can refer to the starting end point ○ Kleene star breaks local hop predicate ● ACCUM and POST-ACCUM Clause ○ ACCUM clause executed for each matched instance ○ ACCUM to endpoints only
  • 31. © 2019 TigerGraph. All Rights Reserved How To Use In Upcoming Release 2.4 31 ● Session Parameter ○ set syntax_version="v2" //for pattern match ○ set syntax_version="v1" //default, classic syntax ● Invoke Interpret GSQL Engine ○ INTERPRET QUERY QueryName (p1, p2, ..) //run existing query ○ INTERPRET QUERY () FOR GRAPH graphName { } //adhoc query ● Query Level Syntax Setting ○ CREATE QUERY (p1, p2.,.) Name FOR GRAPH test SYNTAX("v2") { } ○ INTERPRET QUERY () FOR GRAPH test SYNTAX("v1") { }
  • 32. © 2019 TigerGraph. All Rights Reserved Demo Setup 32
  • 33. © 2019 TigerGraph. All Rights Reserved Demo Setup 33 E1 1,003,605 E2 2,052,169 E3 1,003,605 E4 229,166 E5 1,611,869 E6 90,492 E7 2,698,393 E8 713,258 E9 309,766 E10 16,080 E11 1,575 E12 6,380 E13 2,052,169 E14 1,003,605 E15 9,892 E16 1,343 E17 111 E18 70 Total : 3.18M vertices 17.25M edges 11 vertex types 25 edge types Vertex Stats Edge Stats Total comment post compan y university city country continent forum person tag tagclass # attributes 6 8 3 3 3 3 3 3 10 3 3 # vertices 3.18 M 2,052,169 1,003,605 1,575 6,380 1,343 111 6 90,492 9,892 16,080 71 E19 180,623 E20 1,438,418 E21 751,677 E22 1,040,749 E23 1,011,420 E24 7,949 E25 21,654
  • 34. © 2019 TigerGraph. All Rights Reserved Demo Setup 34
  • 35. © 2019 TigerGraph. All Rights Reserved Demo On Docker 35
  • 36. © 2019 TigerGraph. All Rights Reserved Summary 36 Version 2.4 Available End Jun ● Pattern Matching enables ● Demo: Pattern Match Using LDBC Social Network Benchmark Data ○ Interpreted Mode on laptop Docker -- run queries instantly as soon as you write them ● Demo: Pattern Matching in a Recommender Application ○ Interpreted Mode again
  • 37. Q&A Please send your questions via the Q&A menu in Zoom 37
  • 38. © 2019 TigerGraph. All Rights Reserved Developer Edition Available We now offer Docker versions and VirtualBox versions of the TigerGraph Developer Edition, so you can now run on ● MacOS ● Windows 10 ● Linux Developer Edition Download https://www.tigergraph.com/developer/ 38
  • 39. © 2019 TigerGraph. All Rights Reserved NEW! Graph Gurus Developer Office Hours 39 Catch up on previous episodes of Graph Gurus: https://www.tigergraph.com/webinars-and-events/ Every Thursday at 11:00 am Pacific Talk directly with our engineers every week. During office hours, you get answers to any questions pertaining to graph modeling and GSQL programming. https://info.tigergraph.com/officehours
  • 40. © 2019 TigerGraph. All Rights Reserved Additional Resources 40 New Developer Portal https://www.tigergraph.com/developers/ Download the Developer Edition or Enterprise Free Trial https://www.tigergraph.com/download/ Guru Scripts https://github.com/tigergraph/ecosys/tree/master/guru_scripts Join our Developer Forum https://groups.google.com/a/opengsql.org/forum/#!forum/gsql-users @TigerGraphDB youtube.com/tigergraph facebook.com/TigerGraphDB linkedin.com/company/TigerGraph