Using Relational Mappings
syntax = "proto3";
import "sf/substreams/sink/sql/schema/v1/schema.proto";
message Swap {
option (schema.table) = {
name: "swaps"
child_of: "pools on id"
};
string id = 1;
uint64 date = 2;
}
message Pool {
option (schema.table) = { name: "pools" };
string id = 1 [(schema.field) = { primary_key: true }];
string token_mint0 = 2;
string token_mint1 = 3;
repeated Swap swaps = 4;
}Run the Sink
Database Connection (DSN)
Example: SPL Token
Inspect the Project
Run the Sink
Run the Sink Without Annotations
Default Table Inference
Last updated
Was this helpful?

