PQL Spreadsheet (CSV) Format Documentation

The Odds Oracle includes the capability to process multiple variations of a single PQL query through the use of comma-separated-value (CSV) files, a platform-independent spreadsheet format.
Spreadsheets can be processed in the Odds Oracle.
Spreadsheets can also be processed via the command-line.

Example PQL Input CSV

Here is an example of a PQL Input CSV:

#QUERY#,#PLAYER1HAND#,#PLAYER2HAND#
"select count(winsHi(player1)) as p1Wins from game='holdem', player1='#PLAYER1HAND#', player2='#PLAYER2HAND#'",,
,TT,AK
,99,QQ
,22,A2

This spreadsheet asks the question "How often does player one win against player two?" for the following hold'em matchups - TT vs AK, 99 vs. QQ, and 22 vs. A2.

PQL Input CSV Format

First row (Query and Input Columns)

Query Column

The first entry in the first row must be the value #QUERY#

Input Columns

After the #QUERY# column are any input columns. These must begin and end with '#'.

Second row (Query row)

The first entry of the second row must contain the PQL query. The PQL query will make references to the input columns specified in the first row. All other entries in the second row must be blank.

Subsequent rows

The first entry of each subsequent row must be blank, and all other entries must contain values for the input parameters.

Example Output CSV

"#QUERY#",#PLAYER1HAND#,#PLAYER2HAND#,!ERRORS!,!TRIALS!,P1WINS
"SELECT COUNT(WINSHI(PLAYER1)) AS P1WINS FROM GAME='HOLDEM', PLAYER1='#PLAYER1HAND#', PLAYER2='#PLAYER2HAND#'",,,,,
"",TT,AK,,600000,335263
"",99,QQ,,600000,111272
"",22,A2,,600000,384166

PQL Output CSV Format

The output CSV that is generated will contain all of the data from the input CSV, in addition to the following columns.

!ERRORS!

Any rows that experienced errors will have them printed in this column, otherwise the !ERRORS! entry will be blank

!TRIALS!

This shows the number of random trials that were executed by the PQL runtime.

Output columns

Each selector specified in the PQL query will have its own column containing the data that was computed by the PQL runtime. In the example above, we have one selector named 'P1Wins', and as a result we have a column of the same name in our output CSV.