diff --git a/modules/admin-portal/nav.adoc b/modules/admin-portal/nav.adoc index a816779..dd2a6bb 100644 --- a/modules/admin-portal/nav.adoc +++ b/modules/admin-portal/nav.adoc @@ -5,8 +5,10 @@ *** xref:monitoring/queries.adoc[] *** xref:monitoring/log-viewer.adoc[] ** xref:management/README.adoc[] -*** xref:management/license.adoc[] *** xref:management/user-management.adoc[] +*** xref:management/upgrade.adoc[] +*** xref:management/license.adoc[] +// *** xref:management/healthcheck.adoc[] *** xref:components/README.adoc[] **** xref:components/gpe.adoc[] **** xref:components/gsql.adoc[] diff --git a/modules/admin-portal/pages/management/healthcheck.adoc b/modules/admin-portal/pages/management/healthcheck.adoc new file mode 100644 index 0000000..09a3b78 --- /dev/null +++ b/modules/admin-portal/pages/management/healthcheck.adoc @@ -0,0 +1,43 @@ += Health Check +:experimental: + +The Health Check tool in TigerGraph AdminPortal is designed to help you monitor and maintain the health of your TigerGraph database. By running health checks regularly, you can ensure optimal performance and stability for your database. This tool not only identifies potential issues but also provides recommendations for resolving them. + +[CAUTION] +==== +The Health Check tool is in preview mode and is not yet fully supported. Please use it with caution and report any issues to TigerGraph Support. +==== + +== Running a Health Check + +=== Step 1: Access the Health Check Tool + +1. Navigate to the `Health Check` page from the AdminPortal navigation menu. + +2. Click the `Health-Check` button and select relevant categories to start the health check process. + ++ +[NOTE] +==== +Some categories only apply to specific versions of TigerGraph. If a category is not applicable to your version, it will be disabled. +==== + +3. View Health Check Results: + - Once the health check is complete, the results will be displayed. + - The tool will provide a detailed report of the health status of your TigerGraph database. + +4. Follow Recommendations: + - Review the recommendations provided by the tool for resolving any issues found. + - Implement the suggested actions to maintain or improve the health of your database. + + +== Benefits of Regular Health Checks + +- **Performance Optimization:** + Regular health checks help identify performance bottlenecks and provide insights for optimization. + +- **Stability Assurance:** + By addressing potential issues proactively, you ensure the stability and reliability of your TigerGraph database. + +- **Preventive Maintenance:** + Health checks act as preventive maintenance, helping you avoid unexpected downtimes and data issues. \ No newline at end of file diff --git a/modules/admin-portal/pages/management/upgrade.adoc b/modules/admin-portal/pages/management/upgrade.adoc new file mode 100644 index 0000000..5521690 --- /dev/null +++ b/modules/admin-portal/pages/management/upgrade.adoc @@ -0,0 +1,52 @@ += Upgrade TigerGraph Suite +:experimental: + +AdminPortal provides a convenient way to upgrade your entire TigerGraph Suite, including GraphStudio, Insights, AdminPortal, GSQL Shell, and GraphQL, without the need to re-install TigerGraph. You can choose between a manual upgrade or an online check for upgrade. This guide will walk you through both options. + +[NOTE] +==== +This feature only aviailable for non-TigerGraph Cloud deployments. +==== + +== Manual Upgrade + +The manual upgrade option allows you to perform a manual installation by uploading a downloaded TigerGraph Suite package. + +=== Steps for Manual Upgrade: + +1. **Download the TigerGraph Suite Package:** + - Visit https://dl.tigergraph.com[TigerGraph Download Page], select the `Tools` tab and download the latest TigerGraph Suite package. ++ +[NOTE] +==== +Make sure to download the correct package for your TigerGraph Server version. +==== + +2. **Initiate Manual Upgrade:** + - In the AdminPortal, navigate to the upgrade page. + - Click the btn:[Manual Upgrade] button. + - An input file dialog will appear. Select the downloaded tools package from your local machine. + +3. **Upload and Install:** + - The system will upload the package and start the upgrade process. + - Follow the on-screen instructions to complete the installation. + +== Online Upgrade + +The online check for upgrade option allows you to automatically check if there is a newer TigerGraph Suite version available and upgrade to it. + +[NOTE] +==== +Active internet connection is required for online upgrade. +==== + +=== Steps for Online Upgrade: + +1. **Initiate Online Check:** + - In the AdminPortal, navigate to the upgrade page. + - Click the btn:[Online Check for Upgrade] button. + +2. **Automatic Check and Upgrade:** + - The system will automatically check for the latest TigerGraph Suite version. + - If a newer version is available, the system will download and install the upgrade. + - Follow the on-screen instructions to complete the upgrade process. \ No newline at end of file diff --git a/modules/graphstudio/nav.adoc b/modules/graphstudio/nav.adoc index 7a62792..1640a14 100644 --- a/modules/graphstudio/nav.adoc +++ b/modules/graphstudio/nav.adoc @@ -11,9 +11,6 @@ *** xref:explore-graph/find-paths-between-vertices.adoc[] *** xref:explore-graph/run-gsql-queries.adoc[] *** xref:explore-graph/augment-visualization-result.adoc[] -** Build Graph Patterns (Deprecated) -*** xref:build-graph-patterns/visual-query-builder-overview.adoc[] -*** xref:build-graph-patterns/visual-pattern-examples.adoc[] ** xref:write-queries.adoc[] ** xref:write-open-cypher-queries-in-tigergraph.adoc[] ** xref:actions.adoc[] diff --git a/modules/graphstudio/pages/build-graph-patterns/README.adoc b/modules/graphstudio/pages/build-graph-patterns/README.adoc deleted file mode 100644 index 34b36a5..0000000 --- a/modules/graphstudio/pages/build-graph-patterns/README.adoc +++ /dev/null @@ -1 +0,0 @@ -= Build Graph Patterns diff --git a/modules/graphstudio/pages/build-graph-patterns/visual-pattern-examples.adoc b/modules/graphstudio/pages/build-graph-patterns/visual-pattern-examples.adoc deleted file mode 100644 index 2bb30d4..0000000 --- a/modules/graphstudio/pages/build-graph-patterns/visual-pattern-examples.adoc +++ /dev/null @@ -1,307 +0,0 @@ -= Visual Pattern Examples - -IMPORTANT: In our ongoing efforts to refine and improve our products and tools, -we are focusing on Insights as the tool of choice for building queries visually. -We therefore are deprecating GraphStudio's Build Graph Patterns (Visual Query Builder) as of v3.9.3. -It will be discontinued in a future version of GraphStudio. -Please visit our Insights documentation on xref:insights:widgets:index.adoc[] for graph and results visualization. - -You have learnt all the basic concepts of the Visual Query Builder in the previous article. In this article we will walk you through building several visual patterns step by step, and then show you more graph analytics questions and how to solve them with visual patterns.‌ - -== Example 1. Find all the departments with male employees - -Click image:add_pattern_btn.png[]in the pattern list pattern, input the pattern name, and click image:add-btn.png[]: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvvsnl5eksscgabgze_demo_2_name.png[] - -Clickimage:add_vertex_type.png[]in the toolbar to add a vertex pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvxrsv4oqboqfdo5rn_add-1st-vertex-pattern.png[] - -In the config panel, change the vertex type to be department, and put it in result: - -image::edit-vertex-pattern.png[] - -Confirm the change by clicking image:confirm.png[]: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvxyennhcuze3pjgew_changed-to-department.png[] - -Clickimage:add_vertex_type.png[]in the toolbar to add another vertex pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvyo9rsvkzoxl5ti45_2nd-vertex-pattern.png[] - -Expand the Filter section in the config panel: - -image::open-filter.png[] - -Clickimage:add_button.png[]to add a filter: - -image::add-filter.png[] - -Edit the filter to be *(gender == "male")*: - -image::edit-filter.png[] - -Confirm the change: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvaran9ybyvmp5ddmo_apply-filter.png[] - -Clickimage:add_edge_type.png[]in the toolbar, then click the person vertex pattern in the working panel: - -image::click-person-vp.png[] - -Then click department vertex pattern in the working panel to create an edge pattern between the two vertex patterns: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwcirpqnzwxjjmibcm_click-dep-vp.png[] - -In the config panel, change the edge type to be work_in: - -image::edit-etype.png[] - -Apply the change, and drag the person vertex pattern to a better position: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwcxjavy9gzmh4fyzv_apply-etype-change.png[] - -Click image:save_btn.png[image] in the toolbar to -save the pattern, and -click image:start-loading-button.png[image] in the -toolbar to run the pattern:assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwdbsyr4slvpf3q_x3_run-pattern.png[image] - -You can also try to output the entire matched subgraphs. -Click image:output-btn.png[image] in the toolbar -to enter output toggle mode, then click the person vertex pattern and -the work_in edge pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwe_5_izo_dqy6pq3s_toggle-output.png[image] - -Click image:output-btn.png[image] in the toolbar -again to exit output toggle mode, then -click image:start-loading-button.png[image] to run the -pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwf5sghnsn1ueleppj_pattern-result-1.png[image] - -== Example 2. Find all such people A, B, C: A and B are friends, A and C are friends, and B manages C. - -Create a new visual pattern named FriendsManagerABC. - -Click image:schema (1) (1).png[image] in -the console panel to switch to graph schema: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwkwq25sm1gxtjubld_schema-in-pattern.png[image] - -Click image:pick-btn.png[image] in the toolbar, -then click the friend edge type in the graph schema: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwlwh76dzytgclrkor_pick-edge.png[image] - -An edge pattern is added into the working panel: - - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwo0h98unajvnqwuia_friend-1.png[image] - -Similarly, use image:pick-btn.png[image] to add -another friend edge pattern and a manage edge pattern into the working -panel: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwofvai82aycjxsbyj_edge-3.png[image] - -Adjust the vertex patterns' positions: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwomds8bycwkyyqie8_move-position.png[image] - -Hold Shift key and choose the two vertex patterns on the left, then -click image:merge-btn.png[image] in the toolbar -to merge them together: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwodylbzk0sgn7ttot_merge-1st.png[image] - -Then, merge the top two vertex patterns: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwojoequux6ziyicjf_merge-2nd.png[image] - -Then, merge the right two vertex patterns: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwooxl8ofw6hod2te2_merge-3rd.png[image] - -Now you have a triangle visual pattern representing the three people -relationship! - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwoyw8xb-i3gb6ri-b_after-merge.png[image] - -Now, click image:output-btn.png[image] in the -toolbar and put all the vertex patterns and edge patterns into result: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwfa_jg53mztz9qs87_-lvwp9hypyw9tbbpbkii_add-output.png[image] - -Click image:output-btn.png[image] again to exit -output toggle mode, -click image:save_btn.png[image] to save the -pattern, and -click image:start-loading-button.png[image] to run the -pattern: - -image::run_triangle.png[image] - -[[example-3-find-the-top-2-cities-where-the-most-number-of-companies-of-an-industry-are-located-in]] -== Example 3. Find the top 2 cities where the most number of companies of an industry are located in. - -Create a new visual pattern named IndustryCenterCity. -Click image:schema copy.png[image] in -the console panel to switch to graph schema. - -Use image:pick-btn.png[image] in the toolbar to -pick the company_locate_at edge type and belong_to edge type in graph -schema: - -image::pick-edges.png[image] - -Use Shift key to select the two company vertex patterns, and -click image:merge-btn.png[image] to merge them -into one. Drag the vertex patterns to make their positions look good: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwpsgl7org8uej3dw2_-lvww7qmtmgs2f_oiha2_merge-and-reposition.png[image] - -Click the industry vertex pattern, then -click image:edit.png[image] in the toolbar (or -double click the industry vertex pattern), now you are in edit mode: - -image::vqb-example3-edit-industry_3.3.png[image] - -Change the vertices to be from parameter, and give a parameter name -*ind*. This annotates the industry as an input vertex set when running -the pattern: - -image::change-industry.png[image] - -Confirm the change, and notice there is an id condition on the industry -vertex pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwpsgl7org8uej3dw2_-lvwfkjmr-j8e5ccnisg_apply-change.png[image] - -Click the company vertex pattern, then -click image:edit.png[image] in the toolbar, and -change the Name to *C*: - -image::vqb-example3-edit-company_3.3.png[image] - -Confirm the change, and the label of company vertex pattern becomes -*company as C*: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwpsgl7org8uej3dw2_-lvwgylchchachlxgiiu_confirm-edit-company.png[image] - -Click the city vertex pattern, then -click image:edit.png[image] in the toolbar: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwpsgl7org8uej3dw2_-lvwmigwtcze0gpznc2s_1-edit-city.png[image] - -Expand the Aggregation section in the config panel, and add an -aggregation: - -image::vqb-example3-2-add-attachment_3.3.png[image] - -Confirm the change: - -image::vqb-example3-3-confirm-attachment_3.3.png[image] - -Expand the Order section in the config panel, and add a descending order -of aggregation result *countCompany*: - -image::4-add-order.png[image] - -Confirm the change: - -image::vqb-example3-5-confirm-order_3.3.png[image] - -Expand the Limit section in the config panel, check the use limit -checkbox, and change limit to 2: - -image::6-add-limit.png[image] - -Confirm the change: - -image::vqb-example3-7-confirm-limit_3.3.png[image] - -Click image:output-btn.png[image] , then click -the city vertex pattern, then -click image:output-btn.png[image] again to exit -output toggle mode, -click image:save_btn.png[image] to save the -pattern: - -Click image:start-loading-button.png[image] . Because -the pattern has one input parameter *ind*, the Pattern parameters -section in the pattern list panel expands: - -image::9-run.png[image] - -Click image:add_button.png[image] to add one -industry vertex, and input "big data" for vertex id, then click - image:run-pattern.png[image] : - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwmzsftkfmajvmccm0_-lvwnopp6-_3mp6ndy4b_10-big-data.png[image] - -Change the industry vertex id to be "internet", and run the pattern -again: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwmzsftkfmajvmccm0_-lvwnrxlwx4u7ivox3y1_11-internet.png[image] - -Again, you can choose to output everything in the matched subgraphs: - -image::vqb-example3-12-full_3.3.png[image] - -[[example-4-find-the-people-who-either-were-born-in-redwood-city-or-attended-stanford-university-but-didnt-work-for-hooli]] -== Example 4. Find the people who either were born in Redwood City or attended Stanford university, but didn't work for Hooli. - -Expand Graph patterns section in the pattern list panel, then create a -new visual pattern named SearchPeople. Create the following visual -pattern following similar steps as above: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwnvp3dgnx-vok3v4n_-lvwq7ggctwogkilkkjj_widget-base (1).png[image] - -Click image:widget-btn.png[image] in the toolbar, -and choose *Union*: - -image::1-union.png[image] - -Click the left two person vertex patterns respectively to add the union -widget: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwnvp3dgnx-vok3v4n_-lvwspew3aygvwqpnad8_2-union.png[image] - -Click​image:https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LHvjxIN4__6bA0T-QmU%2F-LvhbTLpvz8Pj5ZBuKlD%2F-Lvly1LBfdXQxZvwuE-u%2Fwidget-btn.png?alt=media&token=c8f287b1-a243-4c7b-b648-a91a6c12b48b[image]in -the toolbar, and choose *Subtract*: - -image::3-subtract.png[image] - -Click the output person vertex pattern of the union widget, then click -the right person vertex pattern, a subtract widget is added into the -visual pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwnvp3dgnx-vok3v4n_-lvwsveopdlwkrij6849_4-subtract.png[image] - -Put the output person vertex pattern of the subtract widget into result: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwnvp3dgnx-vok3v4n_-lvwszgkk0ui6kghylhv_5-output.png[image] - -Save and run the pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwnvp3dgnx-vok3v4n_-lvwt1jugq5zvf-7iqdh_6-result.png[image] - -[[example-5-find-all-the-people-that-were-born-in-a-city-with-population-no-more-than-100000-worked-for-graphlet-and-have-research-skill]] -== Example 5. Find all the people that were born in a city with population no more than 100,000, worked for Graphlet, and have research skill. - -A snowflake-like visual pattern is commonly used in this type of -searching problems: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvwvacebmsfya4_x1e0_-lvwv_2yllbcss4fur5e_people-search-2.png[image] - -[[example-6-giving-a-person-p-among-all-his-direct-friends-and-friends-friends-who-have-programming-skill-what-are-the-top-5-other-skills-that-most-of-these-people-have]] -== Example 6. Giving a person P, among all his direct friends and friends' friends who have programming skill, what are the top 5 other skills that most of these people have? - -First, we get the friends and friends' friends of P. We use the -programming skill to filter these friends, then we find the other skills -that these people have. Then we count the number of people having these -skills, and choose the top 5 skills as the result. - -image::vqb-example6-top-skills_3.3.png[image] \ No newline at end of file diff --git a/modules/graphstudio/pages/build-graph-patterns/visual-query-builder-overview.adoc b/modules/graphstudio/pages/build-graph-patterns/visual-query-builder-overview.adoc deleted file mode 100644 index 0676201..0000000 --- a/modules/graphstudio/pages/build-graph-patterns/visual-query-builder-overview.adoc +++ /dev/null @@ -1,886 +0,0 @@ -= Visual Query Builder - -IMPORTANT: In our ongoing efforts to refine and improve our products and tools, -we are focusing on Insights as the tool of choice for building queries visually. -We therefore are deprecating GraphStudio's Build Graph Patterns (Visual Query Builder) as of v3.9.3. -It will be discontinued in a future version of GraphStudio. -Please visit our Insights documentation on xref:insights:widgets:index.adoc[] for graph and results visualization. - -The Visual Query Builder (VQB), found on the Build Graph Patterns page, provides a visual approach to exploring your graph and using it to solve problems. -Here, you can create visual patterns by dragging and dropping vertices and edges to represent the questions you want to ask instead of writing GSQL queries. - -image::vqb-overview.png[] - -== Basic Concepts - -When you create a visual pattern, you are creating a subgraph representing part of the full graph. -Any parts of the full graph that match your subgraph's structure are shown as results. - -Visual patterns are constructed by vertex patterns, edge patterns, widgets and pattern views. - -This is a basic vertex pattern within a visual pattern: - -image::vertex-pattern-basic.png[] - -This is a vertex pattern with 2 filters, 1 attachment, 2 ordering, and limit: - -image::vertex-pattern-full_3.3.png[] - -This is a vertex pattern that will be output in the pattern execution result. You can see the glow around the border and the highlight at the label: - -image::vertex-pattern-full-output_3.3.png[] - -This is a basic edge pattern: - -image::edge-pattern-basic.png[] - -This is an edge pattern with 1 filter: - -image::edge-pattern-filter.png[] - -This is an edge pattern that will be output in the pattern execution result: - -image::edge-pattern-filter-output.png[] - -This is a union widget: - -image::widget.png[] - -A widget has input vertex patterns and output vertex patterns: - -image::intput-output.png[] - -This is a visual pattern with a pattern view:app-name: - -image::pattern-view-part.png[] - -This is the visual pattern matching all the people who are younger than 30 years old in the year 2019. The filter *((2019 - birthYear) < 30)* on the person vertex pattern provides the matching condition: - -image::demo_1.png[] - -This is the visual pattern matching all the departments having at least one male employee: - -image::demo_2.png[] - -This is the visual pattern that matches the hometown of the most people having the programming skill. The attachment *COUNT(DISTINCT p) as cnt* annotates the number of people born in each city that have the programming skill. Then we order the city vertices *by their descending cnt value*, and choose the top 1 city: - -image::demo_3_3.3.png[] - -This is the visual pattern matching three people A, B and C, where A is B's friend, and A is C's friend, and B is C's manager: - -image::demo_4_3.3.png[] - -This visual pattern matches all the people born in Redwood City and who attended Stanford university, but didn't work for Google: - -image::demo_5.png[] - -Now you have a first sight about how the visual patterns look like. Let's walk through all the concepts in depth. - -== Working Panel - -The working panel is the central component of the Visual Query Builder. Your visual patterns are rendered here. - -Like other pages in GraphStudio, you can zoom in and out and drag the visual pattern to rearrange it. -If the pattern contains errors or unsaved changes, some warning messages will show in the top left corner of working panel: - -image::pattern-working-panel.png[] - -If you click the message indicating errors, the Console will switch to the Problems tab and (for some errors) the relevant vertex patterns, edge patterns and widgets will be marked red to facilitate your debugging: - -image::pattern-highlight-error.png[] - -== Pattern List - -The pattern list panel contains three sections: - -=== Graph patterns - -The graph patterns section lists all the visual patterns you have -created for the current graph. - -image::pattern-list.png[image] - -=== Description - -Other than the visual view of the graph pattern, you can optionally add -a description for the pattern. This can help other users to understand -what problem you are trying to solve. - -image::graph-pattern-description.png[image] - -Remember to save your changes after adding a description. - -=== Pattern parameters - -If you added some parameters in your visual pattern, you need to provide -the values to the parameters when running the pattern. - -image::pattern-params.png[image] - -== Toolbar - -The toolbar options, from left to right, are the following: - -[width="100%",cols="^50%,<50%",options="header",] -|=== -|Toolbar option | Functionality -|image:save_btn.png[] |Save the graph pattern. - -|image:save-as_btn.png[image,25,25] |Save the graph pattern as a different pattern under a new name. - -|image:gsql (1).png[] |Save as GSQL query: show the GSQL query generated from the -pattern and save. See more information at -link:#_save_as_gsql_query[Save as GSQL Query]. - -|image:console-btn.png[] |Console: open/close the console panel. - -|image:config-panel-btn.png[] |Configuration panel: open/close the config panel. By default, the config panel is closed. You can either open the panel by clicking this button, or double-click a vertex pattern or edge pattern -in the visual pattern to open the config panel. - -|image:render-option-btn.png[] |Render pattern options: config how much detail is shown on -the pattern. See more information -link:#_render_pattern_options[here]. - -|image:start-loading-button.png[] |Run: run the visual pattern. If the pattern doesn't have -any parameters, it will run directly, otherwise the *Pattern parameters* section will expand for you to provide the parameter values. - -|image:redo_undo_btn.png[] |Undo and redo: undo and redo the changes on the visual -pattern. The whole editing history of each visual pattern since entering -Build Graph Patterns page is preserved. - -|image:copy.png[] |Copy: Create duplicates of the selected pattern or patterns. -This button is grayed out if no patterns are selected. - -|image:edit.png[] |Edit: edit the selected vertex pattern or edge pattern. -This is same as double-clicking one vertex or edge pattern. - -|image:delete_btn.png[] |Delete: delete selected vertex patterns, edge patterns and -widgets. You can hold the Shift key to select multiple elements to -delete. - -|image:add_vertex_type.png[] |Add a vertex pattern: add a new vertex pattern into the -current visual pattern. - -|image:add_edge_type.png[] |Add an edge pattern: add a new edge pattern into the -current visual pattern. - -|image:pick-btn.png[] |Pick: a shortcut for adding vertex patterns and edge -patterns into the visual pattern. - -|image:merge-btn.png[] |Merge: select multiple vertex patterns, and click this -button to merge them together. This is a fast way to connect multiple -shorter patterns into a longer one. - -|image:add-pattern-view-btn.png[] |Add a pattern view: select one or more vertex or -edge patterns, and click this button to create a pattern view containing all these -vertex and edge patterns. - -|image:widget-btn.png[] |Widget: see more information -link:#_widget[here]. - -|image:filter.png[] |Filter: click this button then click a vertex pattern or -edge pattern, and the config panel will enter editing mode for the -selected vertex or edge pattern, with the Filter section expanded. - -|image:agg-btn.png[] |Attachment: click this button then click a vertex pattern, -and the config panel will enter editing mode for the selected vertex -pattern, with the Attachment section expanded. - -|image:sort-btn.png[] |Order by: click this button then click a vertex pattern, -and the config panel will enter editing mode for the selected vertex -pattern, with the Order section expanded. - -|image:limit-btn.png[] |Limit: click this button then click a vertex pattern, and -the config panel will enter editing mode for the selected vertex -pattern, with the Limit section expanded. - -|image:output-btn.png[] a| -Output: click this button, then click vertex patterns and edge patterns of the visual pattern to toggle whether to output them or not. You can see the output glow of the selected vertices or edges turning on and off. - -|=== - -== Configuration Panel - -You can edit vertex patterns and edge patterns from the Configuration Panel. - -If you want to use vertex ID or edge ID as an attribute, check the "AS ATTRIBUTE" box in the Design Schema section for the corresponding vertex type. -If a vertex or edge type's primary ID is set as an attribute, you can use its ID in features such as filter, attachment and order by like any other attribute. - -=== Vertex patterns -If you enter editing mode of a vertex pattern and expand the Basic Info section, you can edit its name, decide whether or not to put it into result, change -its vertex type, provide optional matching conditions by giving a list -of ids, or provide a parameter name. - -image::edit-vertex-patterns.png[image] - -The name supplied in the panel will be used as the vertex's JSON key when producing output and when the pattern is saved as a GSQL query. - -The dropdown under *Vertex Type* allows you to add or drop IDs or add an input parameter. - -=== Basic Info for edge pattern - -If you enter editing mode of an edge pattern and expand the Basic Info section, -you can edit its name, decide whether or not to put it into result, or -change its edge type. You can also specify this edge pattern as a regex match by providing Repeat as least (a non-negative integer) and Repeat at most (a positive integer). Due to current GSQL limitations, if you decide to change these numbers, you cannot give the edge pattern a name -or put it into result. - -The name supplied in the panel will be used as the edge's JSON key when producing output and when the pattern is saved as a GSQL query. - -When finished with editing, confirm or cancel the change: - -image::basic-info-banner.png[image] - -NOTE: If you want another vertex pattern or edge pattern to refer to current selected vertex or edge pattern's attributes, you need to give it a name. - -=== Filter - -If you expand the Filter section, you can add/edit/delete filters for -the selected vertex or edge pattern: - -image::non-edit-filter.png[image] - -Click image:edit.png[image] next to the filter -expression and enter editing mode of the filter: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvmjvt2mkzujjj4alns_-lvml2ar64-j4_zuavzr_filters.png[image] - -You can add multiple filters for each vertex and edge pattern. -The filters are evaluated as if connected with an AND statement. -Building the filter is similar to building an attribute filter in the xref:explore-graph/search-for-vertices.adoc[Explore Graph page]. - -One thing special here is that you can refer to attributes on other vertex patterns and edge patterns. Choose *Attribute of vertex or edge* as expression type, then choose the name of the vertex or edge -pattern whose attribute you want to refer to (see above why we need give a name to vertex or edge patterns), then choose the attribute you want to refer to. - -image::filter-remote-attr.png[image] - -When finished with editing, confirm or cancel the change: - -image::confirm-filter.png[image] - -=== Attachment - -If you expand the Attachment section, you can add/edit/delete -attachments for the selected vertex pattern (attachment on edge -patterns is not supported): - -image::att-non-edit-mode.png[image] - -Click image:edit.png[image] next to one attachment and enter editing mode for the attachment. -You can edit both the attachment expression and attachment name: - -image::att-edit-mode.png[image] - -When finished with editing, confirm or cancel the change: - -image::att-confirm.png[image] - -In attachments, you can either attach a single value or attach the results of an aggregation function, -to all the matched vertex entity results. - -Attaching a single value means attaching the given value to all vertex entities within the matched result. -If for example, you choose to attach the integer value 1, then that value will be attached to all the matched -vertex entity results where the attachment was applied to. If the attachment is applied to an entity that is -involved in multiple matches, then the attached value is non-deterministic. - -Attaching the results of an aggregation function means grouping all the matching -results by the vertex entity which match the vertex pattern, and then -aggregated based on the expression. - -Take this example: - -image::att_examples.png[image] - -[cols="<,<,<",options="header",] -|=== -|name |attachment expression |explanation -|singleValueInt |1 |Attach the integer number `1` to each matched city vertex. - -|singleValueReal |1.5 |Attach the real number `1.5` to each matched city vertex. - -|singleValueString |"singleValueString" |Attach the string "singleValueString" to -each matched city vertex. - -|singleValueBool |true |Attach the boolean value `true` to each matched city vertex. - -|singleValueDatetime |2021-01-01 |Attach the datetime value `2021-01-01` to each -matched city vertex. - -|singleValueVertex |p |Attach one of the vertex ids of the matched vertices p to the matched -city vertex connected to vertices p. - -|singleValueEdge |b |Attach one of the edge ids of the matched edges b_i to the matched -city vertex with edges b. - -|singleValueAttribute |name |Attach the attribute name of the matched city vertex to -the matched city vertex itself. - -|singleValueAttributeOfVertexOrEdge |p.name |Attach one of the `name` attribute of the matched -vertices p to the matched city vertex connected to vertices p. - -|countP |COUNT(DISTINCT p) |Count number of distinct person vertices -matched to each city vertex. - -|countMatched |COUNT(*) |Count number of matches each city vertex -involves in. - -|sumPHeight |SUM(p.height) |Sum the height attribute of all person -vertices matched to each city vertex. - -|minPBirthyear |MIN(p.birthYear) |Get the minimal height attribute of -all person vertices matched to each city vertex. - -|maxPBirthyear |MAX(p.birthYear) |Get the maximal height attribute of -all person vertices matched to each city vertex. - -|avgPBirthyear |AVG(p.birthYear) |Get the average value of height -attribute of all person vertices matched to each city vertex. - -|collectP |COLLECT(p) |Collect all person vertices matched to each city vertex. - -|collectPMarried |COLLECT(DISTINCT p.married) |Collect all distinct person vertices' married status matched to each -city vertex. - -|avgPAge |AVG((2021 - p.birthYear)) |Calculate the average age of all person -vertices matched to each city vertex. -|=== - -Consider we have the following matching result: - -image::att_results.png[image] - -We have the following attachment result table for city vertex _san jose_: - -[width="100%",cols="<34%,<33%,<33%",options="header",] -|=== -|City vertex |Attachment result |Explanation -|san jose |singleValueInt = 1 |Just attach the integer number `1` on the matched city vertex. - -|san jose |singleValueReal = 1.5 |Just attach the real number `1.5` on the matched city vertex. - -|san jose |singleValueString = singleValueString |Just attach the string value "singleValueString" -on the matched city vertex. - -|san jose |singleValueBool = true |Just attach the boolean value `true` on the matched city vertex. - -|san jose |singleValueDatetime = ["2020-01-01 00:00:00"] |Just attach the datetime value `2020-01-01` -on the matched city vertex. - -|san jose |singleValueVertex = ["Emily"] OR singleValueVertex = ["Kevin"] |There are two person vertices connected to city vertex _san jose_ -"Emily" and "Kevin". The resulting value stored in singleValueVertex is non deterministic and could be either -"Emily" or "Kevin". - -|san jose |singleValueEdge = [ - { - "attributes": { - "birthday": "1992-05-23 00:00:00" - }, - "directed": true, - "e_type": "born_in", - "from_id": "Emily", - "from_type": "person", - "to_id": "san jose", - "to_type": "city" - } - ] - OR - singleValueEdge = [ - { - "attributes": { - "birthday": "1992-05-23 00:00:00" - }, - "directed": true, - "e_type": "born_in", - "from_id": "Emily", - "from_type": "person", - "to_id": "san jose", - "to_type": "city" - } - ] | The city vertex _san jose_ is connected to two born in edges, one of them connects the _san jose_ vertex - to the person vertex "Kevin" and the second edge connects the _san jose_ vertex to the person vertex "Emily". - The resulting value stored in singleValueEdge is non deterministic and could be either one of these edges. - -|san jose |singleValueAttribute = redwood city | The city vertex _san jose_ has the attribute `name` and the value of that - is attribute is attached to the _san jose_ vertex. - -|san jose |singleValueAttributeOfVertexOrEdge = Emily -OR -singleValueAttributeOfVertexOrEdge = Kevin | The city vertex _san jose_ is connected to two person vertices, -one of them has the attribute `name` = "Emily" and the other has the attribute `name` = "Kevin". The resulting value stored in -singleValueAttributeOfVertexOrEdge is non deterministic and could be either "Emily" or "Kevin". - -|san jose |countP = 2 |Kevin and Emily - -|san jose |countMatched = 3 a| -(san jose)<-[born_in]-(Kevin)-[person_has_skill]->(programming) - -(san jose)<-[born_in]-(Kevin)-[person_has_skill]->(public speech) - -(san jose)<-[born_in]-(Emily)-[person_has_skill]->(human resource) - -|san jose |sumPHeight = 511 |Kevin.height + Kevin.height + Emily.height -= 173 + 173 + 165 - -|san jose |minPBirthyear = 1991 |Min(Kevin.birthYear, Kevin.birthYear, -Emily.birthYear) - -|san jose |maxPBirthyear = 1992 |Max(Kevin.birthYear, Kevin.birthYear, -Emily.birthYear) - -|san jose |avgPBirthyear = 1991.33333 |(Kevin.birthYear + Kevin.birthYear + -Emily.birthYear) / 3 - -|san jose |collectP = [Kevin, Kevin, Emily] | - -|san jose |collectPName = [false] |Both Kevin and Emily's married status is false. - -|san jose |avgPAge = 29.6667 |((2021 - Kevin.birthYear) + (2021 - Kevin.birthYear) + -(2021 - Emily.birthYear)) / 3 -|=== - -As you can see above the values of attaching a single value for `datetime`, `vertex` and `edge` are stored in a list. This is because, -we currently do not have an accumulator to store these data types directly yet. - -The data types supported for single value attachments are: `integer`, `real`, `string`, `bool`, `datetime`, `vertex` and `edge`. - -=== Order - -If you expand the Order section, you can add/edit/delete ordering for -the selected vertex pattern (ordering on edge patterns is not -supported): - -image::order-section.png[image] - -Click image:edit.png[image] next to the ordering -and enter editing mode for the ordering. You can edit both the ordering -expression and whether results are in ascending or descending order: - -image::edit-order.png[image] - -When finished with editing, confirm the change. - -You can refer to attachments in ordering expression. You can add -multiple orderings, which follow the multi-key ordering rule (upper -ordering dominates). We support ordering by data of types: `integer`, -`real`, `string` and `datetime`. However, single value attachments with -the type `datetime` are stored in a list, thus, we currently do not -support ordering based on single value attachments that have the `datetime` -data type. - -=== Limit - -If you only want a subset of your matching result, you can use limit. -Only the top limit results will be returned based on your ordering -settings. If you don't have orderings, the result will be randomly -picked from all matchings. - -If you expand the Limit section, you can add/edit/delete limit for the -selected vertex pattern (limit on edge patterns is not supported): - -image::limit-section.png[image] - -Toggle *use limit* checkbox to enable/disable limit. You can also edit -the limit number: - -image::use-limit.png[image] - -When finished editing, confirm or cancel the change: - -image::limit-confirm.png[image] - -== Console - -The Console panel shows the graph schema, the result of the last pattern execution result, and errors the visual pattern has. Each execution of a pattern generates two types of results: a visualized graph and JSON -text. On the left is a toolbar with buttons for switching between the -tabs. The buttons, from top to bottom, are the following: - -[cols="^,<",options="header",] -|=== -|menu option |functionality -| image:expand_panel.png[image] -|Expand/Collapse: expand or collapse the Console panel. - -| image:schema (1).png[image] -|Graph schema: show the graph schema. - -| image:visual-result (1).png[image] -|Visualize graph result: show the visual result of the last run pattern. - -| image:json-result.png[image] |View JSON -result: show the raw text result in JSON format of the last run pattern. - -| image:problems.png[image] |Problems: show the -errors in the visual pattern. -|=== - -[[graph-schema-]] -=== Graph schema - -Viewing graph schema makes it more convenient for developers to refer to -the schema topology logic and easier to construct the visual pattern. - -image::assets_-lhvjxin4__6ba0t-qmu_-lvm9pfm2-2ozgm2sd9_-lvmcthyogmsp0kft32s_graph-schema.png[image] - -=== Visualize graph result - -If the pattern execution result contains a graph structure, the result -will be visualized in this panel as a graph. The panel is the same as -the -xref:explore-graph/graph-exploration-panel.adoc[Explore -Graph panel]. The only difference is that each time you run a pattern, -the previous result will be erased. In Explore Graph, the results are -added incrementally. - -image::assets_-lhvjxin4__6ba0t-qmu_-lvm9pfm2-2ozgm2sd9_-lvmcxuo-u1fkbkapquo_visual-graph.png[image] - -You can switch to the JSON Result panel to see the result in JSON -format. - -=== View JSON result - -You can see the JSON response of running the visual pattern from this -tab: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvm9pfm2-2ozgm2sd9_-lvmcnniabkll3klmwxr_json-result-vqb.png[image] - -[[problems-]] -=== Problems - -If the visual pattern contains errors, you can see them here and debug: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvm0wj98fiup0wogjez_-lvm3eb9dlldguwxg6rb_pattern-errors.png[image] - -== Save as - -The 'Save as' feature allows users to save the current pattern as a new pattern under a new name. -The new pattern contains all the undo history of the previous pattern, whilst the previous pattern loses its history. - -[CAUTION] -To completely duplicate a pattern using Save As, first save it using the regular Save feature, then use Save As. -After using Save As, any previous changes are abandoned in the original version and moved to the new version. - -For example let us say that the user saves the following pattern: - -image::save-as_current-pattern.png[image] - -The user then continues to make changes and then decides to save this pattern as a new pattern with a new name, -and clicks on the 'Save as' button. - -image::save-as_pattern-with-changes.png[image] - -After entering the name the user gets redirected to the new pattern: - -image::save-as_new-pattern.png[image] - -Here is the previous pattern returned to its last saved state: - -image::save-as_last-saved-state.png[image] - - - - -== Save as GSQL query - -You can view the GSQL query generated from your visual pattern and save -it. Then you can access this query from Write Queries page, modify your -query, interpret it, install it and run it. - -image::assets_-lhvjxin4__6ba0t-qmu_-lvm4puugyvb92xsngac_-lvm8fwfp4w1f68fzcz-_save-gsql-query.png[image] - -== Render pattern options - -There are three different rendering options. - -image:render-options.png[image] - -By default, Pattern detail and Output glow are checked. All the filters, attachments, ordering conditions and limits are rendered, and the -vertex and edge patterns that will be in result will be highlighted with -glow: - -image::render-detail_3.3.png[image] - -If Pattern detail is not checked, add-on marks will indicate that there are filters, attachments, ordering conditions and limits on -corresponding vertex patterns and edge patterns: - -image::render-addon.png[image] - -If Pattern add-on is not checked, the add-ons will be hidden: - -image::render-no-addon.png[image] - -If Output glow is not checked, the output indicating glow is hidden: - -image::render-no-glow.png[image] - -== Add a vertex pattern - -Click image:add_vertex_type.png[image] , and a -new vertex pattern will be added to the visual pattern. You are in the -editing mode of the newly added vertex pattern. - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvvxrsv4oqboqfdo5rn_add-1st-vertex-pattern.png[image] - -== Add an edge pattern - -Click image:add_edge_type.png[image] , then click -the source vertex pattern of the edge pattern: - -image::click-person-vp.png[image] - -Then click the target vertex pattern of the edge pattern. A new edge -pattern will be added to the visual pattern. You are in the editing mode of the newly added edge pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvvuteg9eqbxemig3sx_-lvwcirpqnzwxjjmibcm_click-dep-vp.png[image] - -== Pick - -Pick is a fast way to build your visual pattern. You can pick from either the graph schema or visual result. - -Click image:pick-btn.png[image], then click one -vertex type in the graph schema tab: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvr5x32viax2_hmvxxm_-lvrfke7dyvs6rwkzzbk_pick-vertex-type.png[image] - -A vertex pattern will be added to the visual pattern: - -image::pick-vertex-type-done.png[image] - -Click image:pick-btn.png[image], then click one -edge type in the graph schema tab: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvr5x32viax2_hmvxxm_-lvrfnuttlpzrlvgsfrq_pick-edge-type.png[image] - -An edge pattern together with two vertex patterns will be added to the -visual pattern: - -image::pick-edge-type-done.png[image] - -Click image:pick-btn.png[image] , then click one -vertex in the visualize graph result tab: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvr5x32viax2_hmvxxm_-lvrg-j4xoq7sv1zdjfl_pick-vertex.png[image] - -A vertex pattern will be added to the visual pattern. Note that the -vertex pattern contains an id condition because it is picked from an -actual vertex entity from the graph: - -image::pick-vetex-done.png[image] - -== Merge - -You can merge multiple vertex patterns of the same vertex type into one vertex pattern. - -Hold Shift key to select multiple vertex patterns: - -image::multi-sel-vertex-pattern.png[image] - -Then click image:merge-btn.png[image] , and you -will get a larger visual pattern: - -image::merged-vertex-pattern.png[image] - -Use pick and merge together and you can create a complicated visual -pattern quickly. - -[#_add_a_pattern_view] -== Add a pattern view - -The *pattern view* functionality allows us to group a subset of a visual pattern within a connected component together as a *pattern view*. -The *pattern view* is applied on the pattern match results and outputs a deduplicated subset of the original match results. - -To add a *pattern view* to your visual pattern: - -. Select the vertices and edges in the visual pattern that you want to include in the *pattern view*. -. Click on the 'Add a pattern view' button image:add-pattern-view-btn.png[] on the toolbar to add all selected vertices and edges to the pattern view. -** If you select an edge pattern, both vertices on the ends of the edge pattern will be included within the *pattern view*. -** If you select two vertex patterns with an edge/edges between the two vertex patterns the edge/edges between the two vertex -patterns will be included in the *pattern view*. - -NOTE: Self edges might not visually appear to be included within the *pattern view*, but if the self edge or the vertex with the self edge was selected, then it is in -the *pattern view*. - -A *pattern view* can only consist of vertices and edges, and so widgets are not included within a *pattern view*. - -Each *pattern view* must have an alias. -GraphStudio generates a default name for each pattern view upon creation, and you can change its name from the configuration panel. - -image::pattern-view-name-edit.png[image] - -To delete a *pattern view*, you will need to select the *pattern view* and then click on the 'Delete' button on the toolbar. Vertex and edge patterns within a *pattern view* -can not be deleted before the *pattern view* itself has been deleted. - -=== Examples - -==== Example 1 - -Here we have a *pattern view* that includes part of a visual pattern: - -[tabs] -==== -Pattern view:: -+ --- -.Pattern view that includes part of a visual pattern -image::pattern-view-part.png[image] - --- - -Results:: -+ --- -Running this visual pattern would give us the following result: - -image::pattern-view-part-results.png[image] - -As you can see putting a *pattern view* over a part of the visual pattern would mean applying the *pattern view* on only a sub-graph of the pattern match result of the whole pattern. - -In this case, it is the sub-graph which matches the sub-pattern `(person AS p)-person_has_skill->(skill)`. In this case the output of the pattern view is just the sub --graph of the pattern match result. --- -==== - -==== Example 2 - -Here we have a *pattern view* that includes the whole visual pattern: -[tabs] -==== -Pattern view:: -+ --- -.Pattern view that includes -image::pattern-view-all.png[Pattern view example] --- - -Results:: -+ --- -Running this visual pattern would give us the following result: - -image::pattern-view-all-results.png[Pattern view example results] - -As you can see putting a *pattern view* over the whole visual pattern would mean applying the *pattern view* on the pattern match result of the whole pattern. -In this case, the output of the *pattern view* is just the projection of the whole pattern match result again. --- -==== - -==== Example 3 - -Here we have a *pattern view* which includes only a vertex within the visual pattern: - -[tabs] -==== -Pattern view:: -+ --- - -.Pattern view that includes one vertex within a visual pattern -image::pattern-view-one.png[image] --- - -Results:: -+ --- -Running the visual pattern would give us the following result: - -image::pattern-view-one-results.png[image] - -As you can see putting a *pattern view* over only a vertex within a visual pattern would mean applying the *pattern view* on only a single vertex type of the pattern match -result of the whole pattern. -In this case, it is all the vertices of type 'person'. -The output of this *pattern view* is just the projection of all the distinct vertices of -type `person` within the whole pattern match result. -This is the same behavior as when we just output a single vertex. --- -==== - - -=== Limitations - -* Overlapping pattern views are not allowed: -+ -image::pattern-view-overlap-error.png[image] - -* Pattern views across different connected components are not allowed: -+ -image::pattern-view-different-components-error.png[image] - -* Vertex patterns within a *pattern view* cannot be merged with any other vertex patterns: -* We currently do not allow creating edge patterns between vertex patterns in the same *pattern view*: -* Drag-and-drop is not supported within a pattern view. However, the pattern view itself can be dragged around, and the vertex and edge patterns within it will be dragged along with the pattern view. - - -== Widget - -As described in the -link:#_basic_concepts[Basic Concepts], a visual pattern represents a graph pattern matching problem. In graph theory, graph pattern matching is declarative. However, graph pattern matching is not the full story. In a lot of cases you need to represent procedural computation flow. That's why we are introducing widgets. - -=== Intersect - -Click image:intersect.png[image] , then click two -vertex patterns of the same vertex type: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvrllqdvwlhlo9elct4_-lvrry_spqmnsq2be_hq_intersect-input1.png[image] - -And an intersection widget is added to the visual pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvrllqdvwlhlo9elct4_-lvrs99vsvjblisgtg4w_intersect-added.png[image] - -The output vertex pattern means matching all company vertices located at redwood city, *and* belongs to big data industry. - -The output company vertex pattern can be part of another larger pattern. You can think of the input vertex patterns of the widget as constraints of the output vertex pattern. - -=== Union - -Click image:union.png[image] , then click two -vertex patterns of the same vertex type. A union widget is added to the visual pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvrllqdvwlhlo9elct4_-lvrttcpkwcfix_ui3ji_union-pattern.png[image] - -The output vertex pattern means matching all company vertices located at redwood city, *or* belongs to big data industry. - -=== Subtract - -Click image:subtract.png[image] , then click two -vertex patterns of the same vertex type. A subtract widget is added to -the visual pattern: - -image::assets_-lhvjxin4__6ba0t-qmu_-lvrllqdvwlhlo9elct4_-lvrtjgenpxrpc6qn91e_subtract-pattern.png[image] - -The output vertex pattern means matching all company vertices located at redwood city, *but not* belong to big data industry. - -=== Within - -The Within widget allows you to create a vertex pattern whose matching result is constrained within the matching result of another vertex pattern. - -For example, say you have a vertex pattern for all people who currently work at company A, and you want to select from them everyone who has bought product B. -You can use the Within widget to select from the vertex pattern with all person vertices that work at company A, and create another pattern for people who have bought product B. -The output from the second pattern will be a subset of the matching result of the first pattern - that is, the output from the second pattern will be people who work at company A, who bought product B. - -Click image:within_widget-button.jpg[Within widget, 100], and then select a vertex pattern whose result you want to select from. -This creates a within widget on the first vertex pattern, and you will see a second vertex pattern added to the graph pattern. -Below are two visual examples to select results within a vertex pattern. - -image::within_widget-pattern1.jpg[image] - -In the above example, the graph pattern outputs two bottom patterns which are both within the top pattern. -The output vertex pattern means matching all company vertices or all city vertices that a person who attends san jose university is working at or was born in. -In other words, a person vertex that attends san jose university needs either a `work_at` edge connected to a company vertex, or a `born_in` edge connected to a city vertex to be included in the result. - -image::within_widget-pattern2.jpg[image] - -The output vertex pattern means matching all company vertices and the city vertices that a person who attends san jose university is working at and was born in. In other words, a person vertex needs to have both a word_at edge connected to a company and a born_in edge connected to a city to be included in the result. - -== Downward import - -We now support importing visual patterns from a higher version to a lower version. - -Here is an example of the dialog that will be shown when an imported solution contains visual patterns which contain features -that are unsupported in the current version: - -image::downward-import-error-dialog.png[image] - -Users can choose to either ignore the message and keep the pattern or delete it. If the user chooses to ignore the message and keep -the pattern, the pattern will not be deleted, but it will not be displayed or accessible to the users. - -== Next Step - -Now you have a basic idea about all different functionalities of Visual Query Builder. Let's go to the next page to walk through how to build some visual patterns to solve your business questions! diff --git a/modules/graphstudio/pages/write-queries.adoc b/modules/graphstudio/pages/write-queries.adoc index 6c058cb..99226a7 100644 --- a/modules/graphstudio/pages/write-queries.adoc +++ b/modules/graphstudio/pages/write-queries.adoc @@ -199,6 +199,11 @@ image::table-view.png[] Table rows can be sorted by any column with primitive type values. You can also download the table as a CSV file by clicking the download button next to the table name. +[NOTE] +==== +`APP_ACCESS_DATA` permission is required to download the table as a CSV file. +==== + == View logs If a query ran successfully, the Query Log will show a success message.