{"id":13484328,"url":"https://github.com/continuum/active_importer","last_synced_at":"2025-03-27T16:30:42.673Z","repository":{"id":11643407,"uuid":"14148220","full_name":"continuum/active_importer","owner":"continuum","description":"Define importers that load tabular data from spreadsheets or CSV files into any ActiveRecord-like ORM.","archived":true,"fork":false,"pushed_at":"2021-11-23T12:48:58.000Z","size":164,"stargazers_count":330,"open_issues_count":10,"forks_count":19,"subscribers_count":46,"default_branch":"develop","last_synced_at":"2025-03-20T23:43:04.208Z","etag":null,"topics":["activerecord","csv-files","data-import","importer","orm","ruby","spreadsheet","tabular-data"],"latest_commit_sha":null,"homepage":"http://continuum.github.io/active_importer/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/continuum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-05T17:13:47.000Z","updated_at":"2025-02-19T20:45:29.000Z","dependencies_parsed_at":"2022-09-10T15:00:16.458Z","dependency_job_id":null,"html_url":"https://github.com/continuum/active_importer","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuum%2Factive_importer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuum%2Factive_importer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuum%2Factive_importer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuum%2Factive_importer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/continuum","download_url":"https://codeload.github.com/continuum/active_importer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882224,"owners_count":20687854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","csv-files","data-import","importer","orm","ruby","spreadsheet","tabular-data"],"created_at":"2024-07-31T17:01:22.621Z","updated_at":"2025-03-27T16:30:41.280Z","avatar_url":"https://github.com/continuum.png","language":"Ruby","readme":"# ActiveImporter\n[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/continuum/active_importer?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n## ARCHIVED\n\nDefine importers that load tabular data from spreadsheets or CSV files into any ActiveRecord-like ORM.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'active_importer'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install active_importer\n\n## Usage\n\nDefine classes that you instruct on how to import data into data models.\n\n```ruby\nclass EmployeeImporter \u003c ActiveImporter::Base\n  imports Employee\n\n  column 'First name', :first_name\n  column 'Last name', :last_name\n  column 'Department', :department do |department_name|\n    Department.find_by(name: department_name)\n  end\nend\n```\n\nThe importer defines what data model it imports data into, and how columns in\nthe data source map to fields in the model.  Also, by providing a block, the\nsource value can be processed before being stored, as shown with the\n'Department' column in the example above.\n\nOnce defined, importers can be invoked to import a given data file.\n\n```ruby\nEmployeeImporter.import('/path/to/file.xls')\n```\n\nThe data file is expected to contain columns with titles corresponding to the\ncolumns declared.  Any extra columns are ignored.  Any errors while processing\nthe data file does not interrupt the whole process.  Instead, errors are\nnotified via some callbacks defined in the importer (see below).\n\n## Documentation\n\nFor mote detailed information about the different aspects of importing data\nwith `active_importer`, refer to the following sections in the [wiki](https://github.com/continuum/active_importer/wiki).\n\n### Getting started\n\n* [Understanding how spreadsheets are parsed](https://github.com/continuum/active_importer/wiki/Understanding-how-spreadsheets-are-parsed)\n* [Mapping columns to attributes](https://github.com/continuum/active_importer/wiki/Mapping-columns-to-attributes)\n\n### Diving in\n\n* [Custom data processing](https://github.com/continuum/active_importer/wiki/Custom-data-processing)\n* [Helper methods](https://github.com/continuum/active_importer/wiki/Helper-methods)\n* [File extension and supported formats](https://github.com/continuum/active_importer/wiki/File-extension-and-supported-formats)\n* [Passing custom parameters](https://github.com/continuum/active_importer/wiki/Custom-parameters)\n* [Events and callbacks](https://github.com/continuum/active_importer/wiki/Callbacks)\n* [Selecting the model instance to import into (Update instead of create)](https://github.com/continuum/active_importer/wiki/Update-instead-of-create)\n* [Error handling](https://github.com/continuum/active_importer/wiki/Error-handling)\n* [Selecting the sheet to get data from](https://github.com/continuum/active_importer/wiki/Selecting-the-sheet-to-work-with)\n* [Skipping rows](https://github.com/continuum/active_importer/wiki/Skipping-rows)\n\n### Advanced features\n\n* [Aborting the import process](https://github.com/continuum/active_importer/wiki/Aborting-the-import-process)\n* [Transactional importers](https://github.com/continuum/active_importer/wiki/Transactional-importers)\n\n## Contributing\n\nContributions are welcome! Take a look at our [contributions guide][] for\ndetails.\n\n[contributions guide]: https://github.com/continuum/active_importer/wiki/Contributing\n","funding_links":[],"categories":["Ruby","ORM/ODM Extensions"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontinuum%2Factive_importer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontinuum%2Factive_importer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontinuum%2Factive_importer/lists"}