Azure / Azure/azure-functions-python-worker

[Bug] Azure Table row key not honoured

Offen
#1,725 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:python-functions bug python python-sdk
Vorherrschende Sprache
Python
Sterne
357
Forks
116
Ø Merge
32 Min.
Gemergte PRs (30 T.)
1

Beschreibung

### Expected Behavior

I want to read only rows for specific row key and partition key from a table storage in azure.

### Actual Behavior

The function returned all rows for the partition instead of filtering on row key.

### Steps to Reproduce

1. Create a python v2 function in vs code on mac.
2. Specify the table as input binding with the relevant details
3. Print the table data read

### Relevant code being tried

```shell
import logging
import azure.functions as func
import json

app = func.FunctionApp()

@app.table_input(arg_name="messageJSON",
connection="table_conn",
table_name="lastSyncStatus",
row_key="inspector",
partition_key="category")
@app.timer_trigger(schedule="0 */5 * * * *", arg_name="myTimer", run_on_startup=False, use_monitor=False)
def table_in_binding(myTimer: func.TimerRequest, messageJSON):
message = json.loads(messageJSON)
logging.info(message)
```

### Relevant log output

```shell
Executing 'Functions.table_in_binding' (Reason='This function was programmatically called via the host APIs.', Id=33c96dd8-2a8a-4182-af0c-fe5b884e4373)
[2025-07-28T18:44:02.465Z] [{'PartitionKey': 'category', 'RowKey': 'infrastructure', 'last_sync_time': '2025-07-28T18:15:00.004945+00:00', 'pipeline_succeeded': False}, {'PartitionKey': 'category', 'RowKey': 'inspector', 'last_sync_time': '2025-07-28T18:15:00.004945+00:00', 'pipeline_succeeded': True}]
[2025-07-28T18:44:02.476Z] Executed 'Functions.table_in_binding' (Succeeded, Id=33c96dd8-2a8a-4182-af0c-fe5b884e4373, Duration=1025ms)
```

### requirements.txt file

```shell
azure-functions
```

### Where are you facing this problem?

Local - Core Tools

### Function app name

_No response_

### Additional Information

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue enthält eine Python-v2-Funktion, die das Azure-table_input-Binding verwendet, sowie Schritte zur Reproduktion und Logs. Beginne damit, das Binding mit dem angegebenen row_key und partition_key zu reproduzieren, und verfolge dann, wie der Table-Input aufgelöst wird. Fertig ist die Aufgabe, wenn das Binding nur die angeforderte Zeile zurückgibt und eine Regression-Prüfung dieses Verhalten abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, python
Bereich
cloud, databases
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.