The router knows that some tables have been split into shards. If possible, the router tries to determine on the first transaction statement to which shard this transaction should be sent.

-- This query should works with properly sharding rules
INSERT INTO test(id, age) VALUES (10, 16);

But you can explicitly specify a shard or a sharding key in a comment request

-- But if you want to explicitly pass sharding key, you can do it like this
INSERT INTO test(id, age) VALUES (10, 16) /*__spqr__sharding_key: 30*/;