{"id":13408492,"url":"https://github.com/zeebe-io/zeebe-csv-exporter","last_synced_at":"2025-03-14T13:31:25.382Z","repository":{"id":36398069,"uuid":"172377811","full_name":"zeebe-io/zeebe-csv-exporter","owner":"zeebe-io","description":"Zeebe CSV exporter","archived":true,"fork":false,"pushed_at":"2023-02-27T10:09:39.000Z","size":59,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-31T20:30:54.017Z","etag":null,"topics":["csv","zeebe","zeebe-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeebe-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-24T19:03:03.000Z","updated_at":"2023-02-27T10:10:31.000Z","dependencies_parsed_at":"2024-10-26T12:20:32.568Z","dependency_job_id":null,"html_url":"https://github.com/zeebe-io/zeebe-csv-exporter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeebe-io%2Fzeebe-csv-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeebe-io%2Fzeebe-csv-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeebe-io%2Fzeebe-csv-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeebe-io%2Fzeebe-csv-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeebe-io","download_url":"https://codeload.github.com/zeebe-io/zeebe-csv-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584262,"owners_count":20314722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","zeebe","zeebe-exporter"],"created_at":"2024-07-30T20:00:53.217Z","updated_at":"2025-03-14T13:31:25.052Z","avatar_url":"https://github.com/zeebe-io.png","language":"Java","funding_links":[],"categories":["Exporters"],"sub_categories":[],"readme":"# Zeebe CSV Exporter\n\nA simple aggregating [CSV] [exporter] for [Zeebe].\n\n_**Note: This is a work in progress; you're welcome to contribute code or ideas, but no guarantees are made about the exporter itself.\nUse at your own risks.**_\n\n## Usage\n\n1. Download the [latest release] from GitHub and copy it into the Zeebe `lib`\nfolder\n2. Add the exporter configuration to the `conf/zeebe.cfg.toml` to enable the\n   exporter\n   ```\n   [[exporters]]\n   id = \"csv\"\n   className = \"io.zeebe.exporter.CsvExporter\"\n\n   [exporters.args]\n   # output path to write csv files\n   output = \"csv/\"\n   ```\n\n## Example\n\nThe exporter writes a file per partition for workflow instances and jobs.\n\nWith the exporter configuration shown above and a broker with 3 partitions the\nfollowing files will be created.\n\n```\ncsv/\n├── job-0.csv\n├── job-1.csv\n├── job-2.csv\n├── workflow-instance-0.csv\n├── workflow-instance-1.csv\n└── workflow-instance-2.csv\n```\n\nThe content of the files contains a header line with the field names and then\na line for every finished entity.\n\n```\n$ head -n10 csv/workflow-instance-0.csv\nbpmnElementType,bpmnProcessId,completed,created,duration,elementId,endPosition,ended,flowScopeKey,key,partition,startPosition,version,workflowInstanceKey,workflowKey\nSTART_EVENT,process,true,1551051793053,1,StartEvent_1,4295035184,1551051793054,155,156,0,4295034440,1,155,1\nSTART_EVENT,process,true,1551051793073,1,StartEvent_1,4295038368,1551051793074,160,161,0,4295037624,1,160,1\nSTART_EVENT,process,true,1551051793100,1,StartEvent_1,4295043072,1551051793101,166,167,0,4295042328,1,166,1\nSERVICE_TASK,process,true,1551051793056,62,ServiceTask_0kt6c5i,4295046760,1551051793118,155,158,0,4295035704,1,155,1\nSERVICE_TASK,process,true,1551051793074,50,ServiceTask_0kt6c5i,4295047024,1551051793124,160,163,0,4295038888,1,160,1\nSERVICE_TASK,process,true,1551051793103,44,ServiceTask_0kt6c5i,4295051008,1551051793147,166,169,0,4295043592,1,166,1\nEND_EVENT,process,true,1551051793141,7,EndEvent_0crvjrk,4295051272,1551051793148,155,174,0,4295048872,1,155,1\nEND_EVENT,process,true,1551051793141,8,EndEvent_0crvjrk,4295051528,1551051793149,160,175,0,4295049128,1,160,1\nPROCESS,process,true,1551051793046,108,process,4295053168,1551051793154,-1,155,0,4295033960,1,155,1\n```\n\n```\n$ head -n10 csv/job-0.csv\nbpmnProcessId,completed,created,duration,elementId,elementInstanceKey,endPosition,ended,key,partition,startPosition,type,\"workflowDefinitionVersion\",workflowInstanceKey,workflowKey\nprocess,true,1551051793061,50,ServiceTask_0kt6c5i,158,4295045384,1551051793111,159,0,4295036576,task,1,155,1\nprocess,true,1551051793075,39,ServiceTask_0kt6c5i,163,4295045728,1551051793114,164,0,4295039760,task,1,160,1\nprocess,true,1551051793103,40,ServiceTask_0kt6c5i,169,4295049384,1551051793143,170,0,4295044464,task,1,166,1\nprocess,true,1551051793174,4,ServiceTask_0kt6c5i,185,4295060624,1551051793178,186,0,4295058872,task,1,181,1\nprocess,true,1551051793210,11,ServiceTask_0kt6c5i,199,4295070088,1551051793221,201,0,4295068512,task,1,196,1\nprocess,true,1551051793320,19,ServiceTask_0kt6c5i,225,4295090616,1551051793339,226,0,4295085864,task,1,222,1\nprocess,true,1551051793276,65,ServiceTask_0kt6c5i,215,4295092312,1551051793341,216,0,4295079496,task,1,212,1\nprocess,true,1551051793301,40,ServiceTask_0kt6c5i,220,4295092920,1551051793341,221,0,4295082680,task,1,217,1\nprocess,true,1551051793248,96,ServiceTask_0kt6c5i,210,4295097112,1551051793344,211,0,4295076312,task,1,207,1\n```\n\n## Analyse\n\nThe CSV files can be imported into a spreadsheet, a SQL database or used as\ninput to your favorite command line tool to be further analysed.\n\nSee the [`scripts/average-duration.awk`] example how to process the CSV with\n[AWK] to calculate the count, total and average duration per workflow instance\nelement or job.\n\n```\nawk -f scripts/average-duration.awk samples/workflow-instance-0.csv\n```\n\nOr use a tool like [`textql`] to run SQL queries on-the-fly.\n\n```\ntextql -header -pretty -sql 'select elementId, count(duration), sum(duration), avg(duration) from \"workflow-instance-0\" group by elementId' samples/workflow-instance-0.csv\n```\n\nGet the number of created elements per second grouped by element id\n\n```\ntextql -header -pretty -sql 'SELECT elementId, datetime(created/1000, \"unixepoch\") as timestamp, count() from \"workflow-instance-0\" GROUP BY elementId, timestamp ORDER BY timestamp' samples/workflow-instance-0.csv\n```\n\nThe average number of completed elements per second grouped by element id\n\n```\ntextql -header -pretty -sql 'select elementId, avg(c) FROM (SELECT elementId, datetime(ended/1000, \"unixepoch\") as timestamp, count() as c GROUP BY elementId, timestamp) group by elementId' samples/workflow-instance-0.csv\n```\n\n## Code of Conduct\n\nThis project adheres to the Contributor Covenant [Code of\nConduct](/CODE_OF_CONDUCT.md). By participating, you are expected to uphold\nthis code. Please report unacceptable behavior to code-of-conduct@zeebe.io.\n\n## License\n\n[Apache License, Version 2.0](/LICENSE)\n\n[Zeebe]: https://zeebe.io\n[exporter]: https://docs.zeebe.io/basics/exporters.html\n[CSV]: https://en.wikipedia.org/wiki/Comma-separated_values\n[latest release]: https://github.com/zeebe-io/zeebe-csv-exporter/releases\n[AWK]: https://www.gnu.org/software/gawk/manual/gawk.html\n[`scripts/average-duration.awk`]: scripts/average-duration.awk\n[`textql`]: https://github.com/dinedal/textql\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeebe-io%2Fzeebe-csv-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeebe-io%2Fzeebe-csv-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeebe-io%2Fzeebe-csv-exporter/lists"}