I try to access a csv file form my azure unfction following https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-output?tabs=python.
Input file:
- storage account: stpartnerdata001
- Blob containers: data01
- Folder: imdb-extensive-dataset
- File: IMDb movies.csv
I created a DataConnectionSettings01 in the function app Application setting with the value Connection String from key1 from the stpartnerdata001 storage account.
"name": "inputblob",
"type": "blob",
"path": "data01/imdb-extensive-dataset/IMDb movies.csv",
"connection": "DataConnectionSettings01",
"direction": "in"
I tried to run the function to printing out the file name:
import logging
import azure.functions as func
def main(req: func.HttpRequest, inputblob: func.InputStream) -> func.HttpResponse:
logging.info('Function called')
logging.info('input name: %s', inputblob.name)
return func.HttpResponse("This HTTP triggered function executed successfully.")
When exeuction the funciton I always receive input name: None. How can I access the csv file?