SEC Form 4 MariaDB Inserter icon

SEC Form 4 MariaDB Inserter

Inserts or updates parsed SEC Form 4 filing data into MariaDB/MySQL tables

SEC Form 4 MariaDB Inserter

AI-generated

Summary

Upserts parsed SEC Form 4 filing items into MariaDB/MySQL tables, optionally creating the schema first, and returns per-filing row counts.

Inputs

  • Table Prefix — Prefix prepended to all table names (default "sec_"). Tables used: issuers, reporting_owners, filings, filing_owners, non_derivative_transactions, derivative_transactions, non_derivative_holdings, derivative_holdings, footnotes, signatures.
  • Create Tables If Missing — If true (default), runs CREATE TABLE IF NOT EXISTS for all ten tables once before processing items.
  • Input items (json) (required) — Each incoming item's JSON must be a parsed Form 4 object with filing, issuers, reportingOwners, nonDerivativeTransactions, derivativeTransactions, nonDerivativeHoldings, derivativeHoldings, footnotes and signatures, typically from the SEC Form 4 parser node.
  • MySQL credential (mySqlApi) (required) — Host, port, database, user and password for the target database.

Output shape

One output item per input item, with counts: accessionNumber, issuersUpserted, ownersUpserted, filingOwnersUpserted, nonDerivativeTransactions, derivativeTransactions, nonDerivativeHoldings, derivativeHoldings, footnotes and signatures.

Each filing is written in its own transaction and rolled back on error. Rows are upserted with INSERT ... ON DUPLICATE KEY UPDATE, keyed by accession number plus id where applicable, so re-running is idempotent. With Continue On Fail enabled, a failed item yields {error: message}. Otherwise the node throws. Output items are paired to their input items. The table prefix is interpolated into SQL without sanitising, so use only trusted values.

Examples

Example 1: Store parsed Form 4 filings in a new database, creating the schema automatically.

Table Prefix: sec_, Create Tables If Missing: true, with a MySQL credential.

Example 2: Write to a database whose tables already exist, using a custom prefix.

Table Prefix: insider_, Create Tables If Missing: false.

Links

Discussion