Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content

Create relationship

CREATE RELATIONSHIP specifies new tables and columns relationship in a Direct Query app data model.

CREATE RELATIONSHIP can only be used in a Direct Query app. It must be preceded by a section directquery section.

Syntax:  

CREATE RELATIONSHIP (OUTER|INNER) JOINED] TableName, [(OUTER|INNER) JOINED] TableName ON ConditionExpression ;

Information note

If an outer|inner joined qualifier for a table is not specified then the default will be inner joined.

Information note

For TableName, you can use quoted name name references. For example, ( IDENTIFIER | LITERAL_STRING | LITERAL_FIELD | LITERAL_NUMBER)).

Examples:  

CREATE RELATIONSHIP BETWEEN T1,T2 ON A = C;
CREATE RELATIONSHIP
BETWEEN OUTER JOINED T2, INNER JOINED T3
ON (D = E or (D is null and E is null));

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!