[ASTERIXDB-2979][MTD][GRAPH] Implement CREATE / DROP GRAPH
Initial commit. This supports CREATE GRAPH, DROP GRAPH, and prevents
dropping views / functions / datasets / synonyms / dataverses that a
graph depends on.
Change-Id: Ibaf4dc7066b85d8ea3b58c6b90fd83af3a700506
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb-graph/+/14644
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@uci.edu>
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
new file mode 100644
index 0000000..0f4761d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE Yelp IF EXISTS;
+DROP DATAVERSE Yelp_A IF EXISTS;
+DROP DATAVERSE Yelp_B IF EXISTS;
+CREATE DATAVERSE Yelp;
+CREATE DATAVERSE Yelp_A;
+CREATE DATAVERSE Yelp_B;
+
+USE Yelp_A;
+CREATE TYPE GenericType
+AS { _id: uuid };
+CREATE DATASET Businesses (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Checkins (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Friends (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Reviews (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Tips (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Users (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE FUNCTION RelevantBusinesses()
+ { FROM Businesses B
+ WHERE B.stars > 3.5
+ SELECT B.* };
+
+USE Yelp_B;
+CREATE TYPE GenericType
+AS { _id: uuid };
+CREATE DATASET Businesses (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Checkins (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Friends (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Reviews (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Tips (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE DATASET Users (GenericType)
+PRIMARY KEY _id AUTOGENERATED;
+CREATE SYNONYM Yelpers FOR Users;
+
+USE Yelp;
+CREATE GRAPH YelpGraph_1 AS
+VERTEX (:User)
+ PRIMARY KEY (user_id)
+ AS Yelp_B.Yelpers,
+VERTEX (:Review)
+ PRIMARY KEY (review_id)
+ AS ( FROM Yelp_A.Reviews R
+ SELECT VALUE R ),
+VERTEX (:Business)
+ PRIMARY KEY (business_id)
+ AS ( FROM Yelp_A.RelevantBusinesses() B
+ SELECT VALUE B ),
+EDGE (:User)-[:FRIENDS_WITH]->(:User)
+ PRIMARY KEY (user_id, friend)
+ SOURCE KEY (user_id)
+ DESTINATION KEY (friend)
+ AS ( FROM Yelp_B.Users U
+ UNNEST U.friends F
+ SELECT U.user_id, F AS friend ),
+EDGE (:User)-[:FRIENDS_WITH]->(:User)
+ PRIMARY KEY (user_id, friend)
+ SOURCE KEY (user_id)
+ DESTINATION KEY (friend)
+ AS Yelp_B.Friends,
+EDGE (:Review)-[:MADE_BY]->(:User)
+ DESTINATION KEY (user_id),
+EDGE (:Review)-[:ABOUT]->(:Business)
+ DESTINATION KEY (business_id);
+
+CREATE GRAPH YelpGraph_2 IF NOT EXISTS AS
+VERTEX (:Review)
+ PRIMARY KEY (review_id)
+ AS ( FROM Yelp_A.Reviews R
+ SELECT VALUE R ),
+VERTEX (:Business)
+ PRIMARY KEY (business_id)
+ AS ( FROM Yelp_A.RelevantBusinesses() B
+ SELECT VALUE B ),
+EDGE (:Review)-[:ABOUT]->(:Business)
+ DESTINATION KEY (business_id);
+CREATE GRAPH YelpGraph_2 IF NOT EXISTS AS
+VERTEX (:Review)
+ PRIMARY KEY (review_id)
+ AS ( FROM Yelp_A.Reviews R
+ SELECT VALUE R ),
+VERTEX (:Business)
+ PRIMARY KEY (business_id)
+ AS ( FROM Yelp_A.RelevantBusinesses() B
+ SELECT VALUE B ),
+EDGE (:Review)-[:ABOUT]->(:Business)
+ DESTINATION KEY (business_id);
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
new file mode 100644
index 0000000..b8151af
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+FROM `Metadata`.`Graph` G
+SELECT G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
+ORDER BY G.DataverseName, G.GraphName;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp
new file mode 100644
index 0000000..ca52d3d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP GRAPH Yelp.YelpGraph_1 IF EXISTS;
+DROP GRAPH Yelp.YelpGraph_1 IF EXISTS;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
new file mode 100644
index 0000000..b8151af
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+FROM `Metadata`.`Graph` G
+SELECT G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
+ORDER BY G.DataverseName, G.GraphName;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
new file mode 100644
index 0000000..586a718
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+CREATE OR REPLACE GRAPH Yelp.YelpGraph_2 AS
+VERTEX (:User)
+ PRIMARY KEY (user_id)
+ AS Yelp_B.Yelpers,
+VERTEX (:Review)
+ PRIMARY KEY (review_id)
+ AS ( FROM Yelp_A.Reviews R
+ SELECT VALUE R ),
+VERTEX (:Business)
+ PRIMARY KEY (business_id)
+ AS ( FROM Yelp_A.RelevantBusinesses() B
+ SELECT VALUE B ),
+EDGE (:User)-[:FRIENDS_WITH]->(:User)
+ PRIMARY KEY (user_id, friend)
+ SOURCE KEY (user_id)
+ DESTINATION KEY (friend)
+ AS ( FROM Yelp_B.Users U
+ UNNEST U.friends F
+ SELECT U.user_id, F AS friend ),
+EDGE (:User)-[:FRIENDS_WITH]->(:User)
+ PRIMARY KEY (user_id, friend)
+ SOURCE KEY (user_id)
+ DESTINATION KEY (friend)
+ AS Yelp_B.Friends,
+EDGE (:Review)-[:MADE_BY]->(:User)
+ DESTINATION KEY (user_id),
+EDGE (:Review)-[:ABOUT]->(:Business)
+ DESTINATION KEY (business_id);
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
new file mode 100644
index 0000000..b8151af
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+FROM `Metadata`.`Graph` G
+SELECT G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
+ORDER BY G.DataverseName, G.GraphName;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp
new file mode 100644
index 0000000..d846648
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE Yelp;
+DROP DATAVERSE Yelp_A;
+DROP DATAVERSE Yelp_B;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
new file mode 100644
index 0000000..9667fd6
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+FROM `Metadata`.`Graph` G
+WHERE G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
+SELECT VALUE { "count": COUNT(*) };
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
new file mode 100644
index 0000000..31c330c
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
@@ -0,0 +1,2 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM Yelp_A.Reviews R\n SELECT VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM Yelp_A.RelevantBusinesses() B\n SELECT VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM Yelp_B.Users U\n UNNEST U.friends F\n SELECT U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [ ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM Yelp_A.Reviews R\n SELECT VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM Yelp_A.RelevantBusinesses() B\n SELECT VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
new file mode 100644
index 0000000..a749b72
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
@@ -0,0 +1 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [ ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM Yelp_A.Reviews R\n SELECT VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM Yelp_A.RelevantBusinesses() B\n SELECT VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
new file mode 100644
index 0000000..80af6cb
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
@@ -0,0 +1 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM Yelp_A.Reviews R\n SELECT VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM Yelp_A.RelevantBusinesses() B\n SELECT VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM Yelp_B.Users U\n UNNEST U.friends F\n SELECT U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
new file mode 100644
index 0000000..c1a0ea2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
@@ -0,0 +1 @@
+{ "count": 0 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/testsuite.xml b/asterix-graphix/src/test/resources/metadata/testsuite.xml
new file mode 100644
index 0000000..2f45b91
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadata/testsuite.xml
@@ -0,0 +1,28 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<test-suite xmlns="urn:xml.testframework.asterix.apache.org"
+ ResultOffsetPath="results"
+ QueryOffsetPath="queries"
+ QueryFileExtension=".sqlpp">
+ <test-group name="yelp-example">
+ <test-case FilePath="graphix">
+ <compilation-unit name="yelp-example">
+ <output-dir compare="Text">yelp-example</output-dir>
+ </compilation-unit>
+ </test-case>
+ </test-group>
+</test-suite>