Hepl Needed - Extract file loaded in BLOB column

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Enthusiast

Hepl Needed - Extract file loaded in BLOB column

I have loaded TXT file in table, but now when I am trying to extract, it seems I am doing something wrong.

Table defination 

CREATE MULTISET TABLE TABLE1 
(
COL_1 INTEGER,
COL_2 binary large object
)
PRIMARY INDEX ( COL_1 );

Imported using IMPORT mode of SQL Assistance

INSERT INTO
TABLE1 (COL_1, COL_2)
VALUES (?, ?B);

it is successful .

TRIED EXPORTING LIKE

1. SELECT * FROM TABLE1;
2. SQL Assistance is asking me for information like file name, location and file type.
3. provided file type and location. Kept defalut file name which is column name
4. Allowed to execute
5. I can see the result on sql assistance with "?" on blob column
6. tried finding the file on given location but cant see any

1 REPLY
Teradata Employee

Re: Hepl Needed - Extract file loaded in BLOB column

If you see a ? instead of a file link, that implies the BLOB value is NULL.

 

INSERT INTO
TABLE1 (COL_1, COL_2)
VALUES (?, ?B);

Expects the import file to contain something like:

1,BLOBfile1.dat

2,BLOBfile2.dat

Where BLOBfile1.dat is a separate file in the same directory as the import file, which contains only the data to be stored for the BLOB column.