npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

streaming-profile-transformations

v1.0.0

Published

## Features

Downloads

6

Readme

streaming-profile-transformations

Features

getMainID (ID string)

This function will return an object containing (MAIN_ID, TYPE, VALID_AT) as a promise. Here "TYPE" is the id_type of "ID", for example, user_ID.

Example:

const mainIdObj = await getMainID(userID)

getFeature (ID string, optional: isMainID = false)

This function will return an object as a promise, which contains all the features of a user present in the Feature table.

If "ID" is MAIN_ID then this function will skip calling the getMainID function and will directly return features corresponding to that MAIN_ID.

Example:

const featuresObj = await getFeature(mainID, true)

const featuresObj = await getFeature(userID)

Steps to use this package in transformer

1. Set up a Redis

  1. Login to Redis lab.
  2. Create a New Database.

2. Set up a reverse ETL connection

You can check this tutorial to setup a rETL connection Video

  1. Login to RudderStack.

  2. Add the Snowflake ID Graph table as a new Source and set up Connection Settings.

    As the ID Graph table doesn't have any primary key we have to generate a dummy primary key

    use this model to generate a dummy primary key

    select distinct(concat(ID1, ID1_TYPE, VALID_AT)) as key, ID1, ID1_TYPE, MAIN_ID, VALID_AT
    from TABLE_NAME;
  3. Add Redis as a new Destination, use the Redis Cluster address

    (optional) Add this Transformation to Redis Destination

    export function transformEvent(event, metadata) {
        event.traits = {
            "TYPE": event.traits.ID1_TYPE,
            "MAIN_ID": event.traits.MAIN_ID,
            "VALID_AT": event.traits.VALID_AT,
        }
        return event
    }
  4. Create an rETL connection between the Snowflake ID Graph table and Redis.

  5. Add the Snowflake Feature table as a new Source and use MAIN_ID as the primary key.

  6. Create another rETL connection between the Snowflake Feature table and Redis.

3. Use getMainID() and getFeatures() in transformer.