Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reigndocs #1904

Merged
merged 12 commits into from
Oct 13, 2020
24 changes: 12 additions & 12 deletions docs/synapse/userguides/storm_ref_lift.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"Lift operations retrieve a set of nodes from a Synapse Cortex based on specified criteria. While all lift operations are retrieval operations, they can be broken down into “types” of lifts based on the criteria, comparison operator, or special handler used:\n",
"\n",
"- `Simple Lifts`_\n",
"- `Safe Lifts`_\n",
"- `Try Lifts`_\n",
"- `Lifts Using Standard Comparison Operators`_\n",
"- `Lifts Using Extended Comparison Operators`_\n",
"\n",
Expand Down Expand Up @@ -643,12 +643,12 @@
"hideCode": false
},
"source": [
"Safe Lifts\n",
"----------\n",
"Try Lifts\n",
"---------\n",
"\n",
"\"Safe\" lifts, also known as \"try\" lifts, are lifts performed in a safe and error-free manner. Safe lifts refer to lifts that perform :ref:`data-type` validation before attempting to lift a query node, and fails safely if an invalid Type is encountered. Specifically, it prevents a Cortex from throwing a runtime execution error, and terminating query execution when Type validation is unsuccessful for a given property value.\n",
"Try lifts refer to lifts that \"try\" to perform a Cortex lift operation, and fail silently if :ref:`data-type` normalization is not successful. Try lifts prevent a Cortex from throwing a runtime execution error, and terminating query execution if an invalid Type is encountered.\n",
"\n",
"When lifting nodes by property value using the equals (``=``) comparator, Type validation is not performed on the supplied property value prior to query execution. If a query is executed with an invalid Type, or a Type that does not correspond to the supplied form, the Cortex will throw a ``BadTypeValu`` error, and terminate the query as shown below."
"When lifting nodes by property value using the equals (``=``) comparator, if Type validation fails for a supplied property value the Cortex will throw a ``BadTypeValu`` error, and terminate the query as shown below."
]
},
{
Expand Down Expand Up @@ -689,7 +689,7 @@
"hidePrompt": false
},
"source": [
"To prevent queries from terminating prematurely due to an invalid Type, Storm supports the use of the safe comparator (``?=``) when performing property value lifts. This operator is useful when you are performing multiple Cortex operations in succession within a single query, lifting nodes using external data that has not been normalized, or lifting nodes during automation, and do not want a query to terminate if an invalid Type is encountered.\n",
"To suppress errors, and prevent premature query termination, Storm supports the use of the try operator (``?=``) when performing property value lifts. This operator is useful when you are performing multiple Cortex operations in succession within a single query, lifting nodes using external data that has not been normalized, or lifting nodes during automation, and do not want a query to terminate if an invalid Type is encountered.\n",
"\n",
"\n",
"**Syntax:**\n",
Expand All @@ -698,7 +698,7 @@
"\n",
"**Examples:**\n",
"\n",
"- Safely lift the MD5 node ``174cc541c8d9e1accef73025293923a6``:"
"- Try to lift the MD5 node ``174cc541c8d9e1accef73025293923a6``:"
]
},
{
Expand All @@ -719,11 +719,11 @@
{
"cell_type": "raw",
"metadata": {
"hideCode": true,
"hideCode": false,
"hideOutput": false
},
"source": [
"- Attempt to safely lift the DNS nodes whose ``inet:dns:a:ipv4`` secondary property value equals ``'192.168.0.100'``. Notice that an error is not generated, despite an invalid IPv4 address ``'192.168.0.1000'`` being entered:"
"- Try to lift the DNS nodes whose ``inet:dns:a:ipv4`` secondary property value equals ``'192.168.0.100'``. Notice that an error message is displayed.despite an invalid IPv4 address ``'192.168.0.1000'`` being entered:"
vEpiphyte marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand All @@ -746,7 +746,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"Attempt to safely lift the email address nodes ``'[email protected]'`` and ``'[email protected]'``. Notice that despite the first email address being entered incorrectly, an error message is not generated, and the query executes to completion."
"- Try to lift the email address nodes ``'[email protected]'`` and ``'[email protected]'``. Notice that despite the first email address being entered incorrectly, the error message is suppressed, and the query executes to completion."
]
},
{
Expand All @@ -771,8 +771,8 @@
"source": [
"**Usage Notes:**\n",
"\n",
"- The safe lift comparator should be used when you want Storm query execution to continue even if an invalid property Type is encountered. \n",
"- It is not recommended to use the safe lift comparator when you want to raise an error, or stop query execution if an invalid property Type is encountered."
"- The try operator should be used when you want Storm query execution to continue even if an invalid Type is encountered. \n",
"- It is not recommended to use the try operator when you want to raise an error, or stop query execution if an invalid Type is encountered."
]
},
{
Expand Down