J1QL With vs. That?

Jeff
Jeff mod
edited January 2022 in Security Engineering
I am trying to understand how the structure of my J1QL queries impacts my results.

In particular, what are the differences between the relationships [WITH] and [THAT] in JupiterOne?

Answers

  • BrendanQuinn_J1
    edited January 2022
    WITH is followed by property name and values to filter entities.
    THAT is followed by a Relationship verb.

    Here are some examples.

    Example of a WITH query:

    Find PasswordPolicy with
    minLength >= 8 and
    requireLowercase = true and
    requireUppercase = true and
    requireSymbols = true and
    maxAgeDays <= 90 and
    historyCount >= 12


    In this example, WITH is used to filter password policies according to minimum length, special characters, and age requirements.

    Example of a THAT query:

    Find Person
    that IS User
    that HAS UserGroup


    In this example, the query will return all users THAT belong to a user group.

This Month's Leaders