> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Historical Data Tracking & Trend Analysis with SCD Type 2

> Build comprehensive historical records of your business metrics with proper change tracking and trend analysis.

## The Challenge

Businesses need to track how their key metrics evolve over time to understand trends, make informed decisions, and comply with reporting requirements. However, maintaining accurate historical records presents several challenges:

* Capturing point-in-time snapshots of metrics
* Tracking changes in dimension attributes over time
* Managing slowly changing dimensions (SCD)
* Ensuring data consistency across time periods
* Creating reliable trend analysis

With Nekt, companies can implement proper historical tracking using SCD Type 2 methodology, **maintaining a complete history of changes** while enabling powerful trend analysis and historical reporting. This approach ensures data integrity and provides valuable insights into business performance over time.

<CardGroup cols={2}>
  Teams can now build comprehensive historical records of their KPIs, tracking
  changes in both metrics and dimension attributes. This enables accurate trend
  analysis, year-over-year comparisons, and reliable historical reporting that
  supports better business decisions.

  <Steps>
    <Step title="Data Source Integration" icon={"file-lines"}>
      Connect to any data source, from CRMs to custom systems.
    </Step>

    <Step title="SCD Implementation" icon={"code-compare"}>
      Implement SCD Type 2 to track historical changes in dimensions and
      metrics.
    </Step>

    <Step title="Trend Analysis" icon={"display"}>
      Create powerful visualizations to analyze trends and patterns over time.
    </Step>
  </Steps>
</CardGroup>

## Implementation Example

Here's how teams use Nekt to implement SCD Type 2 with the **History** module:

<Steps>
  <Step title="Connect your data source">
    Make sure the source table you want to track is available in your Catalog.
  </Step>

  <Step title="Create a History">
    Go to the **History** module and click **Add History**. Select the input table, define the primary keys that uniquely identify each record, configure the output layer and table name, and set up a trigger (we recommend an event-based trigger tied to your source extraction).
  </Step>

  <Step title="Watch your history grow">
    Each time the History runs, it compares the current state of your source table with the previous version and appends new versioned records. Check your output table over time to see the full change history.
  </Step>
</Steps>

<Tip>Set the History trigger as event-based, tied to the pipeline of your input source extraction. This ensures your history is updated automatically every time fresh data arrives.</Tip>

Here's a video tutorial to guide you through the process!

<iframe width="560" height="315" src="https://www.youtube.com/embed/fetMUG9_PEU" title="[PT-BR] History with SCD Type 2" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen" allowfullscreen />

> Check our [LinkedIn post](https://www.linkedin.com/posts/pedroceriotti_nekt-nektjourney-activity-7318336734730117122-azHt?utm_source=share\&utm_medium=member_desktop\&rcm=ACoAACmSaqsBoGmqk5BJrIBVYND5-MEnQMnE6Vs) about it!
