Relation:import

Imports a text file and creates a relation with a singe column and one row per line. Parses XML and JSON files.

Description

import expression

Parameters

  • expression: result must be a valid name with any extension

Examples

example comment
import "numberlist.txt" Reads the file line per line and creates one column line and one column txt
import "file.json" Parses the JSON file and creates one column path and one column text and one line per textnode and per attribute. See Import JSON
import "file.xml" Parses the XML file and creates one column path and one column text and one line per textnode and per attribute. See Import XML
import "file.wiki" Parses a wikitext file and and reads all fields into a relation. See Import wiki

Comments

There is no path, only the filename. You can only import after having saved the document as .rel file in a folder. The file must be in the same folder. Relation uses a Relation:sandbox.

You use import when the data is not tabular and you need to parse it manually.

See also

relation read parse