RenderType
RenderType
SmooSense automatically infers and renders data in the most appropriate format for each column. This intelligent rendering system examines your data and chooses the best visualization, making tables intuitive and rich without any configuration.
1. How RenderType Works#
When you load a table, SmooSense fetches ColumnMeta for each column and infers the most suitable RenderType. This inference happens automatically based on:
- ColumnMeta - Type shortcuts (
isBoolean,isNumeric,isDatetime,isPrimitive,isNumericArray) and DuckDB type - Content patterns - URLs are identified and classified by file extension or domain
- Column naming conventions - Special column names like
bboxorimage_masktrigger specialized renderers
2. Supported RenderTypes#
2.1 Basic Types#
2.2 Media Types#
SmooSense renders media directly in table cells, providing instant visual context.
Supported image formats: jpg, jpeg, png, gif, bmp, svg, webp, tiff, tif, ico, heic, heif
Supported video formats: mp4, avi, mov, wmv, flv, webm, mkv, m4v, 3gp, ogv
Supported audio formats: mp3, wav, ogg, flac, m4a, aac, wma, opus
2.3 List Types#
Arrays of media URLs are rendered as scrollable galleries within cells.
2.4 Structured Data Types#
2.5 Embedding#
Array of float or double having the same length will be inferred as embedding. Similarity search will be triggered when an embedding cell is clicked.
2.6 Specialized Types#
These types handle domain-specific data formats.
3. Inferring Logic#
3.1 URL Classification#
When a string is identified as a URL, SmooSense classifies it based on:
- File extension - The extension in the URL path determines the media type
- Domain patterns -
youtube.com,youtu.be, andvimeo.comare treated as video URLs - IFrame prefix - URLs prefixed with
iframe+http://oriframe+https://are rendered in iframes
3.2 Date Inference#
SmooSense recognizes these date formats:
YYYY-MM-DD(e.g.,2024-01-15)- ISO 8601 with time (e.g.,
2024-01-15T10:30:00) MM/DD/YYYYorM/D/YYYY(e.g.,01/15/2024)MM-DD-YYYYorM-D-YYYY(e.g.,01-15-2024)
3.3 Column Name Conventions#
Certain column names trigger specialized rendering:
*bbox*- Enables bounding box visualization when values are[x, y, width, height]arrays*image_mask*- Enables mask overlay on an associatedimage_urlcolumn*word_score*- Enables word-level score visualization
4. Media URL Resolution#
SmooSense automatically resolves media URLs to make them viewable in the browser. This allows you to use relative paths, local file paths, and S3 URLs directly in your data.
4.1 Supported URL Formats#
Resolution Examples:
-
Relative path with local table:
- Input:
./images/photo.jpgwith tablePath/data/file.csv - Output:
/api/get-file?path=/data/images/photo.jpg
- Input:
-
Relative path with S3 table:
- Input:
./images/photo.jpgwith tablePaths3://bucket/data/file.csv - Output:
/api/s3-proxy?url=s3://bucket/data/images/photo.jpg
- Input:
-
Relative path with HTTP table:
- Input:
./images/photo.jpgwith tablePathhttps://example.com/data/file.csv - Output:
https://example.com/data/images/photo.jpg
- Input:
4.2 Serving media assets in backend#
4.2.1 File Serving Endpoint
URL: /api/get-file
Serves local files (relative paths, absolute paths, home paths). Accepts path parameter with file location.
4.2.2 S3 Proxy Endpoint
URL: /api/s3-proxy
Proxies S3 URLs and redirects to a signed URL with temporary one-time credential contained. Accepts url parameter with full S3 URL (e.g., s3://bucket/path/to/file).
4.3 When URLs Are Resolved#
A URL is resolved only when all of these conditions are met:
- The value is a string
- It starts with
./,/,~/, ors3:// - It has a media file extension (image, video, audio, or PDF)
HTTP/HTTPS URLs are used directly without modification.
5. Performance Considerations#
- Media content is loaded lazily as cells scroll into view
- Embeddings numbers are not displayed since they make no sense to human anyway.
- Large JSON objects are collapsed by default with expandable views
- List types show limited previews with "show more" functionality