Joins¶
-
class
snuba_sdk.relationships.
Join
(relationships)[source]¶ Bases:
snuba_sdk.expressions.Expression
A collection of relationships that is used in the MATCH section of the SnQL query. Must contain at least one Relationship, and will make sure that Entity aliases are not used by different Entities.
- Parameters
relationships (
Sequence
[Relationship
]) – The relationships in the join.- Raises
InvalidExpressionError – If two different Entities are using the same alias, this will be raised.
-
relationships
: Sequence[snuba_sdk.relationships.Relationship]¶
-
class
snuba_sdk.relationships.
Relationship
(lhs, name, rhs)[source]¶ Bases:
snuba_sdk.expressions.Expression
A representation of a relationship between two Entities. The relationship name should be defined in the data model of the LHS and entity in Snuba. Both Entities must have a valid alias, which will be used to qualify the columns in the SnQL query.
- Parameters
- Raises
InvalidExpressionError – If the incorrect types are used or if either of the Entities does not have an alias.
-
name
: str¶