A simple console app that will convert all of the distinct Product Thumbnails into their proper pictures - from the SQL DB to your local file system, so you can put them anywhere.
This little app was built in conjunction with a Proof-of-Concept and blog post I did surrounding the new Preview version of custom verticals for SharePoint Graph Connectors. In the post, I built a serverless Azure SQL db and treated it like an "on-prem" SQL database. I loaded the database with AdventureWorks data, which I called HomolWorks (naturally 😜). Then I setup a Power BI gateway on an Azure VM, which connected to the database. This gateway is then used by the Graph Connector for SQL Server. My queries centered around pulling and indexing the products in the Adventure Works data. In the Products table, there is a ThumbNailPhoto field and a ThumbnailPhotoFileName field. Since this was just a POC, rather than build an ASP.Net service that pulls the data for each filename and returns the bit stream via URL, it seemed easier for me to just get them loaded up statically once and forever. Hence this little app. If it's useful to you, have at it.
Here's a sample of a row, formatted to JSON:
{
"@odata.context": "http://localhost:35027/odata/AdventureWorks/$metadata#Products",
"value": [
{
"ProductID": 714,
"Name": "Long-Sleeve Logo Jersey, M",
"ProductNumber": "LJ-0192-M",
"Color": "Multi",
"StandardCost": 38.4923,
"ListPrice": 49.99,
"Size": "M",
"Weight": null,
"ProductCategoryID": 25,
"ProductModelID": 11,
"SellStartDate": "2001-07-01",
"SellEndDate": null,
"DiscontinuedDate": null,
"ThumbNailPhoto": "R0lGODlhUAAyAPcAABQlZ/z8/J+fnyxLZ87OzuTk5Dtliqqqqiw0WMrKyvDw8EdXpRAYLsbGxubm5urq6qSkpO7u7uLi4mlmZa+vrxAhNiJai4iVqtLQ5rGxsY2v0zMzNfr6+i5zsiVLcmNwmLK8yHZ1esLCwhhHnfb29lB1rDIWcBdQofj4+H6OnfT09Li4tx07iCYlJt7e3qeotNra2o2NjTRcqCM0dQw2WxpTiCk0ZyxDXs/Q0BZkqvLy8hZamBlIhUWBt4enxVNLRpGRkRE/a1NXdRszlN3d3bS0tNfX15qamTI0PT4+PhYYHRkuWVdUUjE0Rw8aSCRUf9TU1GmGpn2lzIeCfsfG2RdhqVdPSkxcg5WVlMzR2Bk/maWhnKyppk5IRCxYmgUGCFBjfND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EblCAEJShA7nJn4NwZKIIdLpEAKrZI2hjGKXdREwASwMIQd3hJJhgBDGDMwREEwIHAcRCNaNzh4HdABwxEgWV4HOjW085wTjU4DRJoohZVtN8jjnGMVqTt4yCvxbNaVKCHbzrG+0CigCpWzvKWu/zlK7/EJfqwgprzog84z7nOb86Lnvu8Dz7nRc3tYAdnFKEIGSg3JShxgG5DAAJsEICxx4CFUgcEADs=",
"ThumbnailPhotoFileName": "awc_jersey_male_small.gif",
"rowguid": "6a290063-a0cf-432a-8110-2ea0fda14308",
"ModifiedDate": "2004-03-11"
}
]
}
You will need an appsettings.json for this app to run anew. All you need it to look like is this:
{
"ConnectionStrings": {
"DataConnection": "Server=tcp:{serveraddress},1433;Initial Catalog=AdventureWorks;Persist Security Info=False;User ID={userid};Password={password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}
}