I am using the ChoETL and ChoETL.Parquet library to create a parquet file based on some other data. I can create the file just fine locally.
using (ChoParquetWriter parser = new ChoParquetWriter($"..\\..\\..\\parquet_files\\{club}_events.parquet"))
{
parser.Write(events);
}
In this code snippet, events is a list of objects containing strings. They will be converted to parquet data.
So far I have written the code to upload to Azure, but it needs a local file as input.
BlobServiceClient BlobServiceClient = new BlobServiceClient("REDACTED");
var containerClient = BlobServiceClient.GetBlobContainerClient("base-test");
BlobClient blobClient = containerClient.GetBlobClient($"Base/{RequestTime.Year}/{RequestTime.Month}/{RequestTime.Day}/{RequestTime.Hour}/{RequestTime.Minute}/events.parquet");
using FileStream uploadFileStream = File.OpenRead("..\\..\\..\\events.parquet");
await blobClient.UploadAsync(uploadFileStream, true);
uploadFileStream.Close();
I need it to be created in memory then uploaded to Azure blob storage. How can I do this? For clarification: I would need the parquet file to be uploaded.