Console - EXPORT RECORD

Exports the current record, using the requested format. In the event that you give a format that OrientDB does not support, it provides a list of supported formats.

Syntax

EXPORT RECORD <format>
  • <format> Defines the export format you want to use.

Examples

  • Use SELECT to create a record for export:

    orientdb> SELECT name, surname, parent, children, city FROM Person WHERE 
              name='Barack' AND surname='Obama'
    
    ---+-----+--------+---------+--------+------------+------
     # | RID | name   | surname | parent | children   | city
    ---+-----+--------+---------+--------+------------+------
     0 | 5:4 | Barack | Obama   | null   | [5:5, 5:6] | -6:2
    ---+-----+--------+---------+--------+------------+------
    
  • Export JSON data from this record:

    orientdb> EXPORT RECORD JSON
    
    {
      'name': 'Barack',
      'surname': 'Obama',
      'parent': null,
      'children': [5:5, 5:6],
      'city': -6:2
    }
    
  • Use a bad format value to determine what export formats are available on your database:

     
    orientdb> EXPORT RECORD GIBBERISH
    
    ERROR: Format 'GIBBERISH' was not found.
    Supported formats are:
    - json
    - ORecordDocument2csv
    

For more information on other commands, see Console Commands.

results matching ""

    No results matching ""