azure

Create multiple functions in one Azure Function App

Create multiple functions in one Azure Function App Question: I want to create multiple python Azure Functions within one Azure Functions App using the azure cli/core tools. One http triggered function and one blob triggered function. I have the following folder structure: ├── azure-functions │ ├── az-func-blob │ │ ├── .python_packages │ │ ├── .vscode …

Total answers: 1

How to rename an already existing blob in azure storage explorer using python

How to rename an already existing blob in azure storage explorer using python Question: I want to rename a blob file in Azure storage explorer. It’s in a folder of a specific blob container.I’m using python. I used this code. sourceFileName = abc.xlsx destinationFileName = xyz.xlsx sourcePath = ‘cloudops-resources/outputs/’ destinationPath = ‘cloudops-resources/outputs/’ blob_url = blob_service.make_blob_url(sourcePath,sourceFileName) …

Total answers: 1

Not able to run Azure blob triggered function in portal

Not able to run Azure blob triggered function in portal Question: I’m new in developing with Azure. Currently I’m trying to develop a blob triggered python function which was initially developed using VS Code. When it was tested by running in VS Code, it worked perfectly and got the expected output, however when it was …

Total answers: 1

SQL Query in python file shows up as "COLUMNS" instead of "VALUES"

SQL Query in python file shows up as "COLUMNS" instead of "VALUES" Question: I am very new at this, and im trying my best but i simply cant see where im f…ing up =( I have made an SQL Query in my python file. I want to write to my Azure database table –> make …

Total answers: 1

Getting Error: [Errno 95] Operation not supported while writing zip file in databricks

Getting Error: [Errno 95] Operation not supported while writing zip file in databricks Question: Here i am trying to zip the file and write that to one folder (mount point) using below code in Databricks. # List all files which need to be compressed import os modelPath = ‘/dbfs/mnt/temp/zip/’ filenames = [os.path.join(root, name) for root, …

Total answers: 1

Pyarrow slice pushdown for Azure data lake

Pyarrow slice pushdown for Azure data lake Question: I want to access Parquet files on an Azure data lake, and only retrieve some rows. Here is a reproducible example, using a public dataset: import pyarrow.dataset as ds from adlfs import AzureBlobFileSystem abfs_public = AzureBlobFileSystem( account_name="azureopendatastorage") dataset_public = ds.dataset(‘az://nyctlc/yellow/puYear=2010/puMonth=1/part-00000-tid-8898858832658823408-a1de80bd-eed3-4d11-b9d4-fa74bfbd47bc-426339-18.c000.snappy.parquet’, filesystem=abfs_public) The processing time is the same …

Total answers: 2

Azure DataBricks ImportError: cannot import name dataclass_transform

Azure DataBricks ImportError: cannot import name dataclass_transform Question: I have a python notebook running the following imports on a DataBricks cluster %pip install presidio_analyzer %pip install presidio_anonymizer import spacy.cli spacy.cli.download("en_core_web_lg") nlp = spacy.load("en_core_web_lg") import csv import pprint import collections from typing import List, Iterable, Optional, Union, Dict import pandas as pd from presidio_analyzer import AnalyzerEngine, …

Total answers: 2

Speech SDK trowing error: Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE)

Speech SDK trowing error: Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE) Question: I have a small script in python: def listen(language): speech_config.speech_recognition_language=language audio_config = speechsdk.audio.AudioConfig(use_default_microphone=True) speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) print("Speak into your microphone.") speech_recognition_result = speech_recognizer.recognize_once_async().get() if speech_recognition_result.reason == speechsdk.ResultReason.RecognizedSpeech: print("Recognized: {}".format(speech_recognition_result.text)) return speech_recognition_result.text This code is derived from the QuickStart SpeechSDK Tutorial found here:https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=linux%2Cterminal&pivots=programming-language-python …

Total answers: 1

Using the right api_version of the azure SDK

Using the right api_version of the azure SDK Question: I am trying to verify the existence of some resources in my tenant. I use the ResourceManagementClient to do so, either the check_existence_by_id method or get_by_id as described in this issue. My script uses a constant api_version for now, "2022-09-01", which apparently isn’t supported for every …

Total answers: 1

Azure WebsiteManagementClient for Python: how to get web app by ID?

Azure WebsiteManagementClient for Python: how to get web app by ID? Question: I’m using version 7.0.0 of azure-mgmt-web for Python. I know we can fetch a site with: from azure.mgmt.web import WebSiteManagementClient web_client = WebSiteManagementClient(…credentials here…) site = web_client.web_apps.get(RESOURCE_GROUP_NAME, SITE_NAME) But is there a way to fetch the same resource by using its full ID? …

Total answers: 1