File Storage Driver Documentation
This documentation explains the File Storage driver implementation and how connection parameters map to UI fields in the Gigantic application. The driver reads and writes data files (CSV, JSON, YAML, XML, Excel, Parquet and EDI) stored in a folder. The folder can be on the local disk, on a remote server over SSH/SFTP, in Google Drive or in SharePoint.
File Storage is listed under Files & storage in the driver selector. The Local Disk and SSH / SFTP providers are available in the open source license tier; the Google Drive and SharePoint providers require a Cloud license tier.
┌──────────────┐
│ File Storage │ one tap or sink = one folder
└──────┬───────┘
┌───────────────┼───────────────┬──────────────────┐
v v v v
Local Disk SSH / SFTP Google Drive SharePoint
(path) (remote path) (folder ID) (folder item ID)
│ │ │ │
└───────────────┴───────┬───────┴──────────────────┘
v
file format by extension: .csv .json .yaml/.yml .xml
.xlsx/.xls .parquet .edi
v
one file (or sheet) = one entityFile Storage vs CSV Driver
| File Storage | CSV | |
|---|---|---|
| Driver selector | Yes, under Files & storage | No. Kept for existing taps and sinks |
| Formats | CSV, JSON, YAML, XML, Excel, Parquet, EDI | CSV only |
| Location | Local disk, SSH/SFTP, Google Drive, SharePoint | Local disk only |
| CSV options | Fixed: comma delimiter, first row is the header | Delimiter, quote, headers and other options in Custom Params |
| Writing | Writes a new file per entity and run, named by the File Naming options | Writes to the file of the entity |
| Write modes | Truncate and Drop replace the files that earlier runs wrote for the entity | See the CSV driver |
Connection Parameters
The fields of the Connection section depend on the Provider.
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| Provider | providerType (sent as owner) | Where the files are: Local Disk (local), Google Drive (gdrive), SharePoint (sharepoint) or SSH / SFTP (ssh) | Yes | Local Disk |
| Path | basePath (sent as host) | Folder with the files. For SSH / SFTP, the folder on the remote server | Yes | None (must be specified) |
| Folder ID | basePath (sent as host) | Google Drive folder ID or SharePoint folder item ID (shown instead of Path) | Yes | None (must be specified) |
| File pattern | filePattern (sent as dbSchema) | Local Disk only. Only files that match the pattern are used, for example *.csv | No | All supported files |
Google Drive
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| The Type of the Authentication section chooses how the driver logs in to Google Drive: OAuth2 (the default) or Service Account. |
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| Client ID | clientId (sent as database) | OAuth client ID, for example 123456789-xxx.apps.googleusercontent.com. OAuth2 only | Yes, for OAuth2 | None |
| Client Secret | clientSecret (sent as dbSchema) | OAuth client secret, for example GOCSPX-.... OAuth2 only | Yes, for OAuth2 | None |
| Refresh Token | refreshToken (sent as container) | OAuth refresh token of the account that owns or can see the folder. OAuth2 only | Yes, for OAuth2 | None |
| Service account key | serviceAccountKey (sent as the auth privateKey) | JSON key of the service account. Service Account only. It is stored encrypted | Yes, for Service Account | None |
With Service Account the OAuth2 fields are hidden and not required. The folder must be shared with the service account.
SharePoint
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| Client ID | clientId (sent as database) | Application (client) ID of the Microsoft Entra ID app | Yes | None |
| Client Secret | clientSecret (sent as dbSchema) | Client secret of the app | Yes | None |
| Tenant ID | tenantId (sent as container) | Directory (tenant) ID | Yes | None |
| Site ID | siteId (sent as the auth domain) | SharePoint site ID, for example contoso.sharepoint.com,guid1,guid2 | Yes | None |
The driver gets an app-only token (client credentials, scope https://graph.microsoft.com/.default) and uses Microsoft Graph, so the app needs Graph permissions to read and write files in the site.
A siteId in Custom Params overrides the Site ID field.
SSH / SFTP
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| SSH Host | sshHost (sent as database) | Hostname or IP address of the SFTP server | No | localhost |
| SSH Port | sshPort (sent as port) | SSH port | No | 22 |
| Username | sshUser (sent as container) | SSH user | No | Current user |
| Key file path | sshKeyPath (sent as dbSchema) | Private key file on the Gigantics server. ~ is expanded. Hidden for the Private Key authentication | No | ~/.ssh/id_rsa, ~/.ssh/id_ed25519 or ~/.ssh/id_ecdsa |
The Type of the Authentication section chooses how the driver logs in:
| Auth Type | Fields | Description |
|---|---|---|
| Key file | None | The Key file path, or the first default key that exists |
| Password | Password | SSH password of the Username. It is stored encrypted |
| Private Key | Private Key, Passphrase | Content of the private key and its passphrase, if it has one. Both are stored encrypted |
If there is no key and no password the connection fails with SSH authentication required. All the files of the remote Path are used: to use only some of them, set filePattern in Custom Params.
File Naming (sinks only)
| UI Field | Technical Implementation | Description | Required | Default Value |
|---|---|---|---|---|
| Output file names | fileNaming (stored in the sink prefix) | How written files are named: Add timestamp (timestamp), Keep original name (original) or Custom pattern (custom) | No | Add timestamp |
| Pattern | fileNamingPattern | Custom pattern. Shown only for Custom pattern | Yes, for Custom pattern | {entity}_{date}{ext} |
Pattern variables:
| Variable | Value |
|---|---|
{entity} | Entity name, with . replaced by _ |
{name} | Entity name as is |
{date} | Date, YYYY-MM-DD |
{timestamp} | Date and time, YYYY-MM-DD_HH-mm-ss (UTC) |
{ext} | Extension with dot, for example .csv |
{format} | Format, for example csv |
Examples for the entity Filiale read from Filiale.csv:
| Output file names | Written file |
|---|---|
| Add timestamp | Filiale_2026-04-27_10-30-00.csv |
| Keep original name | Filiale.csv |
Custom pattern {entity}_{date}{ext} | Filiale_2026-04-27.csv |
A Custom pattern with an empty pattern falls back to Add timestamp.
Technical Details
Files and entities
- Each file in the folder is an entity. The entity name is the file name without the extension (
customers.csvbecomescustomers) - If two files have the same name with different extensions (
customers.csvandcustomers.json), both entities keep the extension in the name - Only the top level of the folder is read. Subfolders are skipped: use one tap per folder
- Files with an unsupported extension, with no fields, or that cannot be parsed are skipped
- The entity description is
<FORMAT> file: <file name> - The File pattern supports
*(any characters except/) and**(any characters) - Where conditions, limit and offset are applied by Gigantics while reading the file (see Filters applied by Gigantics)
Formats
The format is chosen by the file extension.
| Extension | Format | Reading | Writing |
|---|---|---|---|
.csv | CSV | Comma delimiter. The first row is the header. All fields are strings | Header row; headers and values are quoted |
.json | JSON | A JSON array of objects. If the file starts with {, it is read as JSON Lines (one object per line; invalid lines are skipped). Types come from the first object | JSON array with one object per line |
.yaml, .yml | YAML | A list gives one record per item; a single object gives one record. Types come from the first item | YAML list |
.xml | XML | Records are the repeated child elements under the root element. Attributes become fields and text-only child elements become values | <data> root with one <record> per record |
.xlsx, .xls | Excel | Row 1 is the header (empty headers become column_N). All fields are strings. See the note on workbooks with several sheets below | One .xlsx workbook per entity, with a sheet named Data. The sheets of a workbook with several sheets are written back to one workbook, with the source sheet names |
.parquet | Parquet | Types come from the Parquet schema | Typed optional columns, from the field types. See the mapping below |
.edi | EDI (X12 or EDIFACT) | One record per segment with the fields segment_type and element_1 ... element_N. EDIFACT is detected by the ' and + separators; otherwise X12 | X12 (* element separator, ~ segment terminator) |
Excel notes:
- Old binary Excel 97-2003
.xlsfiles are not supported: they are skipped with the errorold binary Excel 97-2003 (.xls) files are not supported, save the file as .xlsx. A.xlsfile that is an.xlsxworkbook inside is read - A workbook with several sheets gives one entity per sheet, named
<file>.<sheet>: the sheetsCustomersandOrdersofReport.xlsxare the entitiesReport.CustomersandReport.Orders. A workbook with one sheet is the entity<file>
Parquet type mapping when reading. The logical (converted) type of the column comes first, so text columns are strings:
| Parquet Type | Gigantic Type |
|---|---|
| UTF8, ENUM | string |
| DATE, TIMESTAMP_MILLIS, TIMESTAMP_MICROS | date |
| INT_8 ... INT_64, UINT_8 ... UINT_64, TIME_MILLIS, TIME_MICROS | number |
| DECIMAL | float |
| JSON, BSON, MAP, LIST, nested groups | object |
| INT32, INT64, INT96 with no logical type | number |
| FLOAT, DOUBLE | float |
| BOOLEAN | boolean |
| BYTE_ARRAY, FIXED_LEN_BYTE_ARRAY with no logical type, INTERVAL | buffer |
Parquet type mapping when writing:
| Gigantic Type | Parquet Type |
|---|---|
| number | INT64 |
| float | DOUBLE |
| boolean | BOOLEAN |
| date | TIMESTAMP_MILLIS |
| buffer | BYTE_ARRAY |
| object | JSON |
| string and the other types | UTF8 |
A column with a value that does not fit its type (for example a number column with the value n/a) is written as UTF8.
Providers
| Provider | Reading | Writing |
|---|---|---|
| Local Disk | The Path must exist and be a folder | The sink creates the Path, with its parent folders, when it does not exist. A file with the same name is overwritten |
| SSH / SFTP | Uses SFTP. The remote Path must exist and be a folder | The sink creates the remote Path, with its parent folders, when it does not exist. A file with the same name is overwritten |
| Google Drive | The Folder ID must be a folder that the account can see | A file with the same name in the folder is updated with the new content; otherwise a new file is uploaded |
| SharePoint | Reads the folder from the site's default document library (/sites/{siteId}/drive) | Uploads the file to the folder. A file with the same name is overwritten |
Output format
Each entity is written in the format of its source file, with the same extension (Excel entities are always written as .xlsx). Entities that do not come from a file (for example the tables of a database tap) are written as CSV.
The Test button checks that the Path exists, also for a sink: a sink whose Path is not created yet fails the test, but creates the Path when it runs.
Write modes
The File Storage driver writes one file per entity and run. The write mode decides what happens to the files of earlier runs:
| Write mode | Files of earlier runs |
|---|---|
| Truncate, Drop | Removed before the new file is written, with every provider. These are the files of the folder whose names match the Output file names of the entity, with any date or timestamp: for Filiale with Add timestamp, Filiale_2026-04-27_10-30-00.csv is removed and Filiale_notes.csv is kept |
| Append, Update, Merge | Kept. No file is emptied or appended to |
With Add timestamp and Append, each run adds a new file. A file with the same name as the new one is always replaced, in every mode.
Write batches are 1000 records unless the job or rule sets another write batch size. Retry On Fail has no effect on this driver.
Authentication Options
| Auth Type | UI Mapping | Description |
|---|---|---|
| None | Local Disk and SharePoint | Credentials are given in the provider fields of the Connection section or in Custom Params |
| Key file | SSH / SFTP | The Key file path, or a default key |
| Password | SSH / SFTP | Password field |
| Private Key | SSH / SFTP | Private Key and Passphrase fields |
| OAuth2 | Google Drive | Client ID, Client Secret and Refresh Token of the Connection section |
| Service Account | Google Drive | Service account key field |
Changing the Provider sets the authentication back to the first option of the provider.
SSH Tunnel Support
The form shows the Enable SSH? option, but the File Storage driver does not use SSH tunnels. To reach files on a remote server, use the SSH / SFTP provider.
API Endpoints Used
File Storage connections are used in:
- Tap creation (data source discovery from files)
- Sink creation (data destination for anonymized data as files)
- Pipeline execution (data extraction from and loading to files)
Node.js Driver Dependencies
| Purpose | Library |
|---|---|
| CSV | fast-csv |
| JSON | JSONStream |
| YAML | js-yaml |
| XML | xml2js |
| Excel | exceljs |
| Parquet | @dsnp/parquetjs |
| SSH / SFTP | ssh2 |
| Google Drive | googleapis |
Custom Params
Custom Params (YAML) are merged into the driver configuration, so they can set or override any of these keys:
# All providers
basePath: /data/input # Overrides Path / Folder ID
filePattern: "*.json" # Overrides File pattern
providerType: local # local, ssh, gdrive or sharepoint
# Sinks
fileNaming: custom # timestamp, original or custom
fileNamingPattern: "{entity}_{date}{ext}"
# SSH / SFTP
sshPassword: secret # Password login (or the Password authentication)
sshKeyContent: | # Private key content instead of a key file
-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
sshPassphrase: secret # Passphrase of the private key
# Google Drive
serviceAccountKey: | # Service account JSON key (or the Service Account authentication)
{ "type": "service_account", "client_email": "...", "private_key": "..." }
# SharePoint
siteId: contoso.sharepoint.com,guid1,guid2 # Overrides the Site ID fieldExample Configurations
SFTP with a password from a variable
Provider SSH / SFTP, Path /home/data/export, SSH Host sftp.example.com, Username gig, authentication Key file. The password comes from the Gigantics variable SFTP_PASSWORD, so it is set in Custom Params instead of the Password field:
sshPassword: $SFTP_PASSWORDSFTP, only the CSV files
Provider SSH / SFTP, any authentication:
filePattern: "*.csv"Google Drive with a service account
Provider Google Drive, Folder ID of a folder shared with the service account, authentication Service Account, and the JSON key in Service account key:
{ "type": "service_account", "client_email": "gig@project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" }