# zdennis/activerecord-import

A library for bulk insertion of data into your database using ActiveRecord.

Repository: https://github.com/zdennis/activerecord-import
Canonical: https://ross.abutalabs.com/products/activerecord-import
Homepage: http://www.continuousthinking.com
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-08-24T00:34:47+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 6018, "days_push": 10, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4154, forks 622 (observed 2026-08-28T04:08:36.538441+00:00)

## What it is
A Ruby gem that adds bulk import capabilities to ActiveRecord, dramatically reducing the number of SQL INSERT statements needed to insert large amounts of data. It follows ActiveRecord associations to generate minimal insert statements and supports validations and on-duplicate-key updates.

## Use cases
- bulk insert thousands of records into a Rails database quickly
- avoid N+1 insert statements when saving associated models
- speed up an 18-hour batch import process
- import rows from arrays of columns and values
- perform upserts with on duplicate key update
- bulk insert records with validations enabled

## When to choose
- you use ActiveRecord and need to insert many rows efficiently
- you want to bulk insert records while still running validations
- you need to insert associated records without N+1 inserts
- you need upsert behavior on MySQL, SQLite, or Postgres

## When to avoid
- you are not using ActiveRecord or Ruby on Rails
- you need per-record callbacks to fire on every insert
- you only insert a handful of records at a time
- you need a database-agnostic ORM-level bulk API beyond the supported adapters

## Facets
- artifact type: library
- maturity: stable
- function: database, orm, serialization
- domain: databases, backend, web-development, performance
- platform: ruby, cross-platform
- tags: activerecord, bulk-insert, rails, batch-insert, sql-performance

## Member repositories
- zdennis/activerecord-import (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:36.538441+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:53.150170+00:00, confidence not recorded.
  - readme: https://github.com/zdennis/activerecord-import (fetched 2026-08-28T04:08:36.538441+00:00, sha e5608583a946)
- Data as of 2026-08-30T08:39:29.467469+00:00.
