Add equity prints ingestion
This commit is contained in:
parent
488ae82ed6
commit
6a1f457028
9 changed files with 252 additions and 12 deletions
27
packages/storage/tests/equity-prints.test.ts
Normal file
27
packages/storage/tests/equity-prints.test.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { describe, expect, it } from "bun:test";
|
||||
import { equityPrintsTableDDL, EQUITY_PRINTS_TABLE } from "../src/equity-prints";
|
||||
|
||||
const basePrint = {
|
||||
source_ts: 100,
|
||||
ingest_ts: 200,
|
||||
seq: 1,
|
||||
trace_id: "trace-1",
|
||||
ts: 100,
|
||||
underlying_id: "SPY",
|
||||
price: 450.1,
|
||||
size: 100,
|
||||
exchange: "TEST",
|
||||
offExchangeFlag: false
|
||||
};
|
||||
|
||||
describe("equity-prints storage helpers", () => {
|
||||
it("keeps required fields intact", () => {
|
||||
expect(basePrint.offExchangeFlag).toBe(false);
|
||||
});
|
||||
|
||||
it("includes the correct table name in the DDL", () => {
|
||||
const ddl = equityPrintsTableDDL();
|
||||
expect(ddl).toContain(EQUITY_PRINTS_TABLE);
|
||||
expect(ddl).toContain("CREATE TABLE IF NOT EXISTS");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue