community
cancel
Showing results for 
Search instead for 
Did you mean: 

Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!
SOLVED

Input PDFs (they are images)

Highlighted
Fireball

Hey @Awesomeville, so I ended up taking a shot at this Azure service today.  I was able to sign up for the free tier and start testing things out.

 

I was able to get a custom tool working that sends images and PDFs to the Azure endpoint, waits for Azure to process the files, and then downloads and parses the results.  I tested this on some handwritten sentences I wrote and scanned to PDF for testing, and am amazed at how well it works.  I can see a huge potential use case for my department regarding things like contract analysis.  This is a powerful OCR service Microsoft provides.  The tool is attached to this message if you want to try it out.  Let me know if you run into issues.  Also, you can view the code here on GitHub.

 

If you want to talk about how it works, feel free to start a discussion and I can walk you through the code.

Alteryx Certified Partner
Alteryx Certified Partner

Not too shabby at all @tlarsen7572  (awesome)

 

TestingOCR.png

Meteor

Thanks for the awesome work!

 

I can't input the tool so will need to use the code on GitHub. Can you walk me through how to put this into a workflow? I'm quite new to the Python SDK world. 

 

If you attach an example workflow showing how to convert a PDF into data, that would be perfect

Fireball

Hey @MattDuncan, welcome to the Python SDK world!

 

The easiest place to start would be installing the tool from the yxi.  What do you mean by, 'I can't input the tool'?  Inside the zip should be a yxi file.  Extract it and open it from Alteryx.  Alteryx will present an installation dialog.  Once you install the tool you can find it in the Laboratory tab:

OCR1.PNG

 

If you cannot find the Laboratory tab, click the plus sign at the right of the tabs and make sure Laboratory is selected:

OCR2.PNG

 

Once the tool is installed, start your workflow by creating a list of file paths you want converted.  I usually use the Text Input tool or the Directory tool for this:

OCR3.PNG

 

Add the OCR tool and configure it with the endpoint and key from your Azure portal:

OCR4.PNG

 

The easiest way to get the endpoint and key is to go to the Overview or Quick start sections on Azure.  This is what my Quick start looks like.  I can copy the endpoint and key right from this page and paste it into the Alteryx tool:

OCR5.png

 

And that should be it.  The beauty of the Python SDK is that there is no configuration required on your end beyond installing the tool with the YXI file.  If you are having an error doing so, let us know and we can troubleshoot.

Atom

Hi @

 

Thank you for sharing! I was able to successfully install the OCR tool in Alteryx. However, I've been having trouble locating the endpoint to use in the configuration since my Quick Start section in Azure doesn't look like yours in the screenshot. In an attempt to create an endpoint, I added a virtual machine in Azure with a static IP address and tried to use that as the endpoint. Though, I'm not sure if that is correct or necessary.

 

I was also unsure if the Subscription Key needed for the configuration is the same as the Subscription ID that I see in Azure. I would greatly appreciate any tips you have on how to overcome this!

Fireball

Hi @Jamie12!  Did you create a Computer Vision resource in your Azure portal?  I just checked my Quick Start and it hasn't changed it's appearance.

 

From the home page of your Azure portal, click 'Create a resource'

Computer Vision 1.JPG

 

Search the marketplace for 'computer vision'.  You should see something like below

Computer Vision 2.JPG

 

Once you create the Computer Vision resource, you should have access to the Quick Start page that looks like mine and which will provide you with the key and the endpoint.

 

Does that help, or are you still unable to access the API?

Atom

That did the trick! Thank you so much @