Using generic table functions
Use generic table functions when you have to produce different customized result sets based on different unstructured data inputs. For example, you might have data stored in CSV (comma-separated values) files, with different schemas.
About this task
If you want to join data that is stored in relational tables in a database with data stored in a CSV file, then you must use a generic Java™ table function to read and parse the data.
Procedure
What to do next
You can now use the new Java function
to analyze your data. For example, issue the following SELECT command:
SELECT csv.name, csv.department, csv.id
from T1, TABLE (CSVREAD( '~/csvfiles/file_1'))
AS csv (name varchar(128), department varchar(128), id int)
where T1.ID = csv.id;