Skip to main content Skip to complementary content

Commands for exporting/importing objects

You can export and import Compose objects using the export_csv and import_csv CLI

Information noteTo import specific entities, use the CSV mechanism described in Migrating models.
Information note

Compose CLI requires Administrator permission. To grant Administrator permission, select "Run as administrator" when opening the command prompt. All commands should be run from the Compose bin directory (C:\Program Files\Qlik\Compose with a default installation).

Exporting objects

Run the following command from the Compose bin directory:

Command syntax

ComposeCli.exe export_csv --project project_name --outfolder folder

Parameters

Parameter Description
--project The name of the project.
--outfolder The name of the target folder for the CSV files.

Example

ComposeCli.exe export_csv --project myproject --outfolder c:\MyCFDWProject

Importing objects

Information note

As CSV files do not have versions, Compose cannot know which Compose version the CSV file being imported originated from. If the default behavior has changed between versions, the rule is that the default of the new version will always be applied. For example, in the Compose May 2021 version, the option to update the fact with changes to Type 2 data warehouse entities is now enabled by default. In previous versions, facts were not updated with changes to Type 2 data warehouse entities and there was no option to change this behavior. Therefore, continuing with our example, if you want this option to be disabled by default, you would need to add the column for that setting (Fact As Type 1) to the fact.csv file and set the value to "FALSE" before importing.

Before performing any import operations, it is strongly recommended to review the topic(s) that discuss CSV file structure and the impact of missing columns and/or values on the target environment. For example, before importing Data Marts, review the Migrating Data Marts topic.

Run the following command from the Compose bin directory:

Command syntax

ComposeCli.exe import_csv --project project_name [--infolder folder] [--scope model|mappings|datawarehouse|DatawarehouseTasks|datamarts] [–-filetype objecttype] [–-infile filename]

Parameters

Parameter Description
--project The name of the project.
--infolder The full path to the folder containing the CSV files. This parameter is only required if you want to import all files.
--scope

Use this parameter to allow non-privileged users to import specific objects. When this parameter is omitted, all objects will be imported.

Possible values are:

  • --scope model - Imports the model objects (Attributes Domain, Entities, Attributes, Relationships, Reusable Transformations, and Reusable Transformation Parameters)
  • --scope mappings - Imports the mappings metadata and the actual mappings.
  • --scope datawarehouse - Imports the mappings as well as all objects included in the DatawarehouseTasks described below.
  • --scope DatawarehouseTasks - Imports the data warehouse tasks and related objects (Tasks, Task Settings, Task Mappings, Task Data Warehouse Tables, Task Custom ETLs, and Custom ETLs).
  • --scope datamarts - Imports the data mart objects (Data Marts, Facts, Star Schemas, Fact Attributes, Dimension Attributes, Task Settings, and Custom ETLs).
Warning noteThe --scope parameter cannot be included in the same command as the --filetype parameter
--filetype

The type of CSV file to import. When this parameter is omitted, all objects will be imported.

Possible values are:

  • AttributesDomain
  • Entities
  • Attributes
  • Relationships
  • MappingsMetadata
  • Mappings
  • ReusableTransformation
  • ReusableTransformationParams
  • DataMarts
  • Tasks
  • TaskSettings
  • TaskMappings
  • TaskDataWarehouseTables
  • TaskCustomETLs
  • CustomETLs
Warning noteThe --filetype parameter cannot be included in the same command as the --scope parameter
--infile

The full path to the file to import when using non-default file names. This must be specified together with the --filetype parameter described above.

Examples

Import all CSV files

ComposeCli.exe import_csv --project myproject --infolder c:\composecfdw_csv

Import a specific CSV file with a custom Name

ComposeCli.exe import_csv --project myproject --filetype AttributesDomain --infile c:\myattributesdomain.csv

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!