es_export()

Read(42) Label: export, json, csv,

Description:

Export data to the local.

Syntax:

es_export(fd, filename:cs, indexName, colX)

Note:

The external library function exports data to the local; only support exporting data from a JSON or CSV file.

Parameters:

fd

restclient object

filename

Name of the local file to which data is exported

cs

Character set, which is GBK by default

indexName

Index name

colX

Column names represented by a sequence; export all fields by default

Return value:

boolean

Example:

 

A

 

1

=es_export(A1,"d:/tmp/emp1.json","emp")

Export all records whose index is emp to the local file emp1.json

2

=es_export(A1,"d:/tmp/emp2.csv":"UTF-8","emp",["EID","NAME","GENDER","BIRTHDAY"])

Export all records whose index is emp to the local file emp2.csv using UTF-8