Commit 0ce0d6c0 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update README

parent 552c1a74
## Text File validation Service
## Text File Validation Service
[![pipeline status](https://gitlab.switch.ch/memoriav/memobase-2020/services/import-process/text-file-validation/badges/master/pipeline.svg)](https://gitlab.switch.ch/memoriav/memobase-2020/services/import-process/text-file-validation/-/commits/master)
Checks the files present in the `app.directory` folder on the sFTP server.
A service which checks the provided metadata files on the SFTP server. The location is
found based on the system environment (prod,stage,test) and the provided record set id.
[Confluence Doku](https://memobase.atlassian.net/wiki/spaces/TBAS/pages/29196525/Service+Text+File+Validation)
### Current Features
### What does it do?
- Check if files are CSV or TSV
- Check if CSV and TSV files are formatted correctly.
- Send sftp paths to kafka for further processing.
The service loops through each file on the SFTP server in the record set folder. For each of those
files the extension is checked. If the extension matches a known file type, the file is parsed.
### Requirements
- Execute command `./gradlew addKtlintFormatGitPreCommitHook`
### Configuration
```yaml
sftp:
host: localhost
port: 22000
user: user
password: password
app:
directory: /memobase/test_institution_1/test_record_set_1
kafka:
producer:
bootstrap.servers: localhost:12345
client.id: sftp-reader-p1-j1
value.serializer: "org.apache.kafka.common.serialization.StringSerializer"
topic:
out: sftp-reader-p1-j1
```
On Fail:
- Send report with status FATAL and error message. Error message templates
can be found in [ReportMessages](src/main/kotlin/ReportMessages.kt)
On Success:
- Send report with status SUCCESS
- Send a message to output topic with file type and absolute path to file as content.
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment