GURGLE Tutorial: RDBMS Data

All the examples shown so far use a text file database but it is more common for a RDBMS query to be used instead. Below is an example syntax for the phone directory source if it was an SQL query to a RDBMS. Obviously this will only work if gurgle has been compiled for a particular RDBMS and the appropriate data structures exist in the database.

%%define PHYSDB phonesdb
%%database "phonedir.sql"
  select firstname, lastname, extension, room, job
  from phones

You may also need to define DBHOSTNM (if the server is not running on the same host as gurgle is running on) and DBUSERNM/DBPASSWD for the connection depending on your particular RDBMS.

NEXT