question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs should call out that Cosmos backed tables do not allow reserved property name `ResourceId` for entities

See original GitHub issue

Library name and version

Azure.Data.Tables 12.7.0

Query/Question

Is it possible to create and work on a table entity with byte[] or BinaryData typed properties using “API for table” (on cosmos db table)?

It looks like TableClient.AddEntityAsync does not support a TableEntity that has property type as Byte[] or BinaryData. AddEntityAsync returned below exception when I tried to insert an entity with BinaryData or Byte[] properties.

    /// <summary>
    /// The task entity for asynchronous task execution.
    /// </summary>
    public class TaskEntity : AzureTableEntity
    {
        /// <summary>
        /// Gets or sets the TaskId of the task.
        /// </summary>
        public string TaskId { get; set; }

        /// <summary>
        /// Gets or sets the task name.
        /// </summary>
        public string TaskName { get; set; }

        /// <summary>
        /// Gets or sets checkpoint chunk 1.
        /// </summary>
        public BinaryData Chunk0 { get; set; }

        /// <summary>
        /// Gets or sets checkpoint chunk 2.
        /// </summary>
        public BinaryData Chunk1 { get; set; }

Azure.RequestFailedException: Cannot implicitly convert type 'Newtonsoft.Json.Linq.JObject' to 'string'. An explicit conversion exists (are you missing a cast?)

Even the UI on azure portal does not allow defining a property to be defined as Binary.

This is a seriously limitation and may block us migrating from Azure table storage to API for tables (cosmos db tables).

image

Environment

No response

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
christothescommented, Feb 8, 2023

I created this PR to update the documentation. https://github.com/MicrosoftDocs/azure-docs/pull/104993

1reaction
jsquirecommented, Feb 8, 2023

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API for Table in Azure Cosmos DB ...
Entity property names ID , id , rid , etag , and ResourceId are reserved for use by Cosmos DB and are currently...
Read more >
Introduction to Azure Cosmos DB | Microsoft Docs
Azure Cosmos DB contains a write optimized, resource governed, schema-agnostic database engine that natively supports multiple data models: key-value, documents ...
Read more >
Cosmos db metadata. For information on setup and ...
You need to retrieve all resource in Azure CosmosDB via resource link, not resource id. its your choice how would you … In...
Read more >
Azure Cosmos DB, SQL Server ... - Lenni's Technology Blog
In one Azure data center, your data is written out to multiple replicas (four at least). Consistency is all about whether or not...
Read more >
Azure | Random Blurbs and Things of this Nature
There is another property called RoleName which returns the human readable name, ie Reader or Contributor. scopePath – this is the path of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found