Introduction
Active Record is an Object-Relational Mapping (ORM) framework built into Ruby on Rails. It simplifies interaction between Ruby applications and databases. It allows developers to map Ruby classes to database tables and perform CRUD (Create, Read, Update, Delete) operations through Ruby methods rather than raw SQL.
Active Record automates database interactions, so developers can focus on application logic while it manages the database layer. This abstraction supports cleaner and more maintainable code, integrates with the Rails ecosystem, and makes database management more intuitive.
Why this framework matters in your data stack
Active Record often serves as the primary layer for interacting with operational databases in Rails applications, particularly in OLTP environments such as Postgres. These databases are commonly ingested into data warehouses like Snowflake or BigQuery using ETL tools such as Stitch or AirByte.
Once in the warehouse, data is transformed using tools such as dbt or Matillion, and the results are consumed by BI tools such as Looker or Tableau. Other downstream users include data science teams, machine-learning models, and reverse ETL processes.
Any change that developers make to upstream Active Record models may impact the entire data stack. These updates have the potential to break dashboards, downstream transformations, and machine-learning models. Teams that rely on this data need early visibility when model changes occur. This visibility helps them prepare and avoid data-quality issues.
How Foundational analyzes this framework
The Foundational Code Engine automates schema and lineage extraction by analyzing Active Record models directly in the code. It detects schema changes during development or in pending Pull Requests and allows teams to evaluate potential downstream impacts before they deploy updates.
Advantages of Foundational's approach
Many tools retrieve schema information directly from databases after deployment. Foundational uses a different approach and has these benefits:
It extracts schema definitions directly from Active Record definitions in the code, which gives customers visibility into schema changes earlier in the development cycle and
Reduces the risk of breaking changes in production systems.
Example of Ruby Active Record model
Set up Active Record lineage in Foundational
Setup is simple. Connect the repositories that contain your Active Record definitions. Foundational automatically identifies Active Record files, loads them safely, extracts schema from code, detects changes in Pull Requests, and evaluates downstream impact.
To connect to your source control, check out the relevant How-to article from the Help Center Connectors and Integrations category.
No addtional configuration is required.
Useful links
Example of Ruby Active Record model
While many tools retrieve schema information directly from databases post-deployment, Foundational’s approach involves extracting schema definitions directly from the Active Record definitions within the code. This allows customers to gain visibility into schema changes earlier in the development cycle, reducing the risk of breaking changes in production systems.
Setup Instructions
Setting up Active Record schema and lineage extraction with Foundational is simple. Just connect your repository containing the Active Record models, and the Code Engine will automatically detect and extract the schema details.
Once connected, the Code Engine scans and processes the Active Record models, providing visibility into the schema and lineage within your application, all without requiring database acces



