02-03-2017 12:45 PM - edited 07-15-2021 12:42 PM
The 'How to Guide' to Cognitive Services Text Analytics Macro
As Microsoft continues to grow it's Machine Learning capabilities, Alteryx is following suit and has built a new connector taking advantage of Microsoft's Cognitive Text Analytics API.
The new Cognitive Services Text Analytics Macro will replace the AzureML Text Analytics Macro, keeping sentiment analysis and key phrase extraction, while also adding Language and Topic detection.
To use this macro you will need to create a Microsoft Account, as well as signing up to theMicrosoft Azure Account.
Sign in or create a Microsoft Azure Account and this should take you to theAzure portal. You will need to click on 'Create a resource' and search for 'Text Analytics'.
You can then click 'create' in the bottom right corner.
You will need to set up asubscriptionsif you haven't already. Once you set up an account, you can return to this stage and continue.
Once you have set up a subscription you will be able tocreate an applicationby filling out the following window. Hot 'Create once you are finished and this prompt azure to deploy this application (This may take a minute - you should see it in the top right of the web browser).
You can then click on the notification tab and Pin to Dashboard then go to resource.
Once you have done this you should see the screen below: (If you don't please refresh or sign in & out of cognitive services untilyou see the information you added above within the information ribbonbelow).
Click on keys, then copy and Paste theminto the Cognitive ServicesMacro and select your field and type of text analysis.
Common Errors:
Error: Invalid subscription key
This error tends to occur because the account hasn't fully been processed by Microsoft.
Solution: Please log in & out of Azure, verify the information looks correct and then copy and paste the key into Alteryx.
Best,
Jordan Barker
Solutions Consultant
Hi @JordanB the new process generates 2 keys and neither seem to work in the macro? Any advice?
Cheers,
Joe
Hi @Joe_Lipski
Have you set this up on Azure dashboard as well? I went through the process of setting this up through the text Analytics website, but I also needed to set up Azure and sign up for a free account.
You should then be able to add the account (Screen below)
Once I made sure my account was Active and not Preview, I had to log in and out of the Azure dashboard site! The account then seem to take hold and I chose Key 1.
If you have just set up the account I would recommend logging in and out and using Key 1 again.
Keep me updated.
@JordanB All working now! Think it was just a case of logging out and logging back in! Thanks!
@JordanB I get the error "The authorization type you provided is not supported. Only basic and OAuth are supported". My account shows active and both keys generate the same error. Any ideas? Thank you.
Can you refresh (logoff) Azure on your webpage as we have seen the keys sometime take a while to take hold on the site.
Can you then insert a new cognitive tool into the canvas and try again.
Best,
Jordan Barker
Solutions Consultant
Thanks for this @JordanB
It worked perfectly for me first time.
Michael, I was just trying to get this working today, and ran into the same issue myself. Whenever I search for Cognitive Services APIs, the only thing I get in my results is Azure Search. If anyone's got the fix, I'm in the market for it!
Hi @MichaelSu & @paulb1
I was actually helping @Treyson with this at Inspire last week and you need to:
Hope that helps!
Thanks Joe, I was able to get it to work using Translator Text API. Do you know what the difference is between the two?
Not from an Azure stand point, but I know that you have the option to do Translation in the Alteryx macro, so I assume they probably use the same key - I don't know if the free limits or pricing are different but it might be worth investigating.
Yes, that did the trick. Thank you @Joe_Lipski !!
Can confirm. @Joe_Lipski did help me last week. It was glorious.
All the article has now been updated. Thanks Joe for the steps
Hi Jordan,
Text Analytics API generated 2 keys but none of them seem to work even after logging in & out from the Azure Portal.
When I run the workflow in Alteryx, it returns the error like:
Error: Cognitive Services Text Translation (7): Tool #34: Iteration #1: Tool #57: The test "Bad API call - check API key" failed on record # 1
Any advice?
Thanks!
Cheers,
Hyun
hi @HyunS - All working fine for me.
I think you may have to wait 10-15 minutes for the keys to become active, so hopefully it's working again now.
If not, make sure your Endpoint in Alteryx is set as westus as this stopped mine working once before.
Thanks,
Joe
Hi @HyunS
@Joe_Lipski is right sometimes it takes a while for the keys to take hold. Keep us updated
Best,
Jordan
Hiya Jordan and Joe,
I'm having a similar issue to HyunS.
Have set endpoint as WestUS, have waited (reloaded and refreshed) for API keys to become active, but still no dice.
I don't know anything about creating macros, but a quick look under the hood shows that this is pointing to "https://api.microsofttranslator.com/V2/Http.svc/Detect" - that looks like an old URL... could this be the issue?
Keen to get any help you can provide!
Cheers,
Jon
(I suspect I may have found the issue, will update)
@JonTurpin
Any luck - as I am having the same issue...
Turns out I wanted to use the translation macro rather than the text analytics macro - they look similar in Azure, but are separate and generate different keys.
Might be what you need?
Hi All,
Wondering if anyone has had any issues with the API call receiving error message "Invalid value. at character position: 0"
The data we are trying to pass through is clean (data cleansing tool beforehand) and set to type VW String. I understand this may be more of a an API issue but wondering if anyone has had success working around it?
It does not work here. I'm getting the bad API call error. I put Location as North Europe instead of West US. Is that the issue?
Hi!
Has there been any update on this? I set up the Azure piece of it this hours ago and I am still getting the following error. Thanks 🙂
Hi @mahinouralaa - That looks like a different tool, you should download and use this one, which I've checked still works fine for me: https://gallery.alteryx.com/#!app/Microsoft-Cognitive-Services-Text-Analytics/5d926c92826fd30b845378...
I'd suggest trying to get in touch with Peter on the link you've listed and hopefully he can help.
Otherwise do try the link I posted which is the macro that this blog talks about as that does work. Is there a reason why you don't want to use it?
Hi @JordanB and @Joe_Lipski
Have you come across this error?
Error: Cognitive Services Text Analytics (85): Tool #192: e2 does not yet support the Throttle tool.
I've use a select record tool to pass 1 record and select tool to pass one field.
Cheers!
Hi @joesparty,
I think all you should need to do is uncheck the 'Use AMP Engine' button in your workflow configuration settings:
You will probably also need to do this in the macro, so right click on the tool, open as macro and then uncheck it there and save it.
Hopefully, that should do the trick.
AMP Engine and e2 are the same thing and you can read the specifics about it here: https://help.alteryx.com/20221/designer/alteryx-amp-engine
@Joe_Lipski that did resolve that issue! I have created a Translator service and tried both free and pay as you go without luck. Any thoughts as to what else I could try?
Error: Cognitive Services Text Analytics (2): Tool #76: Microsoft API error... HTTP/1.1 401 {"error":{"code":"401","message": "The Detect Language Operation under Text Analytics API (v2.0) is not supported with the current subscription key and pricing tier TextTranslator.S1."}}
Did the Microsoft Cognitive Services replace the Text Translator?
@joesparty were you able to resolve the error? I have the same error.
Error: Cognitive Services Text Analytics (6): Tool #76: Microsoft API error... HTTP/1.1 401 {"error":{"code":"401","message": "The Detect Language Operation under Text Analytics API (v2.0) is not supported with the current subscription key and pricing tier TextTranslator.F0."}}
@harvjul sorry no.