1. Drop all schema definitions and data.
\n"},"11":4,"12":false},"16":true,"17":true,"18":{},"25":"LOCAL.ONE"},{"1":"63da20c0-b56b-4aaf-8b01-f198d61b5db2","10":4,"11":"schema.drop()","12":"gremlin","13":{"1":"50f76ccf-fa88-4259-a70c-6eb03818c4e5","10":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"OK"}],"3":1},"11":12,"12":false,"14":1717},"16":true,"17":false,"25":"LOCAL.ONE"},{"1":"c66370ec-9253-4679-a2ba-13e7d855adab","10":4,"11":"**2**. Define the graph schema. Use the *DataStax Studio* schema view to explore the schema visually.","12":"markdown","13":{"1":"e3812d33-2940-4f78-a97c-1ecf38ddf664","10":{"9":"2. Define the graph schema. Use the DataStax Studio schema view to explore the schema visually.
\n"},"11":4,"12":false},"16":true,"17":true,"18":{},"25":"LOCAL.ONE"},{"1":"b569644b-c31d-4981-987d-17d05f6644d9","10":4,"11":"// Define vertex labels\nschema.vertexLabel(\"user\").ifNotExists().\n partitionBy(\"id\",UUID).\n property(\"name\",Text).\n property(\"email\",Text).\n create()\nschema.vertexLabel(\"account\").ifNotExists().\n partitionBy(\"id\",UUID).\n property(\"type\",Text).\n property(\"balance\",Decimal).\n create()\n\n// Define edge labels\nschema.edgeLabel(\"has\").ifNotExists().\n from(\"user\").to(\"account\").\n create()\n\n// Define vertex indexes\nschema.vertexLabel('user').materializedView('user_by_name').ifNotExists().partitionBy('name').clusterBy('id', Asc).create()\nschema.vertexLabel('user').materializedView('user_by_email').ifNotExists().partitionBy('email').clusterBy('id', Asc).create()\n\n// Define edge indexes\nschema.edgeLabel('has').from('user').to('account').materializedView('account_has_user').ifNotExists().inverse().create()","12":"gremlin","13":{"1":"cb476ad5-7d9e-4ada-92d5-3bbb6a590ef3","10":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"OK"}],"3":1},"11":12,"12":false,"14":505},"15":9,"16":true,"17":false,"25":"LOCAL.ONE"},{"1":"807056dc-ec7c-44dd-8154-c2c357e645f8","10":4,"11":"**3**. Add 5 vertices and 3 edges.","12":"markdown","13":{"1":"77c73fe1-c679-41b8-ade2-32456bd6290c","10":{"9":"3. Add 5 vertices and 3 edges.
\n"},"11":4,"12":false},"16":true,"17":true,"18":{},"25":"LOCAL.ONE"},{"1":"22bcda8d-5191-47d9-b6b8-3533e58d1949","10":4,"11":"g.addV(\"user\")\n .property(\"id\",UUID.fromString(\"1cafb6a4-396c-4da1-8180-83531b6a41e3\"))\n .property(\"name\",\"Alice\")\n .property(\"email\",\"alice@example.org\")\n .as(\"alice\")\n \n .addV(\"user\")\n .property(\"id\",UUID.fromString(\"0d2b2319-9c0b-4ecb-8953-98687f6a99ce\"))\n .property(\"name\",\"Bob\")\n .property(\"email\",\"bob@example.org\")\n .as(\"bob\")\n \n .addV(\"account\")\n .property(\"id\",UUID.fromString(\"83428a85-5c8f-4398-8019-918d6e1d3a93\"))\n .property(\"type\",\"Checking\")\n .property(\"balance\",2500.00)\n .as(\"alice_account_1\")\n \n .addV(\"account\")\n .property(\"id\",UUID.fromString(\"811b56c3-cead-40d9-9a3d-e230dcd64f2f\"))\n .property(\"type\",\"Savings\")\n .property(\"balance\",1500.00)\n .as(\"alice_account_2\")\n \n .addV(\"account\")\n .property(\"id\",UUID.fromString(\"81def5e2-84f4-4885-a920-1c14d2be3c20\"))\n .property(\"type\",\"Checking\")\n .property(\"balance\",1000.00)\n .as(\"bob_account_1\")\n \n .addE(\"has\")\n .from(\"alice\")\n .to(\"alice_account_1\")\n \n .addE(\"has\")\n .from(\"alice\")\n .to(\"alice_account_2\")\n \n .addE(\"has\")\n .from(\"bob\")\n .to(\"bob_account_1\")\n \n .iterate()","12":"gremlin","13":{"1":"2f4051d5-aa30-4802-89be-be8e869edd85","10":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","3":0},"11":1,"12":false,"14":19},"16":true,"17":false,"25":"LOCAL.ONE"},{"1":"ac96d8d4-8685-4fec-a661-a5757103a0f5","10":4,"11":"**4**. Execute traversals ...","12":"markdown","13":{"1":"12d74fe6-e005-456f-bd63-5bb8379546fa","10":{"9":"4. Execute traversals …
\n"},"11":4,"12":false},"16":true,"17":true,"18":{},"25":"LOCAL.ONE"},{"1":"9a34ba5c-4755-4195-9cb2-4db74748b910","10":4,"11":"g.with(\"label-warning\",false).V()\n//g.with(\"label-warning\",false).E()\n//g.V().has(\"user\",\"id\",UUID.fromString(\"1cafb6a4-396c-4da1-8180-83531b6a41e3\"))\n//g.V(\"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3\")\n//g.V().has(\"user\",\"name\",\"Alice\")\n//g.V().has(\"user\",\"name\",\"Alice\").out(\"has\")\n//g.V().has(\"user\",\"name\",\"Alice\").out(\"has\").values(\"balance\")\n//g.V().has(\"user\",\"name\",\"Alice\").out(\"has\").values(\"balance\").sum()\n//g.V().has(\"user\",\"name\",\"Alice\").out(\"has\").where(values(\"balance\").is(gt(2000)))\n//V().has(\"user\",\"name\",\"Alice\").out(\"has\").groupCount().by(\"type\")","12":"gremlin","13":{"1":"a21176b4-5d1c-45c9-9ac7-e32a28ab43f1","10":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"127":"com.datastax.studio.notebook.serialization.model.V1NotebookModel$Graph$Vertex","1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20","10":"account"},{"127":"com.datastax.studio.notebook.serialization.model.V1NotebookModel$Graph$Vertex","1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f","10":"account"},{"127":"com.datastax.studio.notebook.serialization.model.V1NotebookModel$Graph$Vertex","1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93","10":"account"},{"127":"com.datastax.studio.notebook.serialization.model.V1NotebookModel$Graph$Vertex","1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce","10":"user"},{"127":"com.datastax.studio.notebook.serialization.model.V1NotebookModel$Graph$Vertex","1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","10":"user"}],"3":5},"11":13,"12":false,"13":{"100":{"1":[{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20","2":{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20","10":"account","100":[{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"1000.00"}],"3":1}},{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"81def5e2-84f4-4885-a920-1c14d2be3c20\""}],"3":1}},{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Checking"}],"3":1}}]}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce","2":{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce","10":"user","100":[{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#name","10":"name","100":"name","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Bob"}],"3":1}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"0d2b2319-9c0b-4ecb-8953-98687f6a99ce\""}],"3":1}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#email","10":"email","100":"email","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"bob@example.org"}],"3":1}}]}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","2":{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","10":"user","100":[{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#name","10":"name","100":"name","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Alice"}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"1cafb6a4-396c-4da1-8180-83531b6a41e3\""}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#email","10":"email","100":"email","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"alice@example.org"}],"3":1}}]}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f","2":{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f","10":"account","100":[{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"1500.00"}],"3":1}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"811b56c3-cead-40d9-9a3d-e230dcd64f2f\""}],"3":1}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Savings"}],"3":1}}]}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93","2":{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93","10":"account","100":[{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"2500.00"}],"3":1}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"83428a85-5c8f-4398-8019-918d6e1d3a93\""}],"3":1}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Checking"}],"3":1}}]}}]},"101":{"1":[{"1":"dseg:/user-has-account/1cafb6a4-396c-4da1-8180-83531b6a41e3/83428a85-5c8f-4398-8019-918d6e1d3a93","2":{"1":"dseg:/user-has-account/1cafb6a4-396c-4da1-8180-83531b6a41e3/83428a85-5c8f-4398-8019-918d6e1d3a93","10":"has","101":{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93","10":"account","100":[{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"2500.00"}],"3":1}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"83428a85-5c8f-4398-8019-918d6e1d3a93\""}],"3":1}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Checking"}],"3":1}}]},"102":{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","10":"user","100":[{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#name","10":"name","100":"name","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Alice"}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"1cafb6a4-396c-4da1-8180-83531b6a41e3\""}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#email","10":"email","100":"email","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"alice@example.org"}],"3":1}}]},"103":{}}},{"1":"dseg:/user-has-account/0d2b2319-9c0b-4ecb-8953-98687f6a99ce/81def5e2-84f4-4885-a920-1c14d2be3c20","2":{"1":"dseg:/user-has-account/0d2b2319-9c0b-4ecb-8953-98687f6a99ce/81def5e2-84f4-4885-a920-1c14d2be3c20","10":"has","101":{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20","10":"account","100":[{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"1000.00"}],"3":1}},{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"81def5e2-84f4-4885-a920-1c14d2be3c20\""}],"3":1}},{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Checking"}],"3":1}}]},"102":{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce","10":"user","100":[{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#name","10":"name","100":"name","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Bob"}],"3":1}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"0d2b2319-9c0b-4ecb-8953-98687f6a99ce\""}],"3":1}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce#email","10":"email","100":"email","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"bob@example.org"}],"3":1}}]},"103":{}}},{"1":"dseg:/user-has-account/1cafb6a4-396c-4da1-8180-83531b6a41e3/811b56c3-cead-40d9-9a3d-e230dcd64f2f","2":{"1":"dseg:/user-has-account/1cafb6a4-396c-4da1-8180-83531b6a41e3/811b56c3-cead-40d9-9a3d-e230dcd64f2f","10":"has","101":{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f","10":"account","100":[{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#balance","10":"balance","100":"balance","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"12":"1500.00"}],"3":1}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"811b56c3-cead-40d9-9a3d-e230dcd64f2f\""}],"3":1}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f#type","10":"type","100":"type","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Savings"}],"3":1}}]},"102":{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","10":"user","100":[{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#name","10":"name","100":"name","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"Alice"}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#id","10":"id","100":"id","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"\"1cafb6a4-396c-4da1-8180-83531b6a41e3\""}],"3":1}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3#email","10":"email","100":"email","101":{"127":"com.datastax.studio.notebook.serialization.model.ListWithNulls","1":[{"9":"alice@example.org"}],"3":1}}]},"103":{}}}]}},"14":10},"15":7,"16":true,"17":false,"18":{},"19":{"11":{"1":[{"1":"user","2":"{{{name}}}"}]},"12":{"1":[{"1":"dseg:/account/81def5e2-84f4-4885-a920-1c14d2be3c20","2":{"10":-16,"11":-130}},{"1":"dseg:/user/0d2b2319-9c0b-4ecb-8953-98687f6a99ce","2":{"10":-155,"11":-11}},{"1":"dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3","2":{"10":50,"11":-22}},{"1":"dseg:/account/811b56c3-cead-40d9-9a3d-e230dcd64f2f","2":{"10":114,"11":110}},{"1":"dseg:/account/83428a85-5c8f-4398-8019-918d6e1d3a93","2":{"10":-85,"11":35}}]},"13":"a21176b4-5d1c-45c9-9ac7-e32a28ab43f1","14":{"10":22,"11":-2},"16":{"11":{"10":"studio::none"}}},"22":423,"25":"LOCAL.ONE"}],"16":{"1":{}},"17":"users_and_accounts","19":false} code.txt 0100644 0000000 0000000 00000006227 14240542155 011271 0 ustar 00 0000000 0000000 --------------------NOTEBOOK_Introduction to NoSQL-------------------- 2 | --------------------CELL_MARKDOWN_1-------------------- 3 | **1**. Drop all schema definitions and data. 4 | --------------------CELL_GREMLIN_2-------------------- 5 | schema.drop() 6 | --------------------CELL_MARKDOWN_3-------------------- 7 | **2**. Define the graph schema. Use the *DataStax Studio* schema view to explore the schema visually. 8 | --------------------CELL_GREMLIN_4-------------------- 9 | // Define vertex labels 10 | schema.vertexLabel("user").ifNotExists(). 11 | partitionBy("id",UUID). 12 | property("name",Text). 13 | property("email",Text). 14 | create() 15 | schema.vertexLabel("account").ifNotExists(). 16 | partitionBy("id",UUID). 17 | property("type",Text). 18 | property("balance",Decimal). 19 | create() 20 | 21 | // Define edge labels 22 | schema.edgeLabel("has").ifNotExists(). 23 | from("user").to("account"). 24 | create() 25 | 26 | // Define vertex indexes 27 | schema.vertexLabel('user').materializedView('user_by_name').ifNotExists().partitionBy('name').clusterBy('id', Asc).create() 28 | schema.vertexLabel('user').materializedView('user_by_email').ifNotExists().partitionBy('email').clusterBy('id', Asc).create() 29 | 30 | // Define edge indexes 31 | schema.edgeLabel('has').from('user').to('account').materializedView('account_has_user').ifNotExists().inverse().create() 32 | --------------------CELL_MARKDOWN_5-------------------- 33 | **3**. Add 5 vertices and 3 edges. 34 | --------------------CELL_GREMLIN_6-------------------- 35 | g.addV("user") 36 | .property("id",UUID.fromString("1cafb6a4-396c-4da1-8180-83531b6a41e3")) 37 | .property("name","Alice") 38 | .property("email","alice@example.org") 39 | .as("alice") 40 | 41 | .addV("user") 42 | .property("id",UUID.fromString("0d2b2319-9c0b-4ecb-8953-98687f6a99ce")) 43 | .property("name","Bob") 44 | .property("email","bob@example.org") 45 | .as("bob") 46 | 47 | .addV("account") 48 | .property("id",UUID.fromString("83428a85-5c8f-4398-8019-918d6e1d3a93")) 49 | .property("type","Checking") 50 | .property("balance",2500.00) 51 | .as("alice_account_1") 52 | 53 | .addV("account") 54 | .property("id",UUID.fromString("811b56c3-cead-40d9-9a3d-e230dcd64f2f")) 55 | .property("type","Savings") 56 | .property("balance",1500.00) 57 | .as("alice_account_2") 58 | 59 | .addV("account") 60 | .property("id",UUID.fromString("81def5e2-84f4-4885-a920-1c14d2be3c20")) 61 | .property("type","Checking") 62 | .property("balance",1000.00) 63 | .as("bob_account_1") 64 | 65 | .addE("has") 66 | .from("alice") 67 | .to("alice_account_1") 68 | 69 | .addE("has") 70 | .from("alice") 71 | .to("alice_account_2") 72 | 73 | .addE("has") 74 | .from("bob") 75 | .to("bob_account_1") 76 | 77 | .iterate() 78 | --------------------CELL_MARKDOWN_7-------------------- 79 | **4**. Execute traversals ... 80 | --------------------CELL_GREMLIN_8-------------------- 81 | g.with("label-warning",false).V() 82 | //g.with("label-warning",false).E() 83 | //g.V().has("user","id",UUID.fromString("1cafb6a4-396c-4da1-8180-83531b6a41e3")) 84 | //g.V("dseg:/user/1cafb6a4-396c-4da1-8180-83531b6a41e3") 85 | //g.V().has("user","name","Alice") 86 | //g.V().has("user","name","Alice").out("has") 87 | //g.V().has("user","name","Alice").out("has").values("balance") 88 | //g.V().has("user","name","Alice").out("has").values("balance").sum() 89 | //g.V().has("user","name","Alice").out("has").where(values("balance").is(gt(2000))) 90 | //V().has("user","name","Alice").out("has").groupCount().by("type") 91 | versions-info.txt 0100644 0000000 0000000 00000000036 14240542155 013150 0 ustar 00 0000000 0000000 Studio Version: 6.8.0-b02f3ef 92 | -------------------------------------------------------------------------------- /graph_databases.md: -------------------------------------------------------------------------------- 1 | ## 🎓🔥 Graph Database practice 2 | 3 | This is an optional part that is normally left as an exercise for the reader, 4 | to offer a hands-on learning experience on Graph Databases using DataStax Graph 5 | and DataStax Studio. 6 | 7 | > Note: as opposed to the rest of today's pratice, this needs to be done on your own machine. 8 | 9 | **✅ 5a. Prerequisites** 10 | 11 | **Minimal Configuration**: You need to have a computer with this minimal configuration requirements 12 | - At least 2CPU 13 | - At least 6GB or RAM 14 | 15 | **Install Docker and Docker Compose** 16 | 17 | You need to install Docker and Docker-compose on your machine 18 | - [Install **Docker** for Windows/Mac/Linux](https://github.com/DataStax-Academy/kubernetes-workshop-online/blob/master/0-setup-your-cluster/README.MD#1-install-docker) 19 | - [Install **Docker-Compose** for Windows/Mac/Linux](https://github.com/DataStax-Academy/kubernetes-workshop-online/blob/master/0-setup-your-cluster/README.MD#2-install-docker-compose) 20 | 21 | **✅ 5b. Create a docker network named 'graph'** 22 | 23 | ```bash 24 | docker network create graph 25 | ``` 26 | 27 | 🖥️ *Expected output* 28 | ```bash 29 | $workshop_introduction_to_nosql> docker network create graph 30 | 31 | 64f8bcc2dda416d6dc80ef3c1ac97902b9d90007842808308e9d741d179d9344 32 | ``` 33 | 34 | **✅ 5c.Clone this repository (or download ZIP from the github UI)** 35 | 36 | ```bash 37 | git clone https://github.com/datastaxdevs/workshop-introduction-to-nosql.git 38 | 39 | cd workshop-introduction-to-nosql 40 | ``` 41 | 42 | **✅ 5d.Start the containers** 43 | 44 | :warning: *Linux users:* 45 | >Folder `datastax-studio-config` is mapped to docker container (see: `docker-compose.yaml` file) and dse studio runs as user `studio` with `uid=997` and >`gui=997` which needs RW access to that folder. 46 | > 47 | >Run this command if you are on a linux system: 48 | >```bash 49 | >sudo chown -R 997:997 ./datastax-studio-config 50 | >``` 51 | :warning: *Linux users:* 52 | 53 | :📝 Note for *Windows users:* 54 | >Start the *studio image* `without a volume`. Remove these 2 lines above `networks` in *studio* (see: `docker-compose.yaml` file) 55 | >```yaml 56 | >volumes: 57 | > - "./datastax-studio-config:/var/lib/datastax-studio" 58 | 59 | :📝 Note for *Windows users:* 60 | 61 | Start containers: 62 | ```bash 63 | docker-compose up -d 64 | ``` 65 | 66 | 🖥️ *Expected output* 67 | ```bash 68 | $workshop_introduction_to_nosql> docker-compose up -d 69 | 70 | Creating dse ... done 71 | Creating workshop-introduction-to-nosql_studio_1 ... done 72 | ``` 73 | Wait for the application to start (30s) and open [http://localhost:9091](http://localhost:9091) 74 | 75 | 76 |  77 | 78 | **✅ 5e.Check database connection** 79 | 80 | Open the ellipsis and click `Connections` 81 | 82 |  83 | 84 | Select the `default localhost` connection 85 | 86 |  87 | 88 | Check that `dse` is set for the host (pointing to a local cassandra) 89 | 90 |  91 | 92 | Click the button `Test` and expect the output `Connected Successfully` 93 | 94 |  95 | 96 | **✅ 5f. Open the notebook Work** 97 | 98 | Use the ellipsis to now select `Notebooks` 99 | 100 |  101 | 102 | Once the notebook opens it asks you to create the graph: click the `Create Graph` button (and leave all settings to default) 103 | 104 |  105 | 106 | Execute cell after cell spotting the `Real Time >` button in each cell (top right) 107 | 108 |  109 | 110 | Voila ! 111 | 112 |  113 | 114 | **✅ 5g. Close Notebook** 115 | 116 | To close open notebooks you can now use 117 | 118 | ```bash 119 | docker-compose down 120 | ``` 121 | 122 | 🖥️ *Expected output* 123 | ```bash 124 | $workshop_introduction_to_nosql> docker-compose down 125 | Stopping workshop-introduction-to-nosql_studio_1 ... done 126 | Stopping dse ... 127 | ``` 128 | 129 | Congratulations, you completed the Graph Database practice! 130 | 131 | Back to [main README](README.md#practice). -------------------------------------------------------------------------------- /images/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/01.png -------------------------------------------------------------------------------- /images/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/02.png -------------------------------------------------------------------------------- /images/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/03.png -------------------------------------------------------------------------------- /images/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/05.png -------------------------------------------------------------------------------- /images/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/connect.png -------------------------------------------------------------------------------- /images/cqlconsole1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/cqlconsole1.png -------------------------------------------------------------------------------- /images/graphql1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/graphql1.png -------------------------------------------------------------------------------- /images/graphql2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/graphql2.png -------------------------------------------------------------------------------- /images/intro-to-nosql-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/intro-to-nosql-badge.png -------------------------------------------------------------------------------- /images/intro-to-nosql-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/intro-to-nosql-cover.png -------------------------------------------------------------------------------- /images/playground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/playground.png -------------------------------------------------------------------------------- /images/playground1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/playground1.png -------------------------------------------------------------------------------- /images/studio_create_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_create_graph.png -------------------------------------------------------------------------------- /images/studio_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_home.png -------------------------------------------------------------------------------- /images/studio_notebook_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_notebook_1.png -------------------------------------------------------------------------------- /images/studio_notebook_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_notebook_2.png -------------------------------------------------------------------------------- /images/studio_test_connection1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_test_connection1.png -------------------------------------------------------------------------------- /images/studio_test_connection2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_test_connection2.png -------------------------------------------------------------------------------- /images/studio_test_connection3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_test_connection3.png -------------------------------------------------------------------------------- /images/studio_test_connection4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/studio_test_connection4.png -------------------------------------------------------------------------------- /images/swagger/swagger_3c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger/swagger_3c.png -------------------------------------------------------------------------------- /images/swagger/swagger_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger/swagger_3d.png -------------------------------------------------------------------------------- /images/swagger/swagger_3eB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger/swagger_3eB.png -------------------------------------------------------------------------------- /images/swagger/swagger_3fB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger/swagger_3fB.png -------------------------------------------------------------------------------- /images/swagger/swagger_3g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger/swagger_3g.png -------------------------------------------------------------------------------- /images/swagger_responses_annotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/swagger_responses_annotated.png -------------------------------------------------------------------------------- /images/token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/token.png -------------------------------------------------------------------------------- /images/token_hl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/token_hl.png -------------------------------------------------------------------------------- /images/tutorials/astra-create-db.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/tutorials/astra-create-db.gif -------------------------------------------------------------------------------- /images/tutorials/astra-create-token.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/tutorials/astra-create-token.gif -------------------------------------------------------------------------------- /images/tutorials/astra_signup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/tutorials/astra_signup.gif -------------------------------------------------------------------------------- /images/tutorials/generate_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/images/tutorials/generate_token.png -------------------------------------------------------------------------------- /slides-shelovedata.pptx.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/slides-shelovedata.pptx.pdf -------------------------------------------------------------------------------- /slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastaxdevs/workshop-introduction-to-nosql/9ad93e5d3b71bc294ff34ac3e81e418ab3e1de4d/slides.pdf --------------------------------------------------------------------------------