Command Reference > pmrep Command Reference > ExecuteQuery
  

ExecuteQuery

Runs a query. You can choose to display the result or write the result to a persistent input file. If the query is successful, it returns the total number of qualifying records.
Use the persistent input file with the ApplyLabel, AddToDeploymentGroup, MassUpdate, and Validate commands.
The ExecuteQuery command uses the following syntax:
executequery

-q <query_name>

[-t <query_type (shared or personal)>]

[-u <output_persistent_file_name>]

[-a (append)]

[-c <column_separator]

[-r <end-of-record_separator>]

[-l <end-of-listing_indicator>]

[-b (verbose)]

[-y (print database type)]

[-n (do not include parent path)]

[-s <dbd_separator>]
The following table describes pmrep ExecuteQuery options and arguments:
Option
Argument
Description
-q
query_name
Required. Name of the query to run.
-t
query_type
Optional. Type of query to run. You can specify public or private. If not specified, pmrep searches all the private queries first to find the matching query name. Then it searches the public queries.
-u
persistent_output_file_name
Optional. Send the query result to a text file. If you do not enter a file name, the query result goes to stdout.
-a
-
Optional. Appends the query results to the persistent output file. If you do not enter this option, pmrep overwrites the file content.
-c
column_separator
Optional. Character or set of characters used to separate object metadata columns. Use a character or set of characters that is not used in repository object names. If any repository object name contains spaces, you might want to avoid using a space as a column separator.
If you omit this option, pmrep uses a single space.
-r
end-of-record_separator
Optional. Character or set of characters used to specify the end of the object metadata. Use a character or set of characters that is not used in repository object names. If you omit this option, pmrep uses a new line.
-l
end-of-listing_indicator
Optional. Character or set of characters used to specify the end of the object list. Enter a character or set of characters that is not used in repository object names. If you omit this option, pmrep uses a period.
-b
-
Optional. Verbose. Displays more than the minimum information about the objects. If you omit this option, pmrep prints a shorter format including the object type, the word reusable or non-reusable, the object name and path. Verbose format includes the object status, version number, folder name, and checked out information.
The short format for global objects, such as label, query, deployment group, and connection, includes the object type and object name. Verbose format includes the label type, query type, deployment group type, creator name, and creation time.
-y
-
Optional. Displays the database type of sources and targets.
-n
-
Optional. Does not include the full parent path of non-reusable objects in the query result. For example, if you use this option and the result includes a non-reusable transformation, pmrep prints transformation_name instead of mapping_name.transformation_name. This option can improve pmrep performance.
-s
dbd_separator
Optional. If an ODBC source has a period (.) in the name, define a different separator character when you define the source object. For example, instead of database_name.source_name, define the source object as database_name\source_name, and define the dbd_separator as backslash (\).