BookmarkSubscribeRSS Feed
ankitshah_15
Calcite | Level 5

Hi All,

 

I have a column which has a Image URL. I would like to write a SAS Stored Process which will give me the actual image from the corresponding Image URL in a new column "Image". Is this feasible in SAS Stored Process?

 

Thanks in advance!!!

6 REPLIES 6
Reeza
Super User

Does your database support storing images in a column? AFAIK SAS does not natively but many DBs support this option. 

ankitshah_15
Calcite | Level 5

Hi Reeza,

 

I have the image URLs stored in Netezza DB. It allows storing of URLs in columns

Reeza
Super User

@ankitshah_15 wrote:

Hi Reeza,

 

I have the image URLs stored in Netezza DB. It allows storing of URLs in columns


Unless I'm mistaken, your question seems like you're asking to store the image, not the image URL? Does Netezza support image type columns?

If that's incorrect, what are you trying to do?

ankitshah_15
Calcite | Level 5
Hi Reeza,

Image URL is already stored in one of the columns in the Netezza table. My ask is to automatically fetch the images from the URL and display the image as SAS Output in one of the columns possibly via proc report
Reeza
Super User
That's significantly different than your initial question to store it in a data set. You can use PROC HTTP to download the image and store it locally and reference it or your HTML can reference the URL to include. It depends a bit on your output format, since an HTML report just links usually, HTML5, PDF, RTF, PowerPoint will embed the images. So you need to provide more details on what you're trying to do.

https://blogs.sas.com/content/sasdummy/2012/12/18/using-sas-to-access-data-stored-on-dropbox/

A similar idea to the blog post above can be used to download the file. But not you have it stored locally and still need to reference it somehow.
Vince_SAS
Rhodochrosite | Level 12

Using PROC HTTP to retrieve the image seems to be the correct answer.

 

Use DATA step code to get the desired URL from the Netezza database, store it in a global macro variable, and then use that macro variable in the URL option of PROC HTTP.

 

Vince DelGobbo

SAS R&D

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1623 views
  • 2 likes
  • 3 in conversation