# Features

<p>This guide introduces you to the concept of features in Profiles and explains how to define them in your Profiles project.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="overview">Overview</h2><p>A Customer360 (C360) table contains various customer features. In Profiles, you can create these features using <a href="https://www.rudderstack.com/docs/profiles/dev-docs/profiles-yaml/var-groups/entity-var/" ><code>entity_vars</code></a> which, in turn, can be created using an <a href="https://www.rudderstack.com/docs/profiles/concepts/inputs/" ><code>input</code></a>, <code>model</code> or other <code>entity_vars</code>.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="usage">Usage</h2><p>You can define features in the <a href="https://www.rudderstack.com/docs/profiles/dev-docs/profiles-yaml/" ><code>profiles.yaml</code></a> file, as shown:</p>
<div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">var_groups:
  - name: user_features
    entity_key: user
    vars:
      - entity_var:
          name: first_seen
          select: min(cast(timestamp as date))
          from: inputs/rsPages
          is_feature: false
          description: First seen date
      - entity_var:
          name: last_seen
          select: max(cast(timestamp as date))
          from: inputs/rsPages
          description: Last seen date
      - entity_var:
          name: user_lifespan
          select: &#39;{{ user.last_seen }} - {{ user.first_seen }}&#39;
          description: User lifespan</code></pre></div>
</div>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="incremental-features">Incremental features</h2>
<blockquote class="announcement">
  <div class="tip-quote">
    
    <div class="tip-text">This is a beta feature.</div>
  </div>
</blockquote>

<p>Profiles also supports <a href="https://www.rudderstack.com/docs/profiles/concepts/incremental-features/" >Incremental Features</a> to help reduce warehouse costs, especially in case of large datasets.</p>
<p>By adding a <code>merge:</code> clause to your <code>entity_var</code> definitions and marking the input model as <code>is_append_only: true</code>, you enable Profiles to process only new data and merge it with previously computed values — improving performance and reducing costs considerably.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="controlling-update-frequency">Controlling update frequency</h2><p>Not all features need to be computed on every run — use <a href="https://www.rudderstack.com/docs/profiles/concepts/timegrains/" >Timegrains</a> to control how often features are updated:</p>
<div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">var_groups:
  - name: realtime_signals
    entity_key: user
    time_grain: day       # Computed daily
    vars:
      - entity_var:
          name: last_active_date
          select: max(timestamp::date)
          from: inputs/rsPages

  - name: monthly_aggregates
    entity_key: user
    time_grain: month     # Computed monthly
    vars:
      - entity_var:
          name: favorite_category
          select: mode(category)
          from: inputs/orders</code></pre></div>
</div>
<p>This helps reduce compute costs for features that don&rsquo;t need frequent updates.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="best-practices">Best practices</h2><ul>
<li>An <code>entity_var</code> will automatically group records from a source <code>input</code> or <code>model</code> by customer, so you need only to specify an aggregate function in the <code>select</code> field.</li>
<li>Every <code>entity_var</code> is included in <a href="https://www.rudderstack.com/docs/profiles/concepts/feature-views/" ><code>feature_views</code></a> by default.</li>
<li>To use an <code>entity_var</code> to create another <code>entity_var</code> but <strong>not include</strong> it as a feature, add <code>is_feature: false</code> to the <code>entity_var</code> definition.</li>
<li>For large datasets, consider making features incremental to improve performance.</li>
<li>Group features by update frequency using <code>time_grain</code> on <code>var_group</code> to optimize compute costs.</li>
</ul>
<br />

