@synode/adapter-file
v5.0.25
Published
File adapter for Synode
Downloads
5,077
Maintainers
Readme
@synode/adapter-file
File output adapter for Synode. Writes generated events to the local filesystem in JSONL, JSON, or CSV format.
Install
npm install @synode/adapter-fileRequires @synode/core as a peer dependency.
Usage
import { generate } from '@synode/core';
import { FileAdapter } from '@synode/adapter-file';
const adapter = new FileAdapter({
path: './output/events.jsonl',
format: 'jsonl',
});
await generate(journey, { users: 100, adapter });
await adapter.close();Options
| Option | Type | Default | Description |
| ------------- | ---------------------------- | ----------------------- | ----------------------------------- |
| path | string | -- | Output file or directory path |
| format | 'jsonl' \| 'json' \| 'csv' | -- | Serialization format |
| partition | 'daily' \| 'none' | 'none' | Split output by event date |
| filePattern | string | 'events-{date}.{ext}' | Template for partitioned file names |
Daily Partitioning
const adapter = new FileAdapter({
path: './output',
format: 'csv',
partition: 'daily',
filePattern: 'events-{date}.{ext}',
});Creates files like output/events-2026-04-05.csv.
Documentation
License
Proprietary -- see LICENSE for details.
Copyright © 2026 Digitl Cloud GmbH
