-
Notifications
You must be signed in to change notification settings - Fork 43
Document tt export/import #3737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5234413
to
2765071
Compare
a012399
to
f1dc23e
Compare
18d1567
to
395ad98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some edits and questions from my side.
Some comments from export
are applicable to import
as well; I didn't duplicate them.
|
||
$ tt crud COMMAND [COMMAND_OPTION ...] | ||
|
||
``tt crud`` enables you to interact with a cluster using the `CRUD <https://github.com/tarantool/crud>`_ module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-personal wording looks better in references.
``tt crud`` enables you to interact with a cluster using the `CRUD <https://github.com/tarantool/crud>`_ module. | |
``tt crud`` enables the interaction with a cluster using the `CRUD <https://github.com/tarantool/crud>`_ module. |
|
||
$ tt [crud] export URI FILE SPACE [EXPORT_OPTION ...] | ||
|
||
``tt [crud] export`` exports a space's data to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if possessive is correct for this case (space's data
).
Maybe rephrase?
``tt [crud] export`` exports a space's data to a file. | |
``tt [crud] export`` exports data from a given space to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe mention the file format in this general description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a space's data
I believe, possessive works good for our space
term.
Also, maybe mention the file format in this general description?
Currently, only CSV is supported but other formats may be added in the future. And given that CSV is the only supported format, for example, CSV
will look a bit weird, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be precise, I would write "to a CSV file". If other format appear later, we'll update the description.
|
||
.. NOTE:: | ||
|
||
You should have :ref:`read access <authentication-owners_privileges>` to the required space to be able to export data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unclear who is you
in this sentence. The reader runs tt
outside of Tarantool.
Shorter wording: to the required space to be able to export data.
> to the space to export its data
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update to Read access to the space is required to export its data.
|
||
.. NOTE:: | ||
|
||
Exporting isn't supported for the :ref:`interval <index-box_interval>` field type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does it mean? Export does not work on spaces with such field? Export works but interval fields are lost? Anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked: exporting works, data of this field is exported but looks unreadable and causes an error on an attempt to import it back.
Exporting compound data | ||
----------------------- | ||
|
||
By default, ``tt`` exports empty values for fields containing compound data like arrays or maps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, ``tt`` exports empty values for fields containing compound data like arrays or maps. | |
By default, ``tt`` exports empty values for fields containing compound data such as arrays or maps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like
- similar object, such as
- actual examples.
Automatic matching | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
Suppose, you have the ``customers.csv`` file with a header containing field names in the first row: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppose, you have the ``customers.csv`` file with a header containing field names in the first row: | |
Suppose that you have the ``customers.csv`` file with a header containing field names in the first row: |
Manual matching | ||
~~~~~~~~~~~~~~~ | ||
|
||
The ``--match`` option enables you to import data by matching field names in the input file and the target space manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ``--match`` option enables you to import data by matching field names in the input file and the target space manually. | |
The ``--match`` option enables importing data by matching field names in the input file and the target space manually. |
Handling parsing errors | ||
----------------------- | ||
|
||
To skip rows whose data cannot be parsed correctly, you can use the ``--on-error`` option as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To skip rows whose data cannot be parsed correctly, you can use the ``--on-error`` option as follows: | |
To skip rows whose data cannot be parsed correctly, use the ``--on-error`` option as follows: |
.. option:: -success STRING | ||
|
||
The name of a file with rows that were imported (the default is ``success``). | ||
Overrides the file if it already exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't understand what exactly this means. Overwrites?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly
@@ -5,6 +5,11 @@ To install the ``tt`` command-line utility, use a package manager -- Yum or | |||
APT on Linux, or Homebrew on macOS. If you need a specific build, you can build | |||
``tt`` from sources. | |||
|
|||
.. NOTE:: | |||
|
|||
A Tarantool Enterprise's `release package <https://www.tarantool.io/en/enterprise_doc/setup/#package-contents>`_ includes the `tt` utility extended with additional features like :ref:`importing <tt-crud-import>` and :ref:`exporting <tt-crud-export>` data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this (or similar) text on the main tt CLI page to explain the existence/positioning of tt EE in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add it to the intro
29d0ae4
to
07d6e32
Compare
07d6e32
to
9513bf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple more notes.
|
||
$ tt [crud] export URI FILE SPACE [EXPORT_OPTION ...] | ||
|
||
``tt [crud] export`` exports a space's data to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be precise, I would write "to a CSV file". If other format appear later, we'll update the description.
|
||
:ref:`Read access <authentication-owners_privileges>` to the space is required to export its data. | ||
|
||
.. NOTE:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to write in the first review: this should be important
or even warning
because the data loss is possible.
``tt`` is a utility that provides a unified command-line interface for managing | ||
Tarantool-based applications. It covers a wide range of tasks -- from installing | ||
a specific Tarantool version to managing remote instances and developing applications. | ||
|
||
``tt`` is developed in its own `GitHub repository <https://github.com/tarantool/tt>`_. | ||
Here you can find its source code, changelog, and releases information. | ||
There is also the Enterprise version of ``tt`` is available in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add a blank line to separate the new paragraph.
9513bf5
to
9425293
Compare
9425293
to
5b11aec
Compare
Interacting with the CRUD module
page: https://docs.d.tarantool.io/en/doc/tt-export-import/reference/tooling/tt_cli/crud/. This page contains links to thett export
/tt import
commands with detailed information.tt EE
in the intro: https://docs.d.tarantool.io/en/doc/tt-export-import/reference/tooling/tt_cli/tt
in theEE
package: https://docs.d.tarantool.io/en/doc/tt-export-import/reference/tooling/tt_cli/installation/