fabragaMS / ADPE2E

Azure Data Platform End-to-End
343 stars 239 forks source link

ForEach Loop in ADF while calling Image Function (NYCImageMetadata-Lab) has space in the path passed in - here is a fix... #22

Open jhasanjay opened 2 years ago

jhasanjay commented 2 years ago

There was a problem in passing the list of images in ADF for calling the function created in Databricks Notebook (Lab 04- Step 18) - there is a bug causing a space between the image container path and image name. You need to put this in ForEachImage base parameters to fix the spaces coming between the container path and image name- @concat(trim(variables('ImageMetadataContainerUrl')), trim(item().name))

Li-Yanzhi commented 2 years ago

There was a problem in passing the list of images in ADF for calling the function created in Databricks Notebook (Lab 04- Step 18) - there is a bug causing a space between the image container path and image name. You need to put this in ForEachImage base parameters to fix the spaces coming between the container path and image name- @concat(trim(variables('ImageMetadataContainerUrl')), trim(item().name))

Another fix method is add following line in Python notebook line 3:

nycImageUrl = nycImageUrl.replace("/ ", "/")
bactran6787 commented 2 years ago

There was a problem in passing the list of images in ADF for calling the function created in Databricks Notebook (Lab 04- Step 18) - there is a bug causing a space between the image container path and image name. You need to put this in ForEachImage base parameters to fix the spaces coming between the container path and image name- @concat(trim(variables('ImageMetadataContainerUrl')), trim(item().name))

Another fix method is add following line in Python notebook line 3:

nycImageUrl = nycImageUrl.replace("/ ", "/")

Hi, I got the error below: _"HTTPError: 403 Client Error: Forbidden for url: https://australiaeast.api.cognitive.microsoft.com/vision/v2.0/analyze?visualFeatures=Categories%2CDescription%2CColor%2CBrands%2CTags%2CObjects&details=Landmarks%2CCelebrities" I have tried the code in line 3 but it still not working " dbutils.widgets.text("nycImageUrl", "", "Image URL") nycImageUrl = getArgument("nycImageUrl") nycImageUrl = nycImageUrl.replace("/ ", "/")"

Any help is appreciated