Skip to content

Questdb archiver connector#256

Open
chrisbchin11-ui wants to merge 9 commits into
mainfrom
questdb-archiver-connector
Open

Questdb archiver connector#256
chrisbchin11-ui wants to merge 9 commits into
mainfrom
questdb-archiver-connector

Conversation

@chrisbchin11-ui

@chrisbchin11-ui chrisbchin11-ui commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Quest DB Connector:

  • New archiver connector that retrieves historical PV data from a QuestDB instance and exposes it through OSPREY's existing 'ArchiverConnector' interface
  • Implements the abstract base case in base.py: 'connect(config)', 'disconnect()', 'getdata(pv_list, start_date, end_date, precision_ms=1000, timeout=None)', 'get_metadata(pv_name)' 'check_availability(pv_names)', '
  • test_questdb_archiver_connector.py:
  1. Unit tests mocks the 'asyncpg' client to run with no live database
  2. Uses an integration test gated by '@pytest.mark.integration'
  3. Covers the edge cases (empty 'pv_list', a PV with no data in range, an empty time range, not-connect error path)
  • Gracefully handles missing-dependency case if 'asyncpg' is not installed - raises an 'ImportError' with an actionable install message
  • Honors 'precision_ms' by downsampling server-side with QuestDB's 'SAMPLE BY'
  • 'check_availability' is a single batched query rather than one per PV
  • Uses a connection pool with a bounded timeout, and 'timeout' cancels a slow query

@chrisbchin11-ui

Copy link
Copy Markdown
Collaborator Author

Dockerfile E2E check is failing but is unrelated to this pull request and looks pre-existing.

@chrisbchin11-ui

Copy link
Copy Markdown
Collaborator Author

Updated 6/22/26:

  1. More robust queries using parameters instead of f-strings
  2. Datetimes are time-zone aware (converts to UTC)
  3. Error handling double checked: start/end times must be actual datetimes, connect() catches more specific errors besides just connection errors, get_metadata and check_availability raise errors if a query fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant