Michael Kalada 2 Posted October 23, 2019 Posted October 23, 2019 I have a SQL table that stores images as VARBINARY(MAX). When I bring the data into spotfire through infolinks it comes as blob, no option to bring it in as binary is available The image displays in a table visualization fine, though its small and increasing the row height doesnt enlarge the picture I'd like to store the value from the table in a document property so it can be displayed in a text area via label but all the scripts that show how to do this are taking images from a network drive. For examplehttps://community.spotfire.com/wiki/how-load-image-file-and-display-document-property-tibco-spotfirer-using-ironpython-scripting Problem is security team wont allow the web player access to network drives. If i create a binary document property and then try to update it from the table value I get a "value argument has incompatible data type" error. How can I take the value from the table and display it as image in a text area Sample dxp version 10 attached
Kirsten Smith (she/her) Posted October 23, 2019 Posted October 23, 2019 Have you tried using the SQL Data Connector to access your data instead of the Information Link This is a more native way to access data, and should store the geometry column values as Binary objects.
Shandilya Peddi Posted October 23, 2019 Posted October 23, 2019 In the attached analysis, the column type is Binary. Similar to the wiki article you shared, you can use the below script to read the binary column values and set it to a document property of type binary and show it in the text area. from Spotfire.Dxp.Data import * table = Document.ActiveDataTableReference; binaryColumn = table.Columns["ImageBinary"]; cursor = DataValueCursor.Create[binaryLargeObject](binaryColumn); for row in table.GetRows(cursor): value=cursor.CurrentValue print cursor.CurrentValue Document.Properties["test"]=value
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now