Skip to content

adds function for reading a single entity from azure table storage#119

Merged
tomjemmett merged 1 commit into
mainfrom
add_read_azure_table_single_entity
May 15, 2026
Merged

adds function for reading a single entity from azure table storage#119
tomjemmett merged 1 commit into
mainfrom
add_read_azure_table_single_entity

Conversation

@tomjemmett

Copy link
Copy Markdown
Member

No description provided.

@tomjemmett tomjemmett requested a review from francisbarton as a code owner May 14, 2026 09:57
Copilot AI review requested due to automatic review settings May 14, 2026 09:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new exported helper for reading a single Azure Table Storage entity by partition and row key.

Changes:

  • Adds read_azure_table_single_entity().
  • Exports the new function.
  • Adds generated Rd documentation for the new public API.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
R/read_azure_table.R Implements the single-entity Azure Table request helper.
NAMESPACE Exports read_azure_table_single_entity().
man/read_azure_table_single_entity.Rd Documents the new function.
Files not reviewed (1)
  • man/read_azure_table_single_entity.Rd: Language not supported
Comments suppressed due to low confidence (2)

R/read_azure_table.R:109

  • The key predicate is assembled by directly interpolating partition_key and row_key into OData string literals. Azure Table keys can contain single quotes, and OData requires those quotes to be escaped by doubling them; without escaping, valid keys containing ' produce an invalid URI or can change the key predicate being requested.
  table_name_with_keys <- paste0(
    table_name,
    "(PartitionKey='",
    partition_key,
    "',RowKey='",
    row_key,
    "')"
  )

R/read_azure_table.R:122

  • This returns the parsed JSON object directly, but the function documents and mirrors read_azure_table() as returning a tibble. A single entity response will come back as a named list/data frame rather than a tbl_df, which is inconsistent with the public API and will break callers expecting tibble semantics.
  req |>
    httr2::req_perform() |>
    httr2::resp_check_status() |>
    httr2::resp_body_json(simplifyVector = TRUE)

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

Comment thread R/read_azure_table.R
Comment thread R/read_azure_table.R

@francisbarton francisbarton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice idea - this is going to be very useful. I wasn't sure initially what the use case was but I think I can see it now.
(It would be useful to have PRs linked to an issue that describes the need for the PR, in future).

@tomjemmett tomjemmett merged commit c2d181a into main May 15, 2026
5 checks passed
@tomjemmett tomjemmett deleted the add_read_azure_table_single_entity branch May 15, 2026 12:14
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