I am working with Azure at the moment and I am unhappy with the predefined functions in the DataFactory because they start a Cluster in the background and this is absolutely not necessary for my problem.
I receive a csv file in a predefined folder and want to pick a set of columns and store them in a certain order in a csv file.
At the moment my file looks as follows:
The JSON file:
"bindings": [
{
"name": "myblob",
"type": "blobTrigger",
"path": "input-raw",
"connection": "AzureWebJobsStorage",
"direction": "in"
},
{
"name": "outputblob",
"type": "blob",
"path": "{blobTrigger}-copy",
"connection": "AzureWebJobsStorage",
"direction": "out"
}
],
"disabled": false,
"scriptFile": "__init__.py"
}
The init.py:
import logging
import azure.functions as func
def main(myblob: func.InputStream, outputblob: func.Out[func.InputStream]):
logging.info(f"Python blob trigger function processed blob \n"
f"Name: {myblob.name}\n"
f"Blob Size: {myblob.length} bytes")
outputblob.set(myblob)
My function picks a file in the folder and copies it with a '-copy' in the end in the same folder. Is there an easy way to access the data and to edit it with python?
Toll now I tried the packages 'csv', 'io' and 'fileinput' to read the information but I could not manage till now to edit or even see the data within my VisualStudioCode.
If you need more information please let me know.
Best P