Skills

Tika Eval H2 Query

Query the tika-eval H2 database directly for counts and joins the canned reports do not...

Install

npx skills add apache/tika --skill tika-eval-h2-query -g -a claude-code -y
Repository
apache/tika4.1k
Category
Documents
Updated
3d ago
License
Apache-2.0
Context cost
Mediumabout 1,756 tokens
Runs scripts
No, instructions only

What it does

Query the tika-eval H2 database directly for counts and joins the canned reports do not compute, connection gotchas, key tables, example queries. Use when the xlsx/summary.md reports are not enough.

<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->

Local override: $TIKA_SKILLS_LOCAL/tika-eval-h2-query/LOCAL.md (default ~/.tika-skills), read after this file, wins on conflict.

Query the tika-eval H2 database directly

tika-eval (Compare / Profile / Report) stores everything in an H2 database, the -d <name> you pass to Compare produces <name>.mv.db. The xlsx/summary.md reports only surface pre-canned views; for anything else (exact counts, custom joins, "better vs worse" tallies the reports don't compute) connect to the H2 db and run SQL.

Connecting (the part that trips people up)

tika-eval creates the db with no username and no password (H2Util calls DriverManager.getConnection(url) with no creds). So:

  • URL: jdbc:h2:<absolute-path-without-the-.mv.db-suffix>
  • user / password: empty. -user sa (H2's old default) fails with "Wrong user name or password", the db wasn't created with sa.
  • Add ;IFEXISTS=TRUE so a typo opens nothing instead of silently creating a new empty db, and ;ACCESS_MODE_DATA=r for a safe read-only open.
  • H2 is single-writer: don't query while a Compare/Profile/Report run has the db open (file lock). Query after the run finishes.
Read the whole SKILL.md on GitHub

More in Documents