# mongo-datalake

> Persist arbitrary data

Latest version **0.0.1** (published 2020-02-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongo-datalake
pnpm add mongo-datalake
yarn add mongo-datalake
bun add mongo-datalake
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-02-26 |
| First published | 2020-02-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | garritfra |

## Links

- npm: https://www.npmjs.com/package/mongo-datalake
- Repository: https://github.com/garritfra/datalake
- Homepage: https://github.com/garritfra/datalake#readme
- Issues: https://github.com/garritfra/datalake/issues
- npm.io page: https://npm.io/package/mongo-datalake

## Dependencies (4)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [express](https://npm.io/package/express.md) ^4.17.1
- [mongodb](https://npm.io/package/mongodb.md) ^3.5.4
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0

## Recent versions

- 0.0.1 (latest) — 2020-02-26

## README

# datalake

Persist arbitrary data

## Writing Data

Data is stored in "droplets", which are blobs of similar data entries.

You can persist a single datapoint by `POST`ing it to the base url of the service:

```json
{
  "droplet": "temperature",
  "data": {
    "timestamp": "2020-02-23T13:17:48+00:00",
    "value": 23.1
  }
}
```

This will create the droplet if it does not exist, or append the data to a droplet that already exist.

Alternatively, you can add multiple datapoints in a droplet like this:

```json
{
  "droplet": "temperature",
  "data": [
    {
      "timestamp": "2020-02-23T13:17:00+00:00",
      "value": 23.1
    },
    {
      "timestamp": "2020-02-23T13:18:00+00:00",
      "value": 23.2
    }
  ]
}
```

## Reading Data

Droplets are exposed as a RESTful ressource, relative to the base url of the server.

To list all droplets, you can `GET` the `/droplets` ressource:

```json
["temperature", "waterlevel"]
```

To give an example: The temperature droplet is accessable via

```
GET /droplets/temperature
```

---
_Source: https://npm.io/package/mongo-datalake · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
