---
title: derivationExpression
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsderivedattributedescription/derivationexpression
---

# derivationExpression

An expression for generating derived data.

## Declaration

```swift
var derivationExpression: NSExpression? { get set }
```

## Discussion

Discussion When using derived attributes in an SQL store, this expression should be a keypath expression (including @operation components) a function expression using one of the predefined functions defined in NSExpression Any keypaths used in the expression must be accessible from the entity on which the derived attribute is specified. If you try to add a store to a coordinator whose model contains derived attributes of a type not supported by the store, the add fails and throws an error.
