SDU
Personal tools

Pdm deref

From SDU

Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

Use this command to replace data with data found in another table.

For example, lets say you performed the following extract: pdm_extract -f "SELECT id,category FROM Call_Req" > output.txt. The resulting extract would have the category entries displayed in their persid format such as pcat:400001. If you wanted to replace the category persid with the sym, the pdm_deref can perform that function.

Usage

pdm_extract [-s] specfile [-c|-e|-r] [-d] [-h] [-n] [-p] [-u] [-v 1|2] <filename

Command Description Remarks
-s specfile file containing SQL statement
-c csv output
-e csv output with double double quotes
-r informal report output
-d diagnostics
-h Help
-p preserve whitespace
-u no headers
-v [1|2] verbose. 1 is brief and 2 prints to a log file.
filename file to be processed

Specfile Example

A pdm_extract in the following format:

TABLE Call_Req
	id category 
	{ "499998" ,"pcat:400001" }
	{ "499999" ,"pcat:400001" }
...will be change to this format:
TABLE Call_Req
	id category.sym 
	{ "499998" ,"Sofware.Adobe Reader" }
        { "499999" ,"Softtware.Adobe Writer" }
...by running a specfile containing the following SQL Statement:
Deref
{
input = category
output = category.sym
rule = "SELECT sym FROM Prob_Category WHERE persid=?"
}

Examples

  • Deref of a basic text file
pdm_deref -s specfile.txt < input.txt > output.txt
This page was last modified 05:28, 30 November 2010.  This page has been accessed 2,288 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers