Drivers

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 entity

File Storage vs CSV Driver

File StorageCSV
Driver selectorYes, under Files & storageNo. Kept for existing taps and sinks
FormatsCSV, JSON, YAML, XML, Excel, Parquet, EDICSV only
LocationLocal disk, SSH/SFTP, Google Drive, SharePointLocal disk only
CSV optionsFixed: comma delimiter, first row is the headerDelimiter, quote, headers and other options in Custom Params
WritingWrites a new file per entity and run, named by the File Naming optionsWrites to the file of the entity
Write modesTruncate and Drop replace the files that earlier runs wrote for the entitySee the CSV driver

Connection Parameters

The fields of the Connection section depend on the Provider.

UI FieldTechnical ImplementationDescriptionRequiredDefault Value
ProviderproviderType (sent as owner)Where the files are: Local Disk (local), Google Drive (gdrive), SharePoint (sharepoint) or SSH / SFTP (ssh)YesLocal Disk
PathbasePath (sent as host)Folder with the files. For SSH / SFTP, the folder on the remote serverYesNone (must be specified)
Folder IDbasePath (sent as host)Google Drive folder ID or SharePoint folder item ID (shown instead of Path)YesNone (must be specified)
File patternfilePattern (sent as dbSchema)Local Disk only. Only files that match the pattern are used, for example *.csvNoAll supported files

Google Drive

UI FieldTechnical ImplementationDescriptionRequiredDefault Value
The Type of the Authentication section chooses how the driver logs in to Google Drive: OAuth2 (the default) or Service Account.
UI FieldTechnical ImplementationDescriptionRequiredDefault Value
Client IDclientId (sent as database)OAuth client ID, for example 123456789-xxx.apps.googleusercontent.com. OAuth2 onlyYes, for OAuth2None
Client SecretclientSecret (sent as dbSchema)OAuth client secret, for example GOCSPX-.... OAuth2 onlyYes, for OAuth2None
Refresh TokenrefreshToken (sent as container)OAuth refresh token of the account that owns or can see the folder. OAuth2 onlyYes, for OAuth2None
Service account keyserviceAccountKey (sent as the auth privateKey)JSON key of the service account. Service Account only. It is stored encryptedYes, for Service AccountNone

With Service Account the OAuth2 fields are hidden and not required. The folder must be shared with the service account.

SharePoint

UI FieldTechnical ImplementationDescriptionRequiredDefault Value
Client IDclientId (sent as database)Application (client) ID of the Microsoft Entra ID appYesNone
Client SecretclientSecret (sent as dbSchema)Client secret of the appYesNone
Tenant IDtenantId (sent as container)Directory (tenant) IDYesNone
Site IDsiteId (sent as the auth domain)SharePoint site ID, for example contoso.sharepoint.com,guid1,guid2YesNone

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 FieldTechnical ImplementationDescriptionRequiredDefault Value
SSH HostsshHost (sent as database)Hostname or IP address of the SFTP serverNolocalhost
SSH PortsshPort (sent as port)SSH portNo22
UsernamesshUser (sent as container)SSH userNoCurrent user
Key file pathsshKeyPath (sent as dbSchema)Private key file on the Gigantics server. ~ is expanded. Hidden for the Private Key authenticationNo~/.ssh/id_rsa, ~/.ssh/id_ed25519 or ~/.ssh/id_ecdsa

The Type of the Authentication section chooses how the driver logs in:

Auth TypeFieldsDescription
Key fileNoneThe Key file path, or the first default key that exists
PasswordPasswordSSH password of the Username. It is stored encrypted
Private KeyPrivate Key, PassphraseContent 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 FieldTechnical ImplementationDescriptionRequiredDefault Value
Output file namesfileNaming (stored in the sink prefix)How written files are named: Add timestamp (timestamp), Keep original name (original) or Custom pattern (custom)NoAdd timestamp
PatternfileNamingPatternCustom pattern. Shown only for Custom patternYes, for Custom pattern{entity}_{date}{ext}

Pattern variables:

VariableValue
{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 namesWritten file
Add timestampFiliale_2026-04-27_10-30-00.csv
Keep original nameFiliale.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.csv becomes customers)
  • If two files have the same name with different extensions (customers.csv and customers.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.

ExtensionFormatReadingWriting
.csvCSVComma delimiter. The first row is the header. All fields are stringsHeader row; headers and values are quoted
.jsonJSONA 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 objectJSON array with one object per line
.yaml, .ymlYAMLA list gives one record per item; a single object gives one record. Types come from the first itemYAML list
.xmlXMLRecords 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, .xlsExcelRow 1 is the header (empty headers become column_N). All fields are strings. See the note on workbooks with several sheets belowOne .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
.parquetParquetTypes come from the Parquet schemaTyped optional columns, from the field types. See the mapping below
.ediEDI (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 X12X12 (* element separator, ~ segment terminator)

Excel notes:

  • Old binary Excel 97-2003 .xls files are not supported: they are skipped with the error old binary Excel 97-2003 (.xls) files are not supported, save the file as .xlsx. A .xls file that is an .xlsx workbook inside is read
  • A workbook with several sheets gives one entity per sheet, named <file>.<sheet>: the sheets Customers and Orders of Report.xlsx are the entities Report.Customers and Report.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 TypeGigantic Type
UTF8, ENUMstring
DATE, TIMESTAMP_MILLIS, TIMESTAMP_MICROSdate
INT_8 ... INT_64, UINT_8 ... UINT_64, TIME_MILLIS, TIME_MICROSnumber
DECIMALfloat
JSON, BSON, MAP, LIST, nested groupsobject
INT32, INT64, INT96 with no logical typenumber
FLOAT, DOUBLEfloat
BOOLEANboolean
BYTE_ARRAY, FIXED_LEN_BYTE_ARRAY with no logical type, INTERVALbuffer

Parquet type mapping when writing:

Gigantic TypeParquet Type
numberINT64
floatDOUBLE
booleanBOOLEAN
dateTIMESTAMP_MILLIS
bufferBYTE_ARRAY
objectJSON
string and the other typesUTF8

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

ProviderReadingWriting
Local DiskThe Path must exist and be a folderThe sink creates the Path, with its parent folders, when it does not exist. A file with the same name is overwritten
SSH / SFTPUses SFTP. The remote Path must exist and be a folderThe sink creates the remote Path, with its parent folders, when it does not exist. A file with the same name is overwritten
Google DriveThe Folder ID must be a folder that the account can seeA file with the same name in the folder is updated with the new content; otherwise a new file is uploaded
SharePointReads 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 modeFiles of earlier runs
Truncate, DropRemoved 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, MergeKept. 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 TypeUI MappingDescription
NoneLocal Disk and SharePointCredentials are given in the provider fields of the Connection section or in Custom Params
Key fileSSH / SFTPThe Key file path, or a default key
PasswordSSH / SFTPPassword field
Private KeySSH / SFTPPrivate Key and Passphrase fields
OAuth2Google DriveClient ID, Client Secret and Refresh Token of the Connection section
Service AccountGoogle DriveService 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

PurposeLibrary
CSVfast-csv
JSONJSONStream
YAMLjs-yaml
XMLxml2js
Excelexceljs
Parquet@dsnp/parquetjs
SSH / SFTPssh2
Google Drivegoogleapis

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 field

Example 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_PASSWORD

SFTP, 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" }