Commit Graph

15 Commits

Author SHA1 Message Date
Joseph Doherty 1618b6664d refactor: remove unused CMS/JDE repositories and data sources
Remove legacy JDE and CMS direct-access code that is no longer used:
- Delete ICmsDataSource, IJdeDataSource interfaces
- Delete ISearchProcessor, IUpdateProcessor interfaces
- Delete IJdeRepository and ICmsRepository (all partials)
- Delete JdeRepository and CmsRepository implementations
- Delete JdeQueries and CmsQueries
- Delete JdeFileDataSource, JdeOracleDataSource
- Delete CmsFileDataSource, CmsOracleDataSource
- Remove unused methods from LotFinderRepository interfaces
- Delete associated unit tests (CmsRepositoryTests, JdeRepositoryTests)

All data sync now uses ETL pipelines via DataSync project.
2026-01-07 05:04:49 -05:00
Joseph Doherty 90e47c27c6 feat(db-exporter): add work order step definition files 2026-01-06 18:25:34 -05:00
Joseph Doherty d2136cacf7 fix(DbExporter): fix compressed size calculation and clean up
- Move file size read after streams are disposed to get accurate compressed size
- Clean up definition files to use working example queries
- Add .gitignore for output directory
2026-01-06 17:06:16 -05:00
Joseph Doherty f61a64b059 feat(DbExporter): add ScadaBridge definition files
Add JSON definition files for exporting ScadaBridge tables:
- Config tables: OpcUaClients, LmxClients, Tags, TemplateScripts
- Provider tables: EmailProviders, SmsProviders, TeamsProviders
- Lookup tables: ScadaClientTypes, ScriptTypes, TriggerTypes, DataTypes
2026-01-06 17:01:43 -05:00
Joseph Doherty 48c96eb8f4 feat(DbExporter): add counting data reader for accurate row count
Wrap IDataReader with CountingDataReader to track rows as they're read
during protobuf serialization, fixing the export returning 0 rows.
2026-01-06 17:00:09 -05:00
Joseph Doherty 87a02d5368 feat(DbExporter): implement CLI entry point 2026-01-06 16:57:58 -05:00
Joseph Doherty ba11407be4 feat(DbExporter): implement verify and verify-full
Add Verifier class that reads exported .pb.zstd files and:
- Deserializes protobuf data through zstd decompression
- Extracts schema information (column names and types)
- Counts rows for verification
- Optionally computes SHA256 hash and compares against sidecar file
2026-01-06 16:55:18 -05:00
Joseph Doherty 6f58bfd8cc feat(DbExporter): implement database export with protobuf+zstd
Adds DatabaseExporter class that exports query results to compressed
protobuf format. Supports SQL Server and Oracle providers with streaming
compression and SHA256 hash verification.
2026-01-06 16:52:43 -05:00
Joseph Doherty b497f018dd feat(DbExporter): create project structure and definition model
Add DbExporter tool project with:
- Project file targeting .NET 10 with required packages
  (protobuf-net-data, ZstdSharp.Port, Microsoft.Data.SqlClient,
  Oracle.ManagedDataAccess.Core)
- ExportDefinition model for JSON-based export configuration
- Placeholder Program.cs entry point
2026-01-06 16:49:59 -05:00
Joseph Doherty cd68b2c655 fix: read file size after streams are closed in converter 2026-01-06 15:39:47 -05:00
Joseph Doherty 6ebd78d487 feat: add parallel file conversion support to cache converter
- Add optional third parameter for parallelism (default: 8)
- Use Parallel.ForEachAsync for concurrent file processing
- Thread-safe console output with lock
- Thread-safe size counters with Interlocked

Usage: dotnet run -- <cache-dir> <scripts-dir> [parallelism]
2026-01-06 15:35:00 -05:00
Joseph Doherty c6aeb20d9c docs: update documentation for extraction functions migration
- Add ExtractionFunctions.md reference document
- Update database-schema spec with 11 extraction functions
- Update data-access spec to document extraction function approach
- Update search-processing spec with new query builder interface
- Add Database.Tests to Testing.md architecture doc
- Update DataFlow.md with extraction function flow
2026-01-06 14:54:10 -05:00
Joseph Doherty 35c1e6baf0 refactor: use SQL schema and streaming in converter
- Read schema from SQL CREATE TABLE scripts instead of inferring from JSON
- Stream JSON records using Utf8JsonReader instead of loading all into memory
- Write protobuf output in batches of 10000 rows to reduce memory usage
- Add mapping from cache file names to SQL scripts and table names
- Map SQL types (VARCHAR, BIGINT, DECIMAL, DATETIME2, BIT) to .NET types
- Update usage to require scripts directory as second argument
2026-01-06 14:39:22 -05:00
Joseph Doherty 8b1dfeb6c6 fix: address code review issues in converter tool 2026-01-06 14:24:23 -05:00
Joseph Doherty 6d08fd4a6c feat: add protobuf cache converter tool
Add standalone CLI tool to convert zstd-compressed JSON cache files
to zstd-compressed Protocol Buffers format for faster deserialization.
2026-01-06 14:21:46 -05:00