File sources
A file source is one of three kinds:
s3, sftp, or ftp. The kind never changes. To change it, create a new source. The name has 1 to 255 characters and is unique among your file sources.
Reporter encrypts the credential of a source and never shows it again. An edit that omits the secret keeps the stored one, and a blank secret is refused. An edit to any SFTP or FTP field, or to the bucket, endpoint, or access key ID of an S3 source that holds an access key, must carry the secret again. Reporter refuses a secret for an S3 source that holds no access key, such as an AWS bucket that you read through a role. You cannot delete a source that a file dataset still uses.
You can test a saved source at any time. The test opens the source, lists the root folder, and closes. It stops after 5 seconds. A failed test returns the status failed and one message:
S3
An S3 source needs a bucket and a region. The endpoint is optional. An empty endpoint, or an endpoint onamazonaws.com, means AWS, and it must use https. For storage outside AWS, enter an access key ID and its secret key. You can also turn on path-style addressing.
Reporter reads an AWS bucket through a role. It always refuses a static access key for an AWS bucket. To connect one, follow these steps:
1
Create the source
Create the source with the bucket and the region. Reporter refuses a role at this point.
2
Copy two values
Reporter returns a trusted principal and an external ID. The trusted principal is the AWS role that Reporter runs as. Reporter generates the external ID.
3
Update your role
Add the trusted principal to the trust policy of your role. Make the policy require the external ID. Allow the role to list the bucket and read its objects.
4
Add the role
Edit the source and enter the role ARN.
authentication failed. On a deployment that you run yourself, the manager and the worker must run as the same AWS role.
SFTP
An SFTP source needs a host, a port, a user, an authentication method, and the known hosts of the server. All five are required.- The authentication method is
passwordorprivateKey. A private key can have a passphrase. - The known hosts are the public keys of the server, one per line, up to 64 KiB. Each line is a
known_hostsline or a bare public key. Reporter skips blank lines and lines that start with#. - A key marked
@revokedis always refused. Any other marker, such as@cert-authority, makes the source misconfigured.
authentication failed. A list that does not parse shows source misconfigured.
FTP
An FTP source needs a host, a port, a user, a password, and a TLS mode:none (plain FTP), explicit (upgrades the connection with AUTH TLS), or implicit (opens it in TLS). TLS is at least version 1.2. If a public authority did not sign the server certificate, paste the authority certificate in PEM format.
Lerian Cloud and any multi-tenant installation refuse none. Use FTP with TLS or SFTP.
Datasets and schedule
A file dataset has a name, a file source, a contract, and a schedule. The name is the
configName: 1 to 100 letters, digits, underscores, or hyphens. It is unique among all your data sources and never changes. Templates and regulatory mappings read the dataset by this name. You cannot use system or a name that the platform reserves.
You send the contract as the whole text of the contract file. Reporter stores it, byte for byte, as version 1. After that, you change it only by adding a version. Read Contract versions. A dataset on an SFTP or FTP source needs a contract with a manifest. Read Manifest.
The reference date of a day is the date the data is about, not the date the file arrives. The start date cannot be more than five calendar years before the day you register the dataset.
Business days follow the Brazilian national calendar: Monday to Friday, minus the national holidays. The holidays include Carnival Monday and Tuesday, Good Friday, and Corpus Christi. Reporter knows no local holiday. The due offset counts business days when
days is business, and calendar days when it is all.
What locks
After Reporter accepts a day, or an operator declares a day without delivery,days and startDate can no longer change. The time zone, due time, offset, and reopen window stay editable.
After Reporter accepts a delivery, a new contract version can only add. You cannot delete a table or a column. You cannot change the type of a column, or add or drop the offset (XXX) of a datetime format. A declaration without delivery does not set this rule.
If you delete a dataset, Reporter keeps its days, files, and contract versions. Reporter refuses the deletion while a template or an active regulatory mapping reads the dataset.
Days
A day is one expected delivery. Reporter adds a record for every day the schedule expects, from the start date to today. A day has one of four states:
An accepted day stays accepted when a later attempt does not succeed. Two marks add to the state. Overdue means the due time passed and no delivery is accepted. A day due before you registered the dataset is never overdue. No delivery means an operator declared that the sender delivered nothing.
A day keeps its revisions and its last attempt. A revision records the contract version, the files with their SHA-256, and the warnings. An attempt records the trigger (
schedule or manual), the outcome, and the findings. A failed attempt also records one error word, such as connect failed or host blocked.
The scheduled fetch
By default, every 300 seconds, Reporter adds the expected days and picks the days to fetch:- A day with no accepted delivery, and whose last attempt did not fail, is fetched every cycle, before and after its due time, until seven days after it. Then it is fetched at most once an hour.
- A day whose last attempt failed is fetched at most once an hour.
- An accepted day is checked at most once an hour, while its reference date is inside the reopen window.
- A day declared without delivery is checked at most once an hour for a late delivery.
- Accepted: the day passes every check. Reporter stores the files as a new revision.
- Unchanged: the source holds the same files as the current revision. With no manifest in the contract, a fetch also ends unchanged when the source lists none of the files of a day that has a revision. Reporter stores nothing.
- Incomplete: With a manifest in the contract: the source has no manifest yet, the manifest is empty or cut short, or it lists no file of the contract. With no manifest in the contract: the source lacks a required file on a day that has no revision. A day with no accepted delivery stays
waiting. - Refused: a check found a problem. Reporter stores none of the files. The day shows each finding with its check, its table, and up to ten row numbers. A finding of a
totalcontrol shows the totals that it compared. - Failed: Reporter could not read the source.
A fetch that an operator requests
An operator can request a fetch of any day that the schedule expects, in the past or the future. Reporter answers at once and runs the fetch in the background. It refuses the request when a fetch of the same day is still open, when you already hold the maximum number of open fetches (5 by default), or when the file source is incomplete, such as an AWS source with no role yet. A requested fetch always compares the source with the current revision. If a newer contract version exists, it reads the day again and can store a new revision. A new contract version does not fetch accepted days again. It applies to new deliveries and to requested fetches.Declare no delivery
Sometimes the sender delivers nothing for a day, and nothing is wrong. An operator can declare this for a day that iswaiting or failed, or that has no record yet. The day becomes accepted with the No delivery mark, and it reads as zero rows. Reporter records who declared it and when. The call needs a token that names who acts. Reporter refuses it for a day with an accepted or a refused delivery.
A later delivery
Reporter never refuses a delivery for being late. If a delivery differs from the current revision, it becomes a new revision, and later reports read it. Outside the reopen window, Reporter sees a newer delivery of an accepted day only when an operator requests a fetch. Reporter checks a day declared without delivery at most once an hour, inside and outside the reopen window, until the scheduler stops fetching the day. A delivery that arrives in that time replaces the declaration. Reporter marks every report that read an older revision as revised. The report keeps showing the revision it read. Nothing brings an earlier revision back. A new delivery must hold a file for every table of the current revision. Otherwise, Reporter refuses it and keeps the current revision.Reading days in a report
A template names a table as
<configName>.<table>, the same way it names a database table. Every table has the contract columns and one more: reference_date, the day each row came from, as yyyy-MM-dd.
Each table chooses its days with a filter on reference_date. These operators work: eq for one day, in for a list, between for a range, and gte with lt for the days from gte up to the day before lt. Any other operator is refused when you save the report filter, and again at generation. A selection covers up to 366 days. A table with no filter reads the newest accepted day that is not a no-delivery day.
A report ends in Error, never Partial, when one of these happens:
- A table with no filter has no accepted day to read.
- A day in the selection has no accepted delivery and the schedule expects it. A future day counts.
- The selection starts before the start date of the dataset.
- The contract in use requires a table, and the accepted day has no file for it.
- The contract in use requires a column that the version which accepted the day did not require.
- A read uses
expand, or a join does not pairreference_date.
Events
Reporter emits four events about days. Every payload holds
datasetId, configName, and referenceDate.
Reporter emits no event when you change a source, a dataset, or a contract version. Events leave only when streaming is on. To learn how Reporter publishes events, read Reporter events.
Settings in your own cloud
If you run Reporter in your own cloud, you can change these environment variables. Each limit must be greater than zero, or Reporter does not start.
A worker runs one fetch at a time. It copies the files of the day to its temporary directory, which must hold
DATASET_FETCH_MAX_DAY_BYTES.
Network access
On Lerian Cloud, Reporter connects to your SFTP or FTP server from three fixed addresses:
15.229.219.1518.228.56.7156.124.7.242
100.64.0.0/10, the name localhost, cloud metadata names, and any name that ends in .local, .internal, or .cluster.local.
Reporter makes no exception for a private address. The connection test and a fetch show host blocked. A connection that does not complete in 30 seconds fails. On Lerian Cloud, the server needs a public address. In your own cloud, run Reporter single-tenant to read a server on a private address.
Next steps
File dataset contract
Write the contract: files, columns, formats, manifest, controls, and checks.
Manage file datasets in the Console
Add a file source, create a dataset, and work with days.
How report generation works
The path a report takes, from request to download.
Environment variables
The other Reporter settings.

