Skip to main content
POST
Find join keys

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

database
string
required

Target database.

Body

application/json

POST /v1/join_keys/{database}: the tables a statement will join. An unknown field is refused.

tables
string[]
required

The tables the statement will span: two to eight distinct names, each a table with a card. A name given twice counts once.

Response

Every join among the named tables, each as the two sides and the ON clause to write (logs.instance_id = issues.instance_id, split_part(code.path, '/', 1) = issues.project), with the share of the referencing side's values found on the other side and whether a statement counted it. The first call over a pair counts its joins on the data (the estimates from samples of the tables' values, and the joins the deployment's model proposes from the two cards, each measured by a statement) and records the verdict; later calls over the pair read it back while both tables stand as they were counted. pairs is the pairs the tables make, counted how many this call measured, model_tokens the tokens the proposing model used, the count this call's inference was billed on. What the inference was billed is in the x-infino-inference-nanodollars response header, 0 when no model ran.

The keys among the named tables.

counted
integer
required

Pairs counted on the data by this call; the rest were read back from an earlier count.

Required range: x >= 0
joins
object[]
required

Every join among the tables, each once, referencing table first. Empty when no column of one table holds another's values.

model_tokens
integer<int64>
required

Tokens the proposing model read and wrote on this call, the count this call's inference was billed on; 0 when no model ran.

Required range: x >= 0
pairs
integer
required

Pairs of tables the request spans.

Required range: x >= 0