Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table Storage] Azurite does not return properties with null values when querying with $select operator #2535

Open
dzendras opened this issue Feb 28, 2025 · 0 comments

Comments

@dzendras
Copy link

There is an inconsistency in the way Azurite serves queries that include inexistent properties. Azure Table Storage returns properties with null values, while Azurite does not include them in the payload.

Add entity:

[Informational] Azure-Core: Request [0422bb54-dd29-42ea-ab0b-9ba9061f7ae3] POST http://127.0.0.1:10002/devstoreaccount1/TableName?$format=REDACTED
[Verbose] Azure-Core: Request [0422bb54-dd29-42ea-ab0b-9ba9061f7ae3] content: {"PartitionKey":"PK","RowKey":"RK","NonNullProperty":"something"}

Get entity requesting the inexsistent property:

[Informational] Azure-Core: Request [a12af699-92e1-49d3-ac1a-548547f6ba53] GET http://127.0.0.1:10002/devstoreaccount1/TableName(PartitionKey='PK',RowKey='RK')?$format=REDACTED&$select=NonNullProperty%2CInexistentProperty
User-Agent:azsdk-net-Data.Tables/12.8.3 (.NET 8.0.13; Microsoft Windows 10.0.22631)
Server:Azurite-Table/3.32.0
[Verbose] Azure-Core: Response [a12af699-92e1-49d3-ac1a-548547f6ba53] content: {"odata.metadata":"http://127.0.0.1:10002/devstoreaccount1/$metadata#TableName/@Element","odata.etag":"W/\"datetime'2025-02-28T06%3A54%3A16.4431620Z'\"","NonNullProperty":"something"}

That's what it looks like for Azure Table Storage:

Add entity:

[Informational] Azure-Core: Request [a1675057-f3d6-4f74-99be-d58a22ffd6f3] POST https://<REDACTED>.table.core.windows.net/TableName?$format=REDACTED
User-Agent:azsdk-net-Data.Tables/12.8.3 (.NET 8.0.13; Microsoft Windows 10.0.22631)
[Verbose] Azure-Core: Request [a1675057-f3d6-4f74-99be-d58a22ffd6f3] content: {"PartitionKey":"PK","RowKey":"RK","NonNullProperty":"something"}
Server:Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0

Get entity requesting the inexsistent property:

[Informational] Azure-Core: Request [4e03764e-a8bd-4d3a-b762-1201272ed224] GET https://<REDACTED>.table.core.windows.net/TableName(PartitionKey='PK',RowKey='RK')?$format=REDACTED&$select=NonNullProperty%2CInexistentProperty
User-Agent:azsdk-net-Data.Tables/12.8.3 (.NET 8.0.13; Microsoft Windows 10.0.22631)
[Informational] Azure-Core: Response [4e03764e-a8bd-4d3a-b762-1201272ed224] 200 OK (00.1s)
Server:Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
[Verbose] Azure-Core: Response [4e03764e-a8bd-4d3a-b762-1201272ed224] content: {"odata.metadata":"https://<REDACTED>.table.core.windows.net/$metadata#TableName/@Element&$select=NonNullProperty,InexistentProperty","odata.etag":"W/\"datetime'2025-02-28T07%3A00%3A37.4437045Z'\"","InexistentProperty":null,"NonNullProperty":"something"}

To be honest, I would prefer if Table Storage behaved like Azurite :) In my scenario, I query for ~20 properties while only a few will have values. It means that the responses are unnecessarily large. If there is a way to tell Azure Table Storage to skip null properties, it would be much appreciated!

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

No branches or pull requests

1 participant