code: private static void getPrimaryKey(DatabaseMetaData md, DatabaseRelationDefinition relation, QuotedIDFactory idfac) throws SQLException {
  		RelationID id = relation.getID();
  		// Retrieves a description of the given table's primary key columns. They are ordered by COLUMN_NAME (sic!)
  		try (ResultSet rs = md.getPrimaryKeys(null, id.getSchemaName(), id.getTableName())) {
  			extractPrimaryKey(relation, idfac, id, rs);
  		} catch (SQLSyntaxErrorException e) {
  		    // WORKAROUND for MySQL connector >= 8.0:
              // <https://github.com/ontop/ontop/issues/270>
              try (ResultSet rs = md.getPrimaryKeys(id.getSchemaName(), null, id.getTableName())) {
                  extractPrimaryKey(relation, idfac, id, rs);
              }
  		}
  	}
docs: Retrieves the primary key for the table