Data Fabric native integration with Agents - Coded and Non-Coded [DS-7139]#1331
Data Fabric native integration with Agents - Coded and Non-Coded [DS-7139]#1331UIPath-Harshit wants to merge 7 commits intomainfrom
Conversation
…ration with agents. Switch data-fabric to private preview under the label as there is major rearchitecture going on our side
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bc48d5d0a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| records_data = response.json().get("results", []) | ||
| return records_data |
There was a problem hiding this comment.
Honor schema argument in entity query methods
The new query_multiple_entities API accepts schema and documents it as validation input, but the method returns raw response.json()["results"] without ever applying that schema (and the async variant has the same behavior). In callers that rely on schema validation, malformed or shape-shifted records will pass through silently and fail later in downstream logic instead of failing at the SDK boundary.
Useful? React with 👍 / 👎.
| if response.status_code == 200: | ||
| records_data = response.json().get("results", []) | ||
| return records_data | ||
| else: | ||
| response.raise_for_status() |
There was a problem hiding this comment.
Handle non-200 successful responses consistently
This branch treats only 200 as success even though BaseService.request already raises for error statuses; for any other successful 2xx response (for example 204), execution falls into else, raise_for_status() is a no-op, and the method returns None despite its declared List[Dict[str, Any]] return type. That creates a latent runtime type break if the endpoint ever returns a non-200 success code.
Useful? React with 👍 / 👎.
This pull request introduces support for Data Fabric context and secure SQL-based querying of multiple entities in UiPath Data Service. It adds new APIs for querying with SQL, enforces strict validation rules to prevent unsafe queries, and extends the agent model and configuration to support the new Data Fabric retrieval mode. Comprehensive tests are included to ensure correct behavior and validation.
Data Fabric context support and agent model updates:
DATA_FABRICas a new retrieval mode inAgentContextRetrievalModeand updated related model classes and normalization logic to support it, including newentity_identifierssettings. [1] [2] [3] [4]DATA_FABRICretrieval mode and its configuration are parsed and validated correctly.SQL query support for entities (Data Fabric):
query_multiple_entitiesandquery_multiple_entities_asynctoEntitiesService, allowing SQL-based queries against entity data via the Data Fabric endpoint._query_multiple_entities_specto construct the request for the new Data Fabric query API.SQL query validation and security:
_validate_sql_queryand helper methods to strictly validate SQL queries: only singleSELECTstatements are allowed, forbids dangerous keywords and constructs (e.g.,INSERT,UPDATE,UNION, subqueries), and enforces WHERE or LIMIT clauses and projection limits to prevent unbounded or unsafe queries.Dependency and configuration updates:
sqlparseas a required dependency for SQL parsing and validation, and updated development dependencies and workspace configuration foruipath. [1] [2] [3]Documentation improvements: