Coder Social home page Coder Social logo

elixir-data-mapper's Introduction

DM

An Elixir-based application that can enrich product and related resources in Shopify based on an arbitrary source (in this case, a CSV)

Installation

If available in Hex, the package can be installed by adding elixir_data_mapper to your list of dependencies in mix.exs:

def deps do
  [
    {:elixir_data_mapper, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elixir_data_mapper.

Purpose

This application takes a flattened export of data (in this case, a CSV) and maps it to various objects in Shopify. It uses the product SKU to associate data.

For example, adding each product to many collections in Shopify, associating it to a Shopify product taxonomy, setting the "vendor" field, or setting each variant's InventoryItem country of origin.

This can be expanded for more specific mappings or data.

This application respects Shopify's rate limits.

Usage

This is not really intended to be easy to adapt to every use case. It is a good starting point for your specific business logic if you need a reference for using Shopify's APIs with Elixir.

DM.Supervisor.start_links([])
DM.sync_all

DM.Supervisor.start_links([]) will start the data mapper's shopify rate limiter supervisors for both the rest API and graphQL, using gen_source.

DM.sync_all will run the entire product sync -- it will map data from a CSV located in the /data folder and use that to push updates to matching productes or variants in Shopify.

It works by paginating products in Shopify -- it assumes products already exist there from a more basic import and need to be enriched with other data.

elixir-data-mapper's People

Contributors

eric-koyanagi avatar

Stargazers

Niranjan Anandkumar avatar  avatar

Watchers

 avatar

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.