- 17 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Introduction
- Updated on 17 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
This feature is not available in the local mode.
A view is a virtual table created by joining an internal table with one or more imported tables or tables in the external catalog registered on the External catalog page. Let us consider an example where ground truth and prediction values for each image file are imported into Data Explorer by uploading a file(Quick Import catalog). On execution of pipelines, the primary table will be populated with file path as shown below.
file_id | file_name | file_path |
---|---|---|
1 | CAR200/SENSOR5/20220901-1.jpg | s3a://databucket/CAR200/SENSOR5/20220901-1.jpg |
2 | CAR200/SENSOR5/20220901-2.jpg | s3a://databucket/CAR200/SENSOR5/20220901-2.jpg |
Suppose the imported catalog contents have the ground truth and prediction information as below.
id | file_name | ground_truth | prediction | score |
---|---|---|---|---|
12345 | CAR200/SENSOR5/20220901-1.jpg | car | ||
12346 | CAR200/SENSOR5/20220901-1.jpg | bus | 0.6 | |
67898 | CAR200/SENSOR5/20220901-2.jpg | bus | ||
67899 | CAR200/SENSOR5/20220901-2.jpg | bus | 0.9 |
A view is specified to join the above two tables, after which all operations, like filtering the catalog output, can utilize the information in the external table. A view requires the following:
- Two or more tables that are to be joined.
- Alias name for each table that gets prefixed to each column name to ensure that column names in the view are unique.
- A join column that is a common key column between both tables.
With 'int' and 'imp' used as alias names for internal and imported tables, respectively, and file_name used as the join column, the view will look below.
int_file_id | int_file_name | int_file_path | imp_id | imp_file_name | imp_ground_truth | imp_prediction | imp_score |
---|---|---|---|---|---|---|---|
1 | CAR200/SENSOR5/20220901-1.jpg | s3a://databucket/CAR200/SENSOR5/20220901-1.jpg | 12345 | CAR200/SENSOR5/20220901-1.jpg | car | ||
1 | CAR200/SENSOR5/20220901-1.jpg | s3a://databucket/CAR200/SENSOR5/20220901-1.jpg | 12346 | CAR200/SENSOR5/20220901-1.jpg | bus | 0.6 | |
2 | CAR200/SENSOR5/20220901-2.jpg | s3a://databucket/CAR200/SENSOR5/20220901-2.jpg | 67898 | CAR200/SENSOR5/20220901-2.jpg | bus | ||
2 | CAR200/SENSOR5/20220901-2.jpg | s3a://databucket/CAR200/SENSOR5/20220901-2.jpg | 67899 | CAR200/SENSOR5/20220901-2.jpg | bus | 0.9 |