Giter Site home page Giter Site logo

henrytseng / activerecord-materialize-adapter Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 169 KB

ActiveRecord Materialize.io database adapter based on Postgres adapter

License: MIT License

Ruby 98.09% Dockerfile 0.10% Shell 1.81%
rails ruby activerecord materialize beta

activerecord-materialize-adapter's Introduction

ActiveRecord Materialize Adapter

Testing Doc reference Chat on Slack

An ActiveRecord adapter to connect to Materialize databases. The adapter includes support for materialized views as models supported by ActiveRecord::Base. Support for typical relational database tables are also supported but secondary.

Materialize is a streaming database for real-time applications. Materialize accepts input data from a variety of streaming sources (e.g. Kafka) and files (e.g. CSVs), and lets you query them using SQL.

https://materialize.com/

Usage

Add gem to your Gemfile

   gem 'activerecord-materialize-adapter'

Make sure you have the pg or a compatible gem installed. Update your database.yml

  production:
    reporting_analytics:
      adapter: materialize
      host: "materialize-database-host"
      port: "6875"
      database: "materialize_database_name"
      username: "materialize_user"

Gem is currently in an alpha state originally designed as a proof-of-concept.

Design

The ActiveRecord Materialize Adapter is heavily based on the PostgreSQL database adapter and also relies on the pg gem to be installed.

Read about Materialized architecture https://materialize.com/docs/overview/architecture/

Materialize has been designed to specifically solve problems with event streaming; therefore, some relational database functionality may not be supported.

Contributing

To contribute read the CONTRIBUTING.md first.

Fork the repository and create a pull request referencing tests and documentation.

A development stack can be setup with bin/build and tests can be run with bin/test.

Debugging with bin/materialize_psql and bin/psql allows you to connect directly with Materialize and PostgreSQL.

For testing and debugging a PostgreSQL configuration is available in postgres/postgresql.conf and pg_hba.conf.

activerecord-materialize-adapter's People

Contributors

adam-stover avatar henrytseng avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

adam-stover

activerecord-materialize-adapter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.