Note: This documentation is for the legacy command-line tool odasa.
The final version was released in May 2020. Support for this tool expires in May 2021.

For documentation on the new generation CodeQL CLI, see CodeQL CLI .
In particular, you may find the Notes for legacy QL CLI users useful in planning your migration.

Skip to end of metadata
Go to start of metadata

Purpose

The unexportSnapshot tool is used to convert an exported snapshot (that is, a snapshot that has been converted to a format suitable for analysis by LGTM or the QL plugins and extensions) to a format that can be used with your version of the QL command-line tools. If the exported snapshot was generated using an older version of the QL command-line tools or LGTM, the command will also upgrade the snapshot to a compatible version.

Usage

This tool is run from the command line as follows:

 odasa unexportSnapshot [--verbose] [--verbosity <level>] [--output-directory <directory>] [--project-name <project>] [--no-upgrade] [--debug] <snapshot>

Flags

The unexportSnapshot tool supports the following flags.

FlagsValueExampleNotes
--verbose--

Optional. Output more detailed information about actions. This increases the verbosity to level 4.

Default: level verbosity

--verbosity<level>2

Optional. Define the precise level of reporting required where 0 suppresses all output and 6 reports all levels of detail available. You can use the --verbose flag as shorthand for --verbosity 4 .

Default: 3

--output-directory-
projects

Optional, the directory to write the unexported snapshot to.

Default: the current working directory.

--project-name<project>myproject

Optional, the name of the project to generate.

Default: "project".

--no-upgrade-

Optional, do not upgrade the database if it's out of date. If you specify this flag and an out of date snapshot is provided, the command will fail.

Default: upgrade the snapshot if it is out of date.

--debug--

Optional, if the command fails, leave any generated files on disk for further inspection.

Default: delete and files created before the command fails.

<exported-snapshot>.zip-revision-2019-March-1--22-12-12.zipOptional, define the snapshot to convert for use with the QL command-line tools.


Results

When you run this tool, it unzips the specified snapshot and populates the snapshot metadata, where possible. If you do not set the --no-upgrade flag, the unexported snapshot is automatically upgraded for use with your version of the QL command-line tools. 

Known limitations

The generated snapshot will not be compatible with all snapshot commands. In particular, exported snapshots do not contain build information, so it will not be possible to create new snapshots.