Expand financials surfaces with ratios, KPIs, and cadence support
- Add bundled financial modeling pipeline (ratios, KPI dimensions/notes, trend series, standardization) - Introduce company financial bundles storage (Drizzle migration + repo wiring) - Refactor financials page/API/query flow to use surfaceKind + cadence and new response shapes
This commit is contained in:
@@ -16,6 +16,9 @@ import {
|
||||
updateFilingMetricsById,
|
||||
upsertFilingsRecords
|
||||
} from '@/lib/server/repos/filings';
|
||||
import {
|
||||
deleteCompanyFinancialBundlesForTicker
|
||||
} from '@/lib/server/repos/company-financial-bundles';
|
||||
import {
|
||||
getFilingTaxonomySnapshotByFilingId,
|
||||
upsertFilingTaxonomySnapshot
|
||||
@@ -623,6 +626,7 @@ async function processSyncFilings(task: Task) {
|
||||
|
||||
await upsertFilingTaxonomySnapshot(snapshot);
|
||||
await updateFilingMetricsById(filing.id, snapshot.derived_metrics);
|
||||
await deleteCompanyFinancialBundlesForTicker(filing.ticker);
|
||||
taxonomySnapshotsHydrated += 1;
|
||||
} catch (error) {
|
||||
const now = new Date().toISOString();
|
||||
@@ -656,6 +660,7 @@ async function processSyncFilings(task: Task) {
|
||||
facts: [],
|
||||
metric_validations: []
|
||||
});
|
||||
await deleteCompanyFinancialBundlesForTicker(filing.ticker);
|
||||
taxonomySnapshotsFailed += 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user