MeridianMERIDIAN

object

7 object types: 6 a sibling also accepts, 1 of which it would misread, 1 that decompose into parts.

7 types

The 7 object types

Each type's first registry sample, against every sibling's rule

TypeSampleAlso accepted by
HTML Content
html · VARCHAR
<p>Hello world</p>csv → <p>Hello world</p>; xml → <p>Hello world</p>
JSON Object
json · JSON
{"user": "john", "age": 30}csv
JSON Array
json_array · JSON
[1, 2, 3]csv
S-Expression
s_expression · VARCHAR
(ROOT (S (NP (NN cat)) (VP (VBZ sits))))csv
XML Document
xml · VARCHAR
<root><name>John</name><age>30</age></root>csv
YAML Document
yaml · VARCHAR
name: John age: 30 active: truecsv
CSV Record
csv · VARCHAR
John,30,true—

Which object type is it?

3 of 7 object types accept it, and read it 2 ways.

TypeReads it as
HTML Content htmlHello world
CSV Record csv<p>Hello world</p>
XML Document xml<p>Hello world</p>

How the engine tells them apart

  • HTML Content — Detection relies on recognizing common HTML tag names to distinguish from XML (which requires well-formedness).

Use it

CLI · DuckDB
$ printf '%s\n' '<p>Hello world</p>' '<div class="test"><a href="url">link</a></div>' > column.txt
$ finetype infer -f column.txt --mode column

SELECT ft_profile(v) FROM (VALUES ('<p>Hello world</p>'), ('<div class="test"><a href="url">link</a></div>')) t(v);

After <div class="test"><a href="url">link</a></div>, 3 types remain: csv, html, xml.

Type Registry