PdForXML.exe

Top  Previous  Next

A command line utility that is designed to query a MS SQL Server database periodically and produce XML files representing the selected rows.

 

Help is available with the command

PdForXML --help

 

Top level commands

 

c:\>pdforxml --help

PdForXML 1.0.7222.23520

Copyright c  2018

 

  all         Output all records to one file

 

  byrecord    Output one record per file.

 

  yearday     Output records grouped by Year and Day of Month.

 

  examples    Display example usages.

 

  help        Display more information on a specific command.

 

  version     Display version information.

 

Three ways to write files

all - all queried records are placed in a single file.  For a small number of records, this can be very efficient and easier to manage than a directory full of xml files.  However, if the result size is large or unknown, it can create large files that are more difficult to transfer, process and debug.

byrecord - each file contains one record.  This is the preferred method of transferring data to Crash Magic.  Files are named  using the specified caseid field plus optional prefix and suffix values.  

yearday - similar to "all", yearday places all files with the same year and day of the month into a single file.  For example, all records with a datefield representing Jan 1, Feb 1, Mar 1... etc. for the year 2020 will be in the same file.  This guarantees exactly 31 files per year. For most agencies, this is a reasonable number of records per file.

 

[all] parameters

 

c:\>pdforxml --help all

PdForXML 1.0.7222.23520

Copyright c  2018

 

  --priortimeunit     Required. Unit (months,days,etc.) prior to current date to use. 

                      Only days currently supported. 

                      (Mutually exclusive of StartDate, EndDate)

 

  --priortimevalue    Required. Number of units prior to current date to use. Current 

                      day will be added. 

                      (Mutually exclusive of StartDate, EndDate)

 

  --startdate         Required. First date to process (inclusive). 

                      (Mutually exclusive of PriorTimeUnit, PriorTimeValue)

 

  --enddate           Required. Last date to process (inclusive). 

                      (Mutually exclusive of PriorTimeUnit, PriorTimeValue)

 

  --datefieldname     Required. Name of date field in primary table

 

  --directory         Required. Output directory for XML files

 

  --prefix            (optional) Prefix for output files

 

  --suffix            (optional) Suffix for output files

 

  --server            Required. MS SQL Server address

 

  --database          Required. MS SQL Server database name

 

  --login             Required. MS SQL Server login name

 

  --password          Required. MS SQL Server login password

 

  --queryfilename     Required. File containing main SQL query. This query requires 

                      the following to be in its WHERE clause: --{PdWhere}

 

  --detaillog         (optional) Detailed log for debugging

 

  --help              Display this help screen.

 

  --version           Display version information.

 

[byrecord] additional parameters

 

  --caseidqueryfilename    Required. File containing SQL query to get list of CaseIds. 

                           Case Id must be first column. This query requires the 

                           following to be in its WHERE clause: --{PdWhere}

 

  --caseidfieldname        Required. Name of case id field in primary table

 

[yearday] additional parameters

 

 

none