Command-line interface ---------------------- **Synopsis** .. code-block:: bash impexp export-table [-hV] [--ade-extensions=] [-c=] [-D=] -l= [--log-file=] [--log-level=] -o= [--pid-file=] [--plugins=] [--use-plugin=[,...]]... [[[-t=< [prefix:]name>[,<[prefix:]name>...]]... [--namespace=[,...]]...] [[-r=] [-R=]] [-i=[,...] [-i=[,...]]...] [-b=] [-s= Provide an SQL SELECT statement to be used as SQL filter when querying the database. In general, any SELECT statement can be used as long as it returns a list of database IDs of the selected city objects (see :numref:`impexp_export_sql_filter` for more information). You can also use an @-file to provide the SELECT statement (see :numref:`impexp_cli_argument_files`). .. include:: ../../impexp/cli/database-options.rst **Examples** .. code-block:: bash $ impexp export-table -H localhost -d citydb_v4 -u citydb_user -p my_password \ -l my_template.txt -o my_attributes.xslx Export attributes according to the provided ``my_template.txt`` file (see :numref:`impexp_plugin_spshg_template_files`) for all top-level city objects stored in the database. The attribute data is stored in the ``my_attributes.xslx`` file using XLSX as output format. The 3DCityDB to connect to is supposed to be running on a PostgreSQL database on the same machine. The connection will be established to the ``citydb_v4`` database with the user ``citydb_user`` and the password ``my_password``. .. code-block:: bash $ impexp export-table -H localhost -d citydb_v4 -u citydb_user -p my_password \ -t Building -b 13.3508824,52.4799281,13.3578297,52.4862805,4326 \ -D ; -l my_template.txt -o my_attributes.csv Only export attributes of ``Building`` features overlapping with the provided bounding box from the database. The coordinates of the bounding box are given in WGS84. For this reason, the fifth value ``4326`` of the :option:`-b` option denotes the SRID that is used by the target database for the WGS84 reference system. The output format is CSV and a semicolon ``;`` is used as delimiter. .. code-block:: bash $ impexp export -H localhost -d citydb_v4 -u citydb_user -p my_password \ -s "select cityobject_id from cityobject_genericattrib \ where attrname='energy_level' and realval < 12" \ -l my_template.txt -o my_attributes.csv Export attributes of all city objects satisfying the given SQL SELECT statement.