Scroll

Command Line in Askiaanalyse

Command Line in Askiaanalyse

Follow

Á

Summary This article describes how to use the command line in askiaanalyse.
Applies to askiaanalyse
Written for Data processor
Keywords invert; data; command line; automate; analyse; askiaanalyse; commandline

Table of contents:

Since version 5.1.3.4, askiaanalyse can be used via command line which is extremely useful with askiavista's automated & scheduled tasks.

You can invert data stored in SQL Server.
This feature is crucial when askiafield surveys are initialized in SQL Server in the CCA.
This feature is used by askiavista to have retrieve live survey data in order to display up to date analysis results.
Note: We will add further functionality as requests are made.

This feature has been updated from version 5.3.1 to use a temporary directory during the inversion process, minimizing system downtime while running the inversion.

Definition

Here the list of arguments which can appear in the command line to start askiaanalyse:

Argument Value Description
{None} String Path of survey file, QES, specificed between quotes "
/invert - Use to invert the data
/partialinvert - Attempt to invert the database incrementally (only adding new interviews)
/verifyinvert - Verifies the number of interviews between inverted DB and DB are the same and inverts if needed (as of v5.3.5 this argument appears to also execute the "recalculate variable" function)
/type: Integer Defines the type of survey and/or data, for example: /type:5
/type:0 Data stored in a QES file
/type:1 Dimension file (PKD, SAV, etc...)
/type:2 Multiple askia surveys QEM, (see note1)
/type:3 askiasurf QEW file
/type:4 Data stored in SQL Server Legacy format (multiple tables)
/type:5 Data stored in SQL Server new format (single table)
/surveyId: Integer Defines the ID of a survey when the data is stored in the SQL Server, /type:4, for example: /surveyId:119
/surveyConnection: String Defines the connection string to the survey data stored in SQL Server and/or Dimensions, for example:
/surveyConnection:"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=UID;password=PWD;Initial Catalog=Surveys;Data Source=127.0.0.1"
/recalculatevariables - Recalculate all variables
/exportword - Export portfolio to word - requires /portfolio and /output, optional script
/exportexcel - Export portfolio to excel - requires /portfolio and /output, optional script
/exportppt - Export portfolio to ppt - requires /portfolio and /output, optional script
/exporttabsml - Export portfolio to TabsML - requires /portfolio and /output, optional script
/exportascii - Export portfolio to Ascii - requires /portfolio and /output, optional script
/exportsptoinv -

Export a sub population to an inverted QES - requires /script, /output, optional /calculated, /exclude

/"questions:" String

A selection of questions can be chosen when exporting to inverted database. e.g. /"questions:gender;age;rating"

/portfolio: String Path of the portfolio. From Analyse 64 bit 5.3.5.5 11/10/2016 onwards, can also use /portfolio2, /portfolio3, /portfolio4 etc. - see third example below.
/output: String Path of the file to export. From Analyse 64 bit 5.3.5.5 11/10/2016 onwards, can also use /output2, /output3, /output4 etc. - see third example below.
/script: String Script to define a sub-population
/calculated: String List of calculated questions needed eg /"calculated:weighting1;weighting2;timingondemographics"
/exclude: String List of excluded questions eg /"exclude:wave;bankaccount"
/hkcu -

This uses the current user settings and not the local machine's settings which are default (HKCM). Use this parameter if tab or general settings don't match your manual output.

/replacetabtemplate: String

/replacetabtemplate:"OldTabTemplate|NewTabTemplate" - use this for replacing tab-templates before running an export from the command line. You can call this parameter more than once to change more than one tab-template. If the tab-template is not recognised, an error will be written in the log file (if you have specified one).

/logfile: String

/"logfile:Log.txt" - Creates a date time stamped list of all command syntax run which referred to the specified log file. New runs are appended to the bottom for the log file.

/startsheet: Integer

/startsheet:5 (default 1) - specify the number of the starting sheet when exporting to excel from the command line. This does not override the option 'Use portfolio titles for sheet names' - you either have to have a tab definition with no title or have the option set to 'No'


Examples

Export to inverted format of a surf file with calculated questions

AnalyseU.exe "C:\My QEWs\Ex.qew" type:3 /exportsptoinv /"script:??Lang?? Has 1" /"calculated:Weighting" /"exclude:Wave" /"output:C:\My Qes\reduced.qes" 

Export of a portfolio to Excel on a sub-population

AnalyseU.exe "C:\My QES\Ex.qes"  /exportexcel /"script:??Lang?? Has 1" /"portfolio:C:\My QES\MyAnalysis.xml" /"output:C:\My Qes\result.xls" 

Export multiple portfolios to multiple Excel files in a single command / session of Analyse:

(Only available from Analyse 64 bit 5.3.5.5 11/10/2016 onwards)

Analyse.exe "c:\qes\me\ex.qes" /exportexcel /portfolio:"c:\qes\me\p1.xml" /output:"c:\qes\me\p1.xlsx" /portfolio2:"c:\qes\me\portfolio.xml" /output2:"c:\qes\me\poorttfolio.xlsx"

Replace tab template before exporting: 

Analyse.exe "C:\Qes\ex.qes" /exportexcel /"portfolio:C:\Qes\JustCount.xml" /"output:C:\Qes\result.xls" /replacetabtemplate:"FlatCount|FlatCountAndPercentage" /"logfile:C:\Qes\Log.txt"

Set Start sheet in Excel to be 5:

Analyse.exe "C:\Qes\ex.qes" /exportexcel /"portfolio:C:\Qes\JustCount.xml" /"output:C:\Qes\result.xls" /"logfile:C:\Qes\Log.txt" /startsheet:5

Note:
1. Survey projects using QEM are no longer supported, as this file format has been deprecated since version 5.1.x in askiaanalyse, and version 5.3.0.0 in askiavista. The QEM fomat was made obselete with the release of askiasurf and its much more modern, fexible & powerful QEW format.

Have more questions? Submit a request

Comments