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

aam-cdf-parser

v1.2.0

Published

Adobe Audience Manager logs parser

Downloads

3

Readme

AAM CDF Parser

package version License: MIT dependencies

Here you have a tool for parsing Adobe Audience Manager CDF files. Those are the log files from the DMP platform from Adobe. They use a particular separation notation to represent in a line what is indeed a hierarchical structure.

Motivation

In te process of ingesting this data into a tool like BigQuery or any data science platform we, at Divisadero, needed to transform this data into something accessible.

The easiest way of preserving the whole line/log structure without loosing any data seemed to be another line/log structure, but easier to access.

Installation

Simply use your preffered node package manager to add it:

yarn add aam-cdf-parser

Local tryout

A small demonstration script is provided to checkout how it works in general lines. It can be found in cmd.js. You can invoke it with:

./cmd.js input.gz output.ndj

Create tables

We provide a small script for creating the table in BigQuery with the current schema (defined in schema.json). To create the table just load the schema on the Web UI or call the script from te terminal like so:

./mktable.js my_dataset

This creates in BigQuery a partitioned table (by event time, not ingestion) so you can insert generated files directly.

Usage

Method parse

parse(in: InputStream, out: OutputStream): Stream

It has several convenience methods/wrappers arround the main parse method. Which is the primitive method, and the core of the library. It chains several stream transformations and returns the last one (just in case you want to keep on chaining).

const {parse} = require('aam-cdf-parser');
// ...
const input // = some.method.to.get.an.inputStream();
const output // = some.method.to.get.an.outputStream();
const onFinish = () => {console.log('done')};
parse(input, output).on('finish', onFinish);

Method promiseParse

promiseParse(in: InputStream, out: OutputStream): Promise<boolean>

Import it into your code either with require or Import

const {promiseParser} = require('aam-cdf-parser');
// ...
const input // = some.method.to.get.an.inputStream();
const output // = some.method.to.get.an.outputStream();
const onFinish = () => {console.log('done')};
promiseParser(input, output).then(onFinish);

Method callbackParse

callbackParse(in: InputStream, out: OutputStream, callback: Function)

Import it into your code either with require or Import

const {callbackParse} = require('aam-cdf-parser');
// ...
const input // = some.method.to.get.an.inputStream();
const output // = some.method.to.get.an.outputStream();
const onFinish = () => {console.log('done')};
callbackParse(input, output, onFinish);

Method local

local(in: String, out: String, callback: Function)

Import it into your code either with require or Import

const {callbackParse} = require('aam-cdf-parser');
// ...
const input = 'my-input-cdf-file.gz';
const output = 'my-output-file.json';
const onFinish = () => {console.log('done')};
local(input, output).then(onFinish);