TD SQLA 16.10 - Suppress File Preview

Teradata Applications

TD SQLA 16.10 - Suppress File Preview

I have a table with a BLOB field:

 

 

CREATE TABLE $DB_NAME$.ItemAttachment (
    ItemId INTEGER NOT NULL,
    AttachmentId INTEGER NOT NULL,
    FileName VARCHAR(500),
    FileExtension VARCHAR(50),
    FileSize INTEGER,
    Description VARCHAR(500),    
    DataFile BYTEA,
    PRIMARY KEY (ItemId, AttachmentId),
    FOREIGN KEY (ItemId) REFERENCES $DB_NAME$.Item(ItemId)
)
;

When I do a SELECT * from SQLA, it returns a preview of the DataFile field, which is an image.  How can I disable this preview?  I just want the old usual BLOB behavior of having a link to the file.  So, when I click on the link, it will open up the image.

 

 

In the Options --> Answerset field:

 

2017-11-05 10_19_57-Options.png

If I check "Use default file names..." then I get the image preview, which makes a messy resultset window. 

 

2017-11-05 10_20_34-Teradata SQL Assistant (iggyslist).png

 

If I change the extension from "jpg" to "txt" for example, then I almost get what I want -- nice tidy rows with a pointer to my file.  But when I click on the file, it tries to open with notepad.

 

If I uncheck "Use default file names..." then I get prompted for how to handle the BLOB data.  This creates a link to the files in my result set, but I don't want to be prompted every time.

 

2017-11-05 10_19_24-LOB Information.png

 

Is there a nice way to get what I want (screenshot below) without having a window prompt for each query run?

 

2017-11-05 10_19_36-Teradata SQL Assistant (iggyslist).png

 

Thanks.

Tags (1)

Accepted Solutions
Teradata Employee

Re: TD SQLA 16.10 - Suppress File Preview

If the data really is a picture there is no simple way to display it as a link without displaying the prompt screen each time.

 

The only work around I can think of would be to set the default file type to something like 'xyz' (instead of 'jpg') and then set up a file association on your system to say that file type 'xyz' is associated with whatever picture viewer application you use.

Since 'xyz' is not a 'picture' type SQL Assistant will not offer to display it as a picture so it will display it as a link. And if you have correctly associated xyz with your picture viewer app then that app will launch when you click the link.

1 ACCEPTED SOLUTION
3 REPLIES
Teradata Employee

Re: TD SQLA 16.10 - Suppress File Preview

In the Data Format options tab, set "Handle Binary/Byte columns as BLOBs if size >" to 0

Teradata Employee

Re: TD SQLA 16.10 - Suppress File Preview

If the data really is a picture there is no simple way to display it as a link without displaying the prompt screen each time.

 

The only work around I can think of would be to set the default file type to something like 'xyz' (instead of 'jpg') and then set up a file association on your system to say that file type 'xyz' is associated with whatever picture viewer application you use.

Since 'xyz' is not a 'picture' type SQL Assistant will not offer to display it as a picture so it will display it as a link. And if you have correctly associated xyz with your picture viewer app then that app will launch when you click the link.

Re: TD SQLA 16.10 - Suppress File Preview

Thanks guys.