Skip to main content
This tutorial runs real queries against the UCSC Genome Browser public database (MySQL-protocol, served through the MariaDB driver). It is officially public with published credentials, so you can reproduce every call here exactly — RWS QA runs these very queries against the deployed service.

Prerequisites

  • The RWS Connect Live JDBC connection from the Live JDBC reference, with your x-api-key
  • x_db_password always names a stored credential — for a passwordless public user, RWS stores an empty credential once (e.g. PUBLIC_NO_PASSWORD); email connect@rwsintegration.com

The one gotcha first: sslMode=disable

The MariaDB driver asks for TLS by default. UCSC’s server doesn’t offer it, so without the property the call fails with 502 db_unreachable and the driver’s message “Trying to connect with ssl, but ssl not enabled in the server”. The fix is one connection property, allowed by the URL rules:
This applies to any MariaDB-driver server without TLS — recognize the error, add the property.

Step 1: A first unpaged query

Count the sequences of the human genome assembly hg38:

Step 2: Paginate with a cursor

Page through all 711 sequences, 200 at a time. chrom is unique in chromInfo — the unique key paging needs: The first call carries no x_cursor; each response’s next_cursor feeds the next call, until it comes back null. In the RWS Application, the cursor pagination config from the Live JDBC reference drives the loop for you. Verified result on the live service: 711 rows in 4 pages of up to 200 — 711 distinct names, no duplicates, no gaps (offset mode returns the identical set). The size column is a BIGINT and arrives as a plain decimal string.

MariaDB notes

  • The MariaDB driver also speaks to MySQL-protocol servers — UCSC runs genuine MariaDB 10.11, but the same jdbc:mariadb: prefix serves compatible servers.
  • Paginated queries run as a derived table with LIMIT ... OFFSET or a keyset WHERE — any valid SELECT without its own ORDER BY works.
  • Plain connection properties like sslMode pass the URL rules; properties that would make the driver load code or read files are refused.

Next steps

Live JDBC guide

The full reference: directives, pagination, errors

PostgreSQL tutorial

The same flow against RNAcentral