Skip to content

[MCC-1501368] Python Lib - Use Error Handler, Document and Update Messages for Fetch Data ()#31

Merged
butsyk-mdsol merged 5 commits into
mainfrom
feat/MCC-1501368
May 19, 2026
Merged

[MCC-1501368] Python Lib - Use Error Handler, Document and Update Messages for Fetch Data ()#31
butsyk-mdsol merged 5 commits into
mainfrom
feat/MCC-1501368

Conversation

@afieraru-mdsol

@afieraru-mdsol afieraru-mdsol commented May 18, 2026

Copy link
Copy Markdown
Contributor

feature

Pull request overview
This PR refactors the fetch-data path to use a new DatasetTicket DTO and updates validation errors for fetch_data.

Changes:

  • Adds DatasetTicket to transport models.
  • Replaces Transport.do_get(ResourceQuery) with Transport.get_ticket(DatasetTicket).
  • Updates DefaultDataConnectService.fetch_data to build a DatasetTicket and raise structured validation errors.

Copilot AI review requested due to automatic review settings May 18, 2026 13:31
@afieraru-mdsol
afieraru-mdsol marked this pull request as draft May 18, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the fetch-data path to use a new DatasetTicket DTO and updates validation errors for fetch_data.

Changes:

  • Adds DatasetTicket to transport models.
  • Replaces Transport.do_get(ResourceQuery) with Transport.get_ticket(DatasetTicket).
  • Updates DefaultDataConnectService.fetch_data to build a DatasetTicket and raise structured validation errors.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
dataconnect/transport/models.py Adds the dataset fetch ticket DTO.
dataconnect/transport/base.py Updates the transport interface for ticket-based fetches.
dataconnect/transport/arrow_flight/transport.py Serializes DatasetTicket into an Arrow Flight ticket and calls do_get.
dataconnect/service/default.py Updates fetch_data validation and dispatches through get_ticket.
Comments suppressed due to low confidence (1)

dataconnect/service/default.py:109

  • Several of these lines contain trailing whitespace after the comma before the newline, which violates the repository's configured Ruff W rules and will fail linting.
                    timestamp=datetime.now(UTC).strftime("%Y-%m-%dT%H:%M:%SZ"), 
                    details=[ErrorDetail(field="first_n_rows", 
                                        message=f"Received {first_n_rows} for first_n_rows, which is not a positive integer.", 
                                        expected="Set first_n_rows to 1 or greater, or omit the parameter to retrieve the full dataset")],

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dataconnect/transport/models.py
Comment thread dataconnect/service/default.py
Comment thread dataconnect/service/default.py Outdated
Comment thread dataconnect/service/default.py Outdated
Comment thread dataconnect/transport/arrow_flight/transport.py Outdated
Comment thread dataconnect/service/default.py
Comment thread dataconnect/transport/models.py
Comment thread dataconnect/service/default.py Outdated
@afieraru-mdsol
afieraru-mdsol marked this pull request as ready for review May 19, 2026 07:44
Comment thread dataconnect/service/default.py Outdated
Comment thread dataconnect/service/default.py Outdated
Comment thread dataconnect/transport/arrow_flight/transport.py Outdated
@butsyk-mdsol
butsyk-mdsol merged commit 22bc64a into main May 19, 2026
3 checks passed
@butsyk-mdsol
butsyk-mdsol deleted the feat/MCC-1501368 branch May 19, 2026 10:18
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.

3 participants