CSV: function dataset.export_as_csv(dataset_name,filename,tmp=true) implemented with COPY (SELECT * FROM dataset.vw_$name) TO filename.
Any JSON: function dataset.export_as_json(json,filename,tmp=true) implemented with COPY (SELECT $1) TO $2.
JSON Tabular Data:
Row Arrays: function dataset.as_jsontab_arrays(dataset_name) implemented with SELECT * FROM meta.keys where dataset.meta_id($1) UNION ALL (SELECT big.c ...) ORDER By 1.
Row Objects: SELECT jsonb_object(meta.keys,big.c) FROM big, meta WHERE dataset=$1
Export to JSON, JSONb and file, using SQL COPY and JSON functions.
COPY and Frictionless Data Tabular Resources:
CSV: function
dataset.export_as_csv(dataset_name,filename,tmp=true)
implemented withCOPY (SELECT * FROM dataset.vw_$name) TO filename
.Any JSON: function
dataset.export_as_json(json,filename,tmp=true)
implemented withCOPY (SELECT $1) TO $2
.JSON Tabular Data:
Row Arrays: function
dataset.as_jsontab_arrays(dataset_name)
implemented withSELECT * FROM meta.keys where dataset.meta_id($1) UNION ALL (SELECT big.c ...) ORDER By 1
.Row Objects: SELECT jsonb_object(meta.keys,big.c) FROM big, meta WHERE dataset=$1
... Cats, convertions, etc. of datasets.