You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor the 4 manifest creation sites in New-FinOpsTestData to use a shared helper, reducing code duplication and schema drift risk.
Motivation
New-FinOpsTestData currently creates manifest JSON in 4 separate locations — one per dataset type that has a slightly different schema (Costs, Prices, CommitmentDiscountUsage, Recommendations/Transactions). Each site constructs the manifest hashtable independently, which means:
Watermark fields (_ftkTestData, _generator, _generatedAt) must be added in 4 places
Schema changes require updates in 4 places
Risk of drift between manifest formats
Proposed changes
Extract a private helper function (e.g., New-TestDataManifest) that accepts dataset-specific parameters and returns the manifest hashtable
Each call site passes only the dataset-specific values (dataset name, blobs, row count, export config overrides)
The helper handles common fields: blobCount, byteCount, dataFormat, runInfo, _ftkTestData watermarks
Summary
Refactor the 4 manifest creation sites in
New-FinOpsTestDatato use a shared helper, reducing code duplication and schema drift risk.Motivation
New-FinOpsTestDatacurrently creates manifest JSON in 4 separate locations — one per dataset type that has a slightly different schema (Costs, Prices, CommitmentDiscountUsage, Recommendations/Transactions). Each site constructs the manifest hashtable independently, which means:_ftkTestData,_generator,_generatedAt) must be added in 4 placesProposed changes
New-TestDataManifest) that accepts dataset-specific parameters and returns the manifest hashtableblobCount,byteCount,dataFormat,runInfo,_ftkTestDatawatermarksNew-FinOpsExportManifest)Context
Deferred from PR #2006 (New-FinOpsTestData and Remove-FinOpsTestData). Can be combined with #2016 if extracting to a public command.