TIP/MIS External Feed Processing
Comprehensive documentation of the TIP (Third-party Information Processing) and MIS external data feed pipelines — including all configuration tables, staging tables, stored procedures, validation logic, and SUPPLEMENTAL table integration.
1. Overview
TIP/MIS is the system that ingests data supplied by external classification societies, flag state registers, PSC inspection databases, shipbuilder return feeds, and other third-party maritime data providers. Incoming data is staged, compared against the live Lloyd's Register Fleet (LRF) database, validated, and — subject to analyst review or automatic rules — applied to the master ABSD_ tables.
The system serves two distinct consumer workflows:
- Analyst review workflow — A data analyst sees flagged differences between incoming external data and the current LR record, and chooses to Keep, Learn, or Overwrite each field value.
- Automated nightly processing — Scheduled jobs automatically apply validated external data for pre-approved field/source combinations without manual intervention.
2. Architecture — Two Processing Pipelines
TIP/MIS runs two distinct technical pipelines that serve the same logical purpose but operate differently:
Pipeline A — Classic (tblThirdPartyData)
The original field-level ETL pipeline. Each inbound field value is stored as an individual row in tblThirdPartyData, with explicit type columns (VarcharValue, IntValue, DecimalValue, DatetimeValue). Source-specific loading SPs translate raw staging table columns into these normalised rows. After load, comparison and validation SPs mark each record, and an analyst UI or auto-process job acts on unprocessed records.
Key sources: PSC, SBR (Shipbuilder Returns), NK, BV, RINA, DNV, Malta, all TIP_* table-backed sources.
Pipeline B — FlexTemp / Modern (tblTIPMISFlexTemp)
A key-value staging pipeline introduced to handle configurable external feeds without writing new loading code per source. Inbound data is stored as (KEY=LRNO, Source, SourceColumnName, ColumnValue) rows. A mapping table (tblTIPMISMappings) translates source column names to LR target fields. Business rules and manipulation rules engines apply transforms before validation and application.
Key sources: Sources managed via the MIS UI where field mapping is configured dynamically, not hard-coded.
Both pipelines share the same downstream action vocabulary (Keep / Learn / Overwrite / Insert) and the same configuration tables for validation rules and auto-process settings.
End-to-End Flow Diagram
EXTERNAL SOURCE FILE / TABLE
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PIPELINE A — Classic │
│ TIP_*/BV_Xml/PSC source table ──► spTIPPSCLoad │
│ spImportSBRIntoTIP │
│ (source-specific SPs) │
│ ▼ INSERT rows │
│ tblThirdPartyData │
│ (LRNO, TableName, FieldName, Source, VarcharValue, ...) │
└─────────────────────────────────────────────────────────────┘
│
▼ (same for both pipelines after staging)
│
┌─────────────────────────────────────────────────────────────┐
│ PIPELINE B — FlexTemp │
│ CSV/Delimited file ──► spTIPMISProcessSource (DataLoad) │
│ tblTIPMISMappings (field mapping) │
│ ▼ INSERT rows │
│ tblTIPMISFlexTemp │
│ (KEY=LRNO, Source, SourceColumnName, ColumnValue, ...) │
│ spTIPMISHandleOnetoManyMappings │
│ spTIPMISManipulationRulesEngine (DM transforms) │
│ spTIPMISBusinessRule_Flextemp_Update (BR validation) │
└─────────────────────────────────────────────────────────────┘
│
▼ (both pipelines converge)
│
┌─────────────────────────────────────────────────────────────┐
│ LRNO DERIVATION (if needed) │
│ spTIPDeriveLRNO ──► tblThirdPartyDeriveLRNO config │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PREVIOUS SUPPLY COMPARISON │
│ spTIPMISProcessPreviousSupply │
│ — Marks Processed=2 if matches prior manual supply │
│ — Marks Processed=1 if matches prior auto supply │
│ — Marks older records for same field Processed=1 (superseded)│
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ LRF CURRENT COMPARISON │
│ spTIPMISProcessCurrentVarcharAgainstLRF │
│ — Dynamic SQL JOIN against live ABSD_ table │
│ — Levenshtein distance OR exact collation match │
│ — Marks Processed=1 if value already matches LRF │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ VALIDATION │
│ spTIPMISValidateVarchar │
│ — Min/Max length checks │
│ — Regex pattern match (dbo.find_regular_expression) │
│ — Sets Validated=0 (fail) or Validated=1 (pass) │
└─────────────────────────────────────────────────────────────┘
│
├──────────────────────────────────────────────────────┐
▼ (Processed=0, Validated=1: needs action) ▼ (Auto)
┌─────────────────────────────┐ ┌──────────────────────────────┐
│ ANALYST REVIEW UI │ │ AUTO PROCESSING │
│ spTIPLRDataByField │ │ spTIPAutoProcessVarcharValues│
│ — Shows current LRF value │ │ — AutoOverwrite=ZeroOrNull │
│ — Shows change history │ │ or All per tblThirdParty │
│ — Decode view lookup │ │ AutoProcess │
│ — TIPInd flag (pending) │ │ — Calls spTIPProcessUpdate │
└──────────────┬──────────────┘ └──────────────────────────────┘
│ Analyst action
▼
┌─────────────────────────────────────────────────────────────┐
│ ACTION PROCESSING — spTIPProcessUpdate │
│ Keep ► UPDATE tblThirdPartyData SET Processed=2 │
│ Learn ► INSERT tblThirdPartyMatchedValues │
│ Overwrite/Insert ► Dynamic UPDATE on ABSD_ table │
│ EFD special case for G01_NAME / new-con vessels │
│ B04_CNTY adds B04_TOWN from vwPortDecode │
│ Marks Processed=2 on success │
└─────────────────────────────────────────────────────────────┘
│
▼
ABSD_ MASTER TABLES UPDATED
3. Configuration Tables
tblThirdPartySource — Source Registry
Master registry of all external data sources. Every row in tblThirdPartyData has a FK to this table via Source.
| Column | Type | Description |
|---|---|---|
| SourceName | varchar PK | Short source code (e.g. 'NK', 'PSC', 'BV', 'SBR', 'DNV') |
| SourceNote | varchar(500) | Human-readable description of the source |
| DeleteCriteria | varchar(2000) | SQL fragment used when purging old supply data |
| FileNameRule | varchar(255) | Pattern/rule for expected incoming file name |
| ArchiveFolder | varchar(255) | Path where processed source files are moved |
| RejectedFolder | varchar(255) | Path where rejected/failed files are moved |
| MappingName | varchar(255) | For FlexTemp sources: the mapping name used in tblTIPMISMappings |
| SoftDeleted | bit default 0 | 1 = source logically deleted but record retained |
| FlagSource | char(3) | 3-character flag state code for flag register sources |
tblThirdPartyData — Classic Pipeline Staging
Central staging table for the Classic pipeline. One row per field value per supply. Supports four data types in typed columns.
| Column | Type | Description |
|---|---|---|
| DataID | int IDENTITY PK | Surrogate key |
| LRNO | char(7) | LR ship number (derived or supplied by source) |
| TableName | varchar | Target ABSD_ table or virtual view name (e.g. 'ABSD_OVGE', 'vwTIPOwnerDetails') |
| FieldName | varchar | Target field name (e.g. 'G01_NAME', 'B01_CALLSIGN') |
| Source | varchar FK→tblThirdPartySource | Source code |
| DateOriginated | datetime | Date the data was originated at the source (e.g. inspection date) |
| DateReceived | datetime | Date the record was loaded into this table |
| VarcharValue | varchar(4000) | String value (used for most fields) |
| IntValue | int | Integer value (e.g. gross tonnage) |
| DecimalValue | decimal(22,15) | Decimal value (e.g. LOA, draught) |
| DatetimeValue | datetime | Date value |
| Annotation | varchar | Optional annotation text |
| Validated | tinyint | 0=failed validation, 1=passed (default) |
| Processed | tinyint default 0 | 0=pending, 1=matched/auto-processed, 2=manually reviewed/kept/overwritten |
| ValidatedForAutoUpdate | bit | 1=cleared for auto-update (no SP override needed) |
| DoNotAutoProcess | bit default 0 | 1=excluded from nightly auto-processing |
| EmailAlertSent | bit | 1=exception email already sent for this record |
| OWCODE | varchar default 'n/a' | Owner code for owner-type fields |
| PortID | varchar default 'n/a' | Port identifier for port-type fields |
| MultipartKeyPart3 | varchar | 3rd part of multi-part key (e.g. SEQNO for history tables) |
| MultipartKeyPart4 | varchar | 4th part of multi-part key |
| AutoUpdateFailure | varchar(2000) | Error message if auto-update attempt failed |
Key Indexes
IX_PreviousSupplyVarchar— COVERING index on (LRNO, TableName, FieldName, Source, DateReceived, Processed) INCLUDE (VarcharValue) — critical for spTIPMISProcessPreviousSupply cursor performanceSourceindex — (Source, LRNO, Validated, Processed, TableName, FieldName) — supports per-source analyst queries
tblTIPMISFlexTemp — FlexTemp Pipeline Staging
Key-value staging table for the modern FlexTemp pipeline. Each row holds one source column value for one vessel in one supply batch.
| Column | Type | Description |
|---|---|---|
| AutoID | int IDENTITY PK | Surrogate key |
| KEY | varchar(7) | LRNO — the vessel identifier |
| Source | varchar(10) | Source code FK→tblThirdPartySource |
| SourceMonth | varchar(50) | Month label of the supply (partitioning) |
| SourceYear | varchar(20) | Year label of the supply (partitioning) |
| DateLoaded | datetime | Timestamp when batch was loaded |
| FileName | varchar(30) | Source file name this record came from |
| SourceColumnName | varchar(100) | Column name as supplied by source (before mapping) |
| ColumnName | varchar(30) | Mapped LR field name (populated by mapping engine) |
| TableName | varchar(50) | Target ABSD_ table name (populated by mapping engine) |
| ColumnValue | varchar(8000) | The actual data value (all types stored as string) |
| Criteria1 | varchar(50) | Additional filter criterion 1 (e.g. SEQNO) |
| Criteria2 | varchar(50) | Additional filter criterion 2 |
| Validated | tinyint default 1 | 1=pass, 0=fail length/regex, 2=BR fail, 3/4/5=other fail codes |
| Processed | tinyint default 0 | 0=pending, 1=matched/applied, 2=matched to previous manual |
| ValidationFailureReason | varchar(255) | Human-readable reason for validation failure |
Key Indexes
idxDMRuleProcessing— (KEY, Source, SourceMonth, SourceColumnName) — used by manipulation rules engineidxKey— KEY alone, for per-vessel lookupidxSource,idxSourceColumnName— supporting analyst queries
tblTIPMISMappings — FlexTemp Field Mapping
Maps source column names to LR target field names for each FlexTemp source. The Mapped flag controls processing behaviour.
| Column | Type | Mapped Values & Meaning |
|---|---|---|
| MappingID | int IDENTITY PK | Surrogate key |
| SourceName | varchar(100) | Source code |
| SourceFieldName | varchar(100) | Column name in the source file as received |
| MainGroup | varchar(255) | Display grouping (from tblTIPMISFieldGlossaryMainGroup) |
| SubGroup | varchar(255) | Display sub-grouping |
| FieldName | varchar(50) | LR target field name (after mapping) |
| Mapped | varchar(2) | 'Y'=mapped to LR field; 'N'=received but unmapped; 'K'=key field (LRNO identifier) |
| TableName | varchar(255) | Target ABSD_ table name |
tblThirdPartyValidation — Validation Rules per Field
One row per (TableName, FieldName) combination defining all validation and processing rules for that field in the Classic pipeline.
| Column | Type | Description |
|---|---|---|
| TableName + FieldName + Precedence | Composite PK | Identifies the target field; Precedence allows multiple rule sets |
| RegularExpression | varchar(255) | Regex pattern applied via dbo.find_regular_expression |
| RegularExpressionLen | int | Expected match length appended as {n} suffix to the regex |
| MinLength / MaxLength | int | Allowed string length bounds; values outside → Validated=0 |
| MinimumValue / MaximumValue | decimal | Numeric range for int/decimal fields |
| AllowedPercentageVariation | decimal | Percentage tolerance for numeric comparisons |
| LevensteinEditDistanceMax | int | If >0, use Levenshtein distance ≤ this value for LRF comparison instead of exact match |
| StoredProcedure | varchar(500) | Override SP called before standard validation (e.g. spValidateMMSI) |
| HistStoredProcedure | varchar(500) | Historical data SP override |
| SequenceNumberColumn | varchar(50) | Column name holding SEQNO in multi-row target tables (e.g. ABSD_HIFL) |
| CurrentOrFirstSequence | varchar(3) | Which SEQNO to target for auto-update (e.g. '00' = primary record) |
| EffDateField | varchar(50) | Column name of the effective date field for display/update |
| AnnotationName | varchar(50) | English field name used in tblChanges annotation entries |
| DecodeView | varchar(500) | View name providing Code→Decode lookup for coded fields (e.g. flag, ship type) |
| ProcessOrder | int | Sequence for auto-processing when field order matters |
| MultiPartKeyPart3 / 4 | varchar | Additional key column names for multi-part keyed tables |
| Updatable | bit | 1=field can be overwritten by TIP; 0=read-only in this context |
| EmailExceptionsTo | varchar | Email address for exception alerts on this field |
tblThirdPartyAutoProcess — Auto-Update Rules
Defines which (Source, TableName, FieldName) combinations are eligible for nightly automated processing, and the overwrite mode.
| Column | Type | Description |
|---|---|---|
| SourceName | varchar PK (part) | FK→tblThirdPartySource |
| TableName | varchar PK (part) | Target ABSD_ table |
| FieldName | varchar PK (part) | Target field; also FK→tblThirdPartyValidation |
| AutoOverwrite | varchar FK→tblThirdPartyOverwrites | 'ZeroOrNull'=only update if LRF value is null or 'U'; 'All'=always overwrite |
| Precedence | int | Source priority when multiple sources supply same field |
tblThirdPartyMatchedValues — Learned Value Mappings
Stores "learned" mappings between source values and the LR canonical values that analysts have accepted. Used to automatically match future identical incoming values.
| Column | Description |
|---|---|
| ID | int IDENTITY PK |
| TableName | Target ABSD_ table |
| FieldName | Target field |
| Source | Source code |
| VarcharValue | The incoming source value (up to 4000 chars) |
| LRFValue | The accepted LRF canonical value |
Business Rules & Manipulation Rules Engine Tables
tblTIPMISBrHdr / tblTIPMISBrDtl — Business Rules
Define validation rules that operate on FlexTemp data. Rules are evaluated per field per source; records failing a rule have their Validated set to 2 with RuleErrorMsg.
| Column | Table | Description |
|---|---|---|
| RuleID | Hdr | PK; int IDENTITY |
| RuleName | Hdr/Dtl | Descriptive name of the rule |
| RuleSQLScript | Hdr | Full dynamic SQL that returns AutoIDs of rows passing the rule |
| Source | Hdr | Comma-separated source codes, or 'ALL' for all sources |
| RuleErrorMsg | Hdr | Message stored in ValidationFailureReason when rule is violated |
| SoftDeleted | Hdr | 1=rule disabled |
| DisplayFieldName | Dtl | FK→vwTIPMISFieldGlossary.DisplayFieldName; field the rule applies to |
| Operator / ValueType / ActualValue / Condition | Dtl | Rule detail parameters for the multi-source rule variant |
tblTIPMISManipulationHdr / tblTIPMISManipulationDtl — Data Manipulation Rules
Define field transformation rules applied before validation in the FlexTemp pipeline. Supports concatenation, replacement, and custom SQL transforms.
| Column | Table | Description |
|---|---|---|
| RuleID | Hdr | PK; int IDENTITY |
| RuleName | Hdr | Descriptive name |
| RuleSQLScript | Hdr | Full SELECT SQL producing transformed values |
| Source | Hdr | Applicable source codes |
| RuleField | Hdr | Target field(s) |
| QueryFlag | Hdr | char(1) flag controlling execution mode |
| Approved / SoftDeleted | Hdr | Approval/active flags |
| DateRuleApplied | Hdr | Last execution timestamp |
| RuleDetailID | Dtl | PK; int IDENTITY |
| Function | Dtl | Transform function name (e.g. REPLACE, SUBSTRING, CONVERT) |
| FunctionValueTo / FunctionValueFor | Dtl | Parameters for the transform function |
| Concatenated | Dtl | bit; 1=this detail is a concatenation step |
| Seperator | Dtl | Separator string for concatenation |
tblThirdPartyDeriveLRNO and supporting tables
Configuration for the LRNO derivation process when a source does not supply LRNO directly.
| Table | Key Columns | Purpose |
|---|---|---|
| tblThirdPartyDeriveLRNO | SourceNo, Source, SourceTableName, SourceIMoColumnName | Master config: which source table to match from, which column holds the IMO/identifier |
| tblThirdPartyDeriveLRNO_Columns | BatchNo, BatchSeq, ColumnExpression | JOIN column expressions with optional FunctionApplied transforms |
| tblThirdPartyDeriveLRNO_IHSCColumn | IHSCColumnName | LR-side column name to match against |
| tblThirdPartyDeriveLRNO_IHSCTable | IHSCTableName | LR-side table to match against |
| tblThirdPartyDeriveLRNOUpdated | LRNO, SourceTableName, SourceIMO | Records derivation results for audit |
4. External Source Tables
TIP_* Staging Tables (~40 tables)
Each external classification society or flag register that feeds the Classic pipeline has a dedicated raw staging table. Data is loaded from source files into these tables, then source-specific SPs or generic loading procedures translate them into tblThirdPartyData rows.
Known TIP_* tables:
TIP_AzerbaijanTIP_BelizeTIP_BKITIP_BulgariaTIP_Canadian_FlagStateTIP_CKITIP_CyprusTIP_DNVTIP_GEUTIP_HondurasTIP_IR_NewTIP_KapowTIP_KapowPanamaTIP_KapowSMCTIP_KOLTIP_KoreaTIP_Korea_CleanTIP_LTHTIP_MaltaTIP_MongoliaTIP_NetherlandsTIP_NK_ShipsTIP_NK_OwnersTIP_RinaShip_DataTIP_RinaEnginesTIP_RinaNewBuildingsTIP_RinaOwner_DetailsTIP_RSTIP_ShipBuilderReturnsTIP_SIETIP_StVincentTIP_Swedish_FlagStateTIP_TLTIP_TZZTIP_UKEtblTIP_CCStblTIP_IOMtblTIP_IR2tblTIP_PAN3tblTIP_TL2
TIP_NK_Ships — Example Column Structure (Nippon Kaiji Kyokai)
Illustrates the structure of a typical classification society supply table. All data columns are varchar to accommodate raw input without transformation.
| Column | Description |
|---|---|
| AUTO_ID | int IDENTITY PK |
| LRNO | char(7) — LR number (pre-matched by source or derived) |
| CLASS_NO | NK class number |
| SIGNAL_CODE | Call sign |
| FLAG_NAME | Flag state name |
| PORT_NAME | Port of registry |
| SHIP_ENAME | Ship name in English |
| CLASS_CHAR / INST_CHAR / SP_DESC | Class character, instructions, special descriptors |
| REG_GT / REG_NT | Registered gross and net tonnage |
| TM69_GT / TM69_NT | Tonnage Measurement 1969 values |
| ASGN_DW / ASGN_DRAFT | Assigned deadweight and draft |
| LOA | Length overall |
| ENGINE_1..2 / ENGINE_POWER_1..2 | Engine details including manufacturer, power, RPM, bore/stroke |
| BOILER_1..3 | Boiler details (pressure, evaporation, manufacturer) |
| YARD_NAME_1..2 / HULL_NO_1..2 | Shipyard and hull number |
| KEEL_LAID_DATE / LAUNCH_DATE / COMPLETE_DATE / RC_COMP_DATE | Construction milestone dates |
BV XML Supply Tables — Bureau Veritas
Bureau Veritas supplies data as XML files which are parsed into a family of related tables. All columns are varchar(1000) to accommodate the XML-extracted raw values.
| Table | Key Columns |
|---|---|
| BV_XmlDataSupply_Ships | ShipName, BVRegNo, LRNO, CallSign, Flag, ShipType, RegOwnName, ManName, ComOwnName, Port — plus full Dimensions (GT/NT/DWT/LOA/Breadth/Depth/Draught), Hull (YearOfBuild, Shipyard, HullNo, Compartments, Decks), Propulsion (Type, Builder, Units, Power kW/HP), Refrigerating installation, Last survey dates |
| BV_XmlDataSupply_Engines | Engine details per vessel: type, maker, power, cylinders, bore/stroke |
| BV_XmlDataSupply_Owners | Owner company details: name, BV code, address, country |
| BV_XmlDataSupply_NewBuildings | New construction data: keel/launch/delivery dates, yard, hull number |
| BV_XmlDataSupply_Boilers | Boiler specifications per vessel |
| BV_XmlDataSupply_DOCCompanies | Document of Compliance company details |
PSC & SBR — Internal-Source Loaders
spTIPPSCLoad — Port State Control Weekly Import
Loads inspection data from ABSD_INSPECTION (the internal PSC inspection table) into tblThirdPartyData. Pulls the most recent inspection per vessel within the last 2 weeks and extracts 7 field values per vessel.
Fields loaded per vessel from PSC:
| TableName (virtual) | FieldName | Source column | Transform |
|---|---|---|---|
| ABSD_OVNA | G01_NAME | ShipName | dbo.fnTidyShipname(UPPER(...)) |
| ABSD_OVGE | B01_CALLSIGN | callsign | UPPER |
| vwProductionSearch | ClassBasic | class | dbo.proper(); excludes 'Other (Class Not Specified)', 'N.A', 'Unspecified' |
| vwTIPOwnerDetails | RegOwnerName | owner | dbo.proper() |
| vwTIPShipManagerDetails | ShipManName | manager | dbo.proper() |
| vwTIPTechManDetails | TechManName | manager | dbo.proper() |
| vwTIPBBCDetails | BBCName | charterer | dbo.proper() |
After loading, spTIPPSCLoad calls the full processing chain: spTIPProcessPreviousSupply, spTIPProcessCurrentAgainstLRF (for each field), spTIPValidate (for each field), and spTIPProcessLowerImportanceData.
LEFT JOIN ... WHERE ... IS NULL rather than the old NOT IN (subquery) form for performance.spImportSBRIntoTIP — Shipbuilder Returns Import
Loads data from TIP_ShipBuilderReturns (shipyards' return submissions) into tblThirdPartyData. Extracts 21 distinct field values per vessel.
Fields loaded per vessel from SBR:
| TableName | FieldName | Source column | Type |
|---|---|---|---|
| ABSD_OVNA | G01_NAME | ShipName | varchar |
| vwProductionSearch | ShipTypeLevel3 | ShipTypeLevel4 | varchar |
| vwProductionSearch | HullType | HullType | varchar |
| vwTIPOwnerDetails | RegOwnerName | RegisteredOwner | varchar |
| vwTIPShipManagerDetails | ShipManName | ShipManager | varchar |
| ABSD_SHIP_SEARCH | FlagName | FlagName | varchar |
| vwProductionSearch | ClassBasic | ClassificationSociety | varchar |
| ABSD_HITL | B07_GROSS | GrossTonnage | int (ROUND 0) |
| ABSD_HIDR | C07_DWTL | Deadweight | int |
| ABSD_HILE | C02_LOA | LengthOverallLOA | decimal(18,3) |
| ABSD_HIBR | C09_MLD | BreadthMoulded | decimal(18,3) |
| ABSD_HIDR | C07_DL | Draught | decimal(18,3) |
| vwProductionSearch | YardNoSBR | YardNumber | varchar |
| vwProductionSearch | ShipbuilderSubContractorSBR | ShipBuilderSubContractor | varchar |
| vwProductionSearch | SubContractorYardNoSBR | ShipBuilderSubContractorShipYardYardHullNo | varchar |
| vwProductionSearch | ShipBuilderSBR | ShipBuilder | varchar |
| vwYearOfBuild | YearOfBuild | YearOfBuild | varchar |
| vwProductionSearch | CapacityNarrative | CargoCapacitiesNarrative | varchar |
| vwProductionSearch | EngineMakeLargest | MainEngineDesigner | varchar |
| vwProductionSearch | EngineModelLargest | MainEngineModel | varchar |
| vwProductionSearch | PropulsionUnits | NumberOfPropulsionUnits | int |
| ABSD_SHIP_SEARCH | Status | ShipStatus | varchar |
| vwProductionSearch | KeelLaidDateBest | KeelLaidDate | varchar |
| vwProductionSearch | LaunchDateBest | LaunchDate | varchar |
| vwProductionSearch | DeliveryDateBest | DateOfBuild | varchar |
| ABSD_NCON | GNTE / FABN | comments1 / comments2 | varchar |
5. Classic Pipeline — Detailed Processing
5.1 Data Loading
The Classic pipeline loads data via source-specific stored procedures that SELECT from the appropriate TIP_* or BV_* staging table and INSERT normalised rows into tblThirdPartyData. The pattern used by PSC and SBR (above) is representative. Key characteristics:
- All INSERT statements explicitly name all columns — no
INSERT INTO ... SELECT * - Loaded rows always start with
Processed=0, Validated=NULL(validation happens in a subsequent step) - Duplicate guards use anti-join (LEFT JOIN WHERE IS NULL) on (LRNO + DateOriginated)
- Type casting is done at load time: numeric fields use CAST/ROUND before placing in IntValue or DecimalValue
- Name cleaning functions applied:
dbo.fnTidyShipname,dbo.proper
5.2 LRNO Derivation — spTIPDeriveLRNO
Some sources (e.g. certain flag registers) do not supply the LRNO (Lloyd's Register Ship Number) directly. They supply an IMO number or other identifier that must be matched against LR data to derive the LRNO.
spTIPDeriveLRNO — Configuration-driven LRNO lookup
FunctionApplied is set, wraps the column reference in the function: replace('?', column) pattern substitution. Accumulates WHERE/JOIN fragments into a dynamic SQL string.tblThirdPartyDeriveLRNOUpdated for audit, then executes a dynamic UPDATE on the source table to set the LRNO column from the matched LR table row.5.3 Previous Supply Comparison — spTIPMISProcessPreviousSupply
Compares each new (Processed=0) supply record against all previous supply records for the same field from the same source. This avoids sending duplicate data to the analyst review queue.
-- Determine the date of the current new supply batch SET @DATERECD = (SELECT MAX(datereceived) FROM tblThirdPartyData WHERE source = @SOURCE AND processed = 0) -- 4 cursors iterate over each (LRNO, TableName, FieldName) combination -- for each datatype: varchar, int, decimal, datetime -- Rule 1: matches previous MANUALLY processed (Processed=2) supply -- → cross-source allowed (source not compared) -- → set Processed=2 (treat as already manually reviewed) UPDATE tblThirdPartyData SET Processed=2 WHERE LRNO=@LRNO AND TableName=@TABLENAME AND FieldName=@FIELDNAME AND Source=@SOURCE AND DateReceived=@DATERECD AND Processed=0 AND VarcharValue = (prior manual value) -- Rule 2: matches previous AUTO processed (Processed=1) supply -- → same source required -- → set Processed=1 (treat as already auto-matched) UPDATE tblThirdPartyData SET Processed=1 WHERE ... AND b.Processed=1 AND b.Source=@SOURCE -- 5th cursor: mark ALL older records for same LRNO+Table+Field+Source+MPK -- as Processed=1 (superseded by newer supply) UPDATE tblThirdPartyData SET Processed=1 WHERE LRNO=@LRNO AND ... AND DateReceived < @DATERECD AND Processed=0
5.4 LRF Comparison — spTIPMISProcessCurrentVarcharAgainstLRF
Compares staged source values against the current value in the live LRF database. If the source value already matches what LR holds, it is marked as processed (no action needed).
dbo.fnTIPMISEdit_Distance(sourceValue, lrfValue) <= @LED. Otherwise: exact match with COLLATE Latin1_General_CI_AI (case+accent insensitive).Processed=1, Validated=1.-- Example generated SQL structure (varchar field with SEQNO) UPDATE tblThirdPartyData SET Processed=1, Validated=1 WHERE EXISTS ( SELECT 1 FROM ABSD_HIFL WHERE ABSD_HIFL.LRNO = tblThirdPartyData.LRNO AND ABSD_HIFL.SEQNO = '00' AND ABSD_HIFL.B04_CNTY COLLATE Latin1_General_CI_AI = tblThirdPartyData.VarcharValue COLLATE Latin1_General_CI_AI ) AND tblThirdPartyData.Source = @SOURCE AND tblThirdPartyData.TableName = @TABLENAME AND tblThirdPartyData.FieldName = @FIELDNAME AND tblThirdPartyData.Processed = 0
5.5 Validation — spTIPMISValidateVarchar
Validates unprocessed varchar values against the rules in tblThirdPartyValidation.
Validated=0, Processed=1 (rejected from further processing).dbo.find_regular_expression(VarcharValue, RegularExpression + '{' + RegularExpressionLen + '}') = 1) are marked Validated=1.dbo.find_regular_expression function is a CLR-backed regex engine. The length constraint is appended to the pattern as a {n} quantifier suffix, allowing the regex and length validation to be combined into a single match call.5.6 Auto Processing — spTIPAutoProcessVarcharValues
Nightly batch that automatically applies validated external data without analyst intervention for pre-approved field/source combinations.
ValidatedForAutoUpdate=1 for all records where: Validated=1, Processed=0, VarcharValue IS NOT NULL, source is in tblThirdPartyAutoProcess with AutoOverwrite IN ('ZeroOrNull','All'), and no SP override is configured in tblThirdPartyValidation.spTIPAutoValidateVarchar @table, @field, @source to apply any SP-level validation checks.UPDATE <TargetTable> SET <Field> = a.VarcharValue FROM tblThirdPartyData a INNER JOIN tblThirdPartyAutoProcess b INNER JOIN <TargetTable> c ON a.LRNO = c.LRNO [+ SEQNO + MPK conditions]. AutoOverwrite='ZeroOrNull' adds: AND (c.Field IS NULL OR c.Field = 'U').spTIPProcessCurrentAgainstLRF to re-mark records that now match LRF as Processed=1.5.7 Review UI Support — spTIPLRDataByField
Called by the analyst UI to show the current LRF value alongside the staged TIP value and change history for a given vessel+field. Returns a unified result set with both current data and annotation history.
Result set structure
| Column | Description |
|---|---|
| LRData | Formatted display string: value + optional SEQ{n} label + effective date in parentheses. For decode fields, the decoded text is shown. For annotation rows, "From: X To: Y (source date)" format. |
| TIPInd | 1=a pending TIP record exists for this field; 0=no pending TIP record |
| Effdate | Effective date for sorting (future-dated primary records get +2 days so they appear at top) |
| Seeding | 1=current LRF row; 0=change history row — allows ORDER BY effdate DESC, seeding DESC to show current value first |
Four rendering branches based on field configuration
- DecodeView + SEQNO — JOIN to decode view for code→text, include SEQ label and EFD, UNION with tblChanges history using same decode view
- DecodeView, no SEQNO — JOIN to decode view, no SEQ label, UNION with history
- No DecodeView + SEQNO — Raw value with SEQ label and EFD display, UNION with history
- No DecodeView, no SEQNO — Plain raw value, optional EFD, UNION with history if
tblEnglishFieldNameshas an entry for this field (indicating annotation tracking is active)
Fieldname = 'FlagStatus' AND Tablename = 'tblTIPXMLExtractFlagStatus', the Source column from the LRF row is appended in parentheses instead of the EFD value.5.8 Action Processing — spTIPProcessUpdate
Executes the analyst's chosen action for a specific staged record (@DataID).
Action: Keep
UPDATE tblThirdPartyData SET Processed = 2 WHERE DataID = @DataID -- Marks record as manually reviewed and kept (no LRF change needed)
Action: Learn
- Fetches current LRF value via dynamic SELECT on the target ABSD_ table for this LRNO+Field
- Inserts mapping into
tblThirdPartyMatchedValues: (TableName, FieldName, Source, VarcharValue=incoming, LRFValue=current) - Calls
spTIPProcessedMatchedValuesto immediately re-process any other staged records with the same source value using this learned mapping
Action: Overwrite / Insert
B04_TOWN from vwPortDecode and includes it in the dynamic UPDATE statement, keeping town in sync with country.sp_executesql with parameterised values.Processed=2 on the staging record.6. FlexTemp Pipeline — Detailed Processing
6.1 Data Loading & Mapping — spTIPMISProcessSource
spTIPMISProcessSource is a multi-mode stored procedure (controlled by the @status parameter) that manages both source metadata and the initial data loading into tblTIPMISFlexTemp.
Key @status modes
| Status | Action |
|---|---|
| ActiveRecords | SELECT all active (SoftDeleted=0) sources from tblThirdPartySource |
| SourceNames (NEW_MAPPING) | SELECT source names where MappingName IS NOT NULL — FlexTemp-capable sources only |
| FileNameRules | SELECT FileName rules and archive/rejected folders for file-watching logic |
| Add / Update / Delete | INSERT/UPDATE/soft-DELETE rows in tblThirdPartySource |
| EnableTip / UpdateNewMap | Toggle SoftDeleted flag; update MappingName |
| GetUnprocessedFromTipFlexTemp | SELECT DISTINCT Source WHERE Processed=0 AND Validated=1 from tblTIPMISFlexTemp — the processing queue query |
| GetMappedColumns | SELECT mapped columns (Mapped='Y') from tblTIPMISMappings for a given source |
| GetKeyMappedSourceName | SELECT sources that have a 'K' (key) mapping defined |
| ThirdPartyDataLoad | Manages tblTIPMISLock concurrency table to prevent concurrent loads for the same source |
| CompareConcur / EditConcur | Reads and updates concurrency lock records for file processing coordination |
6.2 One-to-Many Mappings — spTIPMISHandleOnetoManyMappings
Handles the case where a single source column is mapped to multiple LR target fields (e.g. a single "owner name" column maps to both RegisteredOwner and ShipManager in different contexts).
vwTIPMISOneToManyMappingCountBySourceName determines how many copies to create.6.3 Manipulation Rules Engine — spTIPMISManipulationRulesEngine
Executes data transformation rules defined in tblTIPMISManipulationHdr/Dtl before validation. Supports two execution modes:
Mode: ExecuteSelectQuery
-- Builds full SQL from RuleSQLScript and executes directly EXEC (@ConcatFullScript) -- Returns transformed rows to be reviewed or applied
Mode: ConcatExistUpdate
-- Executes dynamic SQL into a temp table SELECT * INTO #tempConcatUpdate FROM (EXEC(@ConcatFullScript)) -- Then iterates over temp table results, updating FlexTemp ColumnValue UPDATE tblTIPMISFlexTemp SET ColumnValue = #tempConcatUpdate.ConcatenatedResult WHERE AutoID = #tempConcatUpdate.AutoID -- Applies concatenation or transform results back to the staging table
6.4 Business Rules Engine — spTIPMISBusinessRule_Flextemp_Update
Validates FlexTemp data against configurable business rules. Each rule defines what constitutes a valid value; records that fail are marked with an error message.
spTIPMISRuleScript_Multi_Source which writes passing AutoIDs to tblTIPMISBusRuleSQLScriptMultiSource. Otherwise: calls spTIPMISRuleSQLScript which writes to tblTIPMISBusRuleSQLScript.ValidationFailureReason = @RuleErrorMsg, Validated = 2.6.5 New Field Derivation — spTIPMISInsertNewFieldData
Derives a new computed field from existing FlexTemp data and inserts it as additional rows in tblTIPMISFlexTemp. Used to create derived fields (e.g. a combined value from two source columns) that do not exist directly in the source data.
#tblTIPMIS_DMInsert with columns: KEY, SourceMonth, SourceYear, Validated. Executes the parsed SQL to populate it.6.6 Pivot / UnPivot for Display
spTIPMISPivotFlexTemp
Transforms FlexTemp data from its key-value row structure into a pivot (wide) format for display — one row per vessel with source columns as column headers.
- Filters: Mapped IN ('K','Y'), FieldType IS NOT NULL, Validated IN (0,2,3,4,5)
- Joins to vwTIPMISFieldGlossary for DisplayFieldName as column headers
- Uses dynamic PIVOT:
STUFF((SELECT DISTINCT ',[' + sourcecolumnname + ']' ... FOR XML PATH('')),1,1,'')to build the column list - Executes via
EXECUTE (@FinalQuery)
spTIPMISUnPivotFlexTemp
Two-branch PIVOT+UNPIVOT that shows rejection detail for a specific vessel in a specific source batch.
- Branch A (no change history for vessel): includes all mapped columns with ValidationFailureReason IS NOT NULL
- Branch B (vessel has change history in tblChanges): additionally filters to only columns in tblTIPMISMappings for this source, providing a tighter result set
- Both branches apply PIVOT then UNPIVOT to restore the original column-per-field layout while retaining ValidationFailureReason and Validated code per row
6.7 Rejection Management — spTIPMISFlexTempRejection
Multi-mode SP that supports the analyst rejection review UI for FlexTemp pipeline failures (Validated IN (0,2,3,4,5) = various failure codes).
| Status mode | Query |
|---|---|
| TipFlexTempSource | SELECT DISTINCT Source WHERE Validated IN (0,2,3,4,5) — populates source filter dropdown |
| FilteredTipFlexTemp | Full record SELECT for a specific Source+SourceMonth, showing all failed records with full field metadata from vwTIPMISFieldGlossary |
| DisplayFieldNames | JOINs to vwTIPMISFieldGlossary, shows only Mapped='Y' fields with FieldType, for the latest supply date — populates the field filter in the rejection UI |
7. Field Glossary — tblTIPMISFieldGlossary / spTIPMISFieldGlossary
The Field Glossary is the central registry of LR field definitions for the FlexTemp pipeline. It maps LR internal field names to human-readable display names and provides metadata for the TIP/MIS UI.
tblTIPMISFieldGlossary — Columns
| Column | Description |
|---|---|
| GlossaryID | int IDENTITY PK |
| DisplayFieldName | Human-readable field label (e.g. "Ship Name", "Gross Tonnage") |
| MainGroupCode | FK→tblTIPMISFieldGlossaryMainGroup (e.g. "Vessel Details", "Ownership") |
| SubGroupCode | FK→tblTIPMISFieldGlossarySubGroup (sub-category within main group) |
| FieldName | Internal LR field name (e.g. G01_NAME, B01_CALLSIGN) |
| TableName | ABSD_ target table |
| FieldType | Data type descriptor (varchar/int/decimal/datetime) |
| Length | Maximum display/storage length |
| SizePrecision | For numeric fields: precision descriptor |
| ValidOperators | Comma-separated list of valid comparison operators for this field |
| SoftDeleted | bit; 1=field removed from active use |
spTIPMISFieldGlossary — @status modes
| Status | Action |
|---|---|
| ActiveTipFields | SELECT all active (SoftDeleted=0) glossary entries, ordered by DisplayFieldName — main UI list |
| DeletedTipFields | SELECT all soft-deleted fields |
| DisplayMainGroup / DisplaySubGroup | SELECT distinct group names from MainGroup/SubGroup tables |
| ActiveMainGroup / MainNsubGroup | SELECT active group/subgroup hierarchy for UI dropdowns |
| FieldNames / FieldTypes | SELECT distinct internal field names / data types for admin tools |
| ThirdPartyTableName / ThirdPartyFieldName | Cross-reference with tblThirdPartyValidation to find which fields have validation rules |
| Add / Update / Delete / EnableTip | CRUD operations on tblTIPMISFieldGlossary |
| AddMainGroup / UpdateMainGroup | CRUD on tblTIPMISFieldGlossaryMainGroup |
| AddMainNsubGroup / UpdateMainNsubGroup / DeleteSubGroup | CRUD on tblTIPMISFieldGlossarySubGroup |
| ConvertDataType | UPDATE FieldType in tblTIPMISFieldGlossary for a specific field+source combination |
| Update (full) | UPDATE glossary entry AND simultaneously UPDATE tblTIPMISMappings FieldName/TableName where they reference the old values — keeps mapping table in sync |
8. SUPPLEMENTAL Tables
SUPPLEMENTAL tables store additional vessel data fields that do not fit in the primary ABSD_ schema, or that require a separate update cycle. Each SUPPLEMENTAL table is paired with an ABSD_ master table and has a trigger that propagates changes back to the master.
Known SUPPLEMENTAL tables
| Table | Paired Master | Key Fields |
|---|---|---|
| SUPPLEMENTAL_ABSD_OVGE | ABSD_OVGE | MMSI, MMSI_EFD, YARD_NO, YARD_NO20, PHOTO, PENNANT_NO, FISHNO20 |
| SUPPLEMENTAL_ABSD_HIFL | ABSD_HIFL | MMSI, SEQNO (history row) |
| SUPPLEMENTAL_ABSD_HIMA | ABSD_HIMA | Machinery additional fields |
| SUPPLEMENTAL_ABSD_HITL | ABSD_HITL | Tonnage additional fields |
| SUPPLEMENTAL_ABSD_STSE | ABSD_STSE | Status/service additional fields |
SUPPLEMENTAL_ABSD_OVGE Schema
| Column | Type | Description |
|---|---|---|
| LRNO | varchar(7) PK | LR number — 1:1 with ABSD_OVGE |
| MMSI | varchar(9) | Maritime Mobile Service Identity — 9-digit number; indexed for lookup |
| MMSI_EFD | varchar(6) | MMSI effective date (LR date format YYMMDD) |
| YARD_NO | varchar(12) | Yard number (short form, max 12 chars) |
| YARD_NO20 | varchar(20) | Yard number (extended form, max 20 chars) |
| PHOTO | bit | Photograph available flag |
| PENNANT_NO | varchar(10) | Naval pennant number |
| FISHNO20 | varchar(20) | Fishing vessel number (extended; truncated to 10 chars when written to ABSD_OVGE.B10_FISHNO) |
SUPPLEMENTAL_ABSD_OVGE Trigger — SuppOVGEUpdate
FOR INSERT, UPDATE trigger on SUPPLEMENTAL_ABSD_OVGE. Fires on every change and propagates data to the master ABSD_ tables with full validation, annotation, and cross-table synchronisation.
Trigger Guard Checks
IF NOT EXISTS(SELECT * FROM TRIGGER_DISABLE) BEGIN IF NOT EXISTS(SELECT * FROM TRIGGER_DISABLE_SUPPOVGE) BEGIN -- actual trigger body END END
TRIGGER_DISABLE = global trigger halt (used during bulk loads). TRIGGER_DISABLE_SUPPOVGE = SUPPLEMENTAL-specific halt (used to prevent recursion when the trigger itself updates related SUPPLEMENTAL tables).
Per-row processing (cursor over inserted)
spValidateMMSI @lrno, @seqno, null, @MPK3, @MPK4, @mmsi, @Errcode OUTPUT, @Errmess OUTPUT. If Errcode=0: RAISERROR + ROLLBACK TRANSACTION (validation failed, entire transaction is aborted).valStandard4_new @PASSEDDATA, @RETMESSAGE OUTPUT for date format validation. If return ≠ 0: prepends 'MMSI EFD' to message, RAISERROR + ROLLBACK.UPDATE ABSD_OVGE SET B10_FISHNO = LEFT(LTRIM(RTRIM(FISHNO20)),10) — truncates the 20-char value to the 10-char master field.UPDATE ABSD_OVGE SET J06_AUTHOR = [3-char initials from system_user], J06_LNCHDATE = [current date in YYMMDD format] for the affected LRNO.SUPPLEMENTAL_ABSD_OVGE_UPDATES for the affected LRNO. This staging table acts as a "last change" buffer for downstream consumers.spGetUserSettings to retrieve analyst initials/source. IF UPDATE(MMSI) or IF UPDATE(YARD_NO): inserts a row into tblChanges with OldValue (from deleted), NewValue (from inserted), ChangeType=EnglishFieldName. Uses spGetEnglishFieldName to get the human-readable name.indAnnotation_SecondaryGroupings for SUPPLEMENTAL_ABSD_OVGE/Yard_no, then inserts into tblAnnotationLogGeneral.UPDATE ABSD_SHIP_SEARCH SET MMSI = INSERTED.MMSI WHERE LRNO = @LRNO and UPDATE SUPPLEMENTAL_ABSD_HIFL SET MMSI = INSERTED.MMSI WHERE LRNO = @LRNO AND SEQNO = '00'. Keeps the search index and history table primary row in sync.9. Processing Flags Reference
tblThirdPartyData.Processed values
| Value | Meaning | Set by |
|---|---|---|
| 0 | Pending — newly loaded, not yet processed | Load SPs (initial value) |
| 1 | Matched/auto-processed — either matched to LRF or matched to previous auto supply. No analyst action required. | spTIPMISProcessCurrentVarcharAgainstLRF, spTIPMISProcessPreviousSupply (rule 2), spTIPAutoProcessVarcharValues, superseded records |
| 2 | Manually reviewed — analyst chose Keep or Overwrite, or matched prior manual supply | spTIPProcessUpdate (Keep/Overwrite), spTIPMISProcessPreviousSupply (rule 1) |
tblThirdPartyData.Validated values
| Value | Meaning |
|---|---|
| NULL | Not yet validated (just loaded) |
| 0 | Failed validation (length, regex, or SP-level validation) |
| 1 | Passed validation — eligible for processing |
tblTIPMISFlexTemp.Validated values
| Value | Meaning |
|---|---|
| 1 | Default — no failure detected yet |
| 0 | Failed length or regex validation |
| 2 | Failed business rule (ValidationFailureReason contains rule error message) |
| 3/4/5 | Additional failure codes for specific error categories (shown in rejection UI) |
10. Stored Procedure Reference Index
| Stored Procedure | Pipeline | Purpose |
|---|---|---|
| spTIPPSCLoad | Classic | Load PSC inspection data (7 fields per vessel, last 2 weeks) into tblThirdPartyData; runs full processing chain |
| spImportSBRIntoTIP | Classic | Load Shipbuilder Returns (25 fields per vessel) into tblThirdPartyData |
| spTIPDeriveLRNO | Classic | Derive LRNO from source-supplied IMO via configurable multi-column JOIN |
| spTIPMISProcessPreviousSupply | Both | Compare new supply against prior supply; mark unchanged records as pre-processed |
| spTIPMISProcessCurrentVarcharAgainstLRF | Classic | Compare staged values against live LRF data; mark matching records Processed=1 |
| spTIPMISValidateVarchar | Classic | Apply length and regex validation rules; mark records Validated=0 or 1 |
| spTIPAutoProcessVarcharValues | Classic | Nightly auto-update: apply approved source values to ABSD_ tables without analyst review |
| spTIPAutoValidateVarchar | Classic | SP-level validation before auto-update (called by spTIPAutoProcessVarcharValues) |
| spTIPProcessCurrentAgainstLRF | Classic | Re-compare after update to mark newly-matching records processed (Classic version) |
| spTIPProcessUpdate | Classic | Execute analyst action: Keep / Learn / Overwrite / Insert on a single DataID |
| spTIPProcessedMatchedValues | Classic | Re-process staged records using a newly learned value mapping |
| spTIPLRDataByField | Classic (UI) | Return current LRF value + change history for analyst comparison panel |
| spTIPProcessLowerImportanceData | Classic | Handle lower-priority fields after main processing completes |
| spTIPValidate | Classic | Field-level validation dispatcher (calls spTIPMISValidateVarchar and type-specific variants) |
| spTIPMISProcessSource | FlexTemp | Multi-mode: source CRUD, mapping queries, concurrency locking, data load coordination |
| spTIPMISHandleOnetoManyMappings | FlexTemp | Expand one-to-many mapped source columns into multiple FlexTemp rows |
| spTIPMISManipulationRulesEngine | FlexTemp | Execute data manipulation/transformation rules (DM engine) |
| spTIPMISBusinessRule_Flextemp_Update | FlexTemp | Execute business rules engine; mark failures with Validated=2 + error message |
| spTIPMISRuleSQLScript | FlexTemp | Execute single-source business rule SQL; write passing AutoIDs to temp result table |
| spTIPMISRuleScript_Multi_Source | FlexTemp | Execute multi-source business rule SQL; write passing AutoIDs to temp result table |
| spTIPMISInsertNewFieldData | FlexTemp | Derive and insert a new computed field into tblTIPMISFlexTemp |
| spTIPMISPivotFlexTemp | FlexTemp (UI) | Return FlexTemp data in wide/pivot format for display |
| spTIPMISUnPivotFlexTemp | FlexTemp (UI) | Return rejection detail for a specific vessel in PIVOT+UNPIVOT format |
| spTIPMISFlexTempRejection | FlexTemp (UI) | Multi-mode rejection browser: source list, filtered records, field name list |
| spTIPMISFieldGlossary | FlexTemp (Admin) | Multi-mode field glossary CRUD and lookup: 20+ @status modes |
| AA_fnTIPMISRetrieveDMOrder | FlexTemp (Fn) | Function: retrieve DM rule output order from tblTipManipulationOrder |
| fnTIPSelectDataType | Classic (Fn) | Function: build INSERT column string based on column datatype from information_schema |
| fnTIPMISEdit_Distance | Both (Fn) | Function: compute Levenshtein edit distance between two strings for fuzzy matching |
Generated from actual SQL source files — StoredProcedures/, Functions/, Tables/ — LR Maritime Database. 2026-05-02.