Getting Started with Data Viewer

This tutorial will give you a brief tour of Data Viewer With Data Masking (pfDataViewer) application and how it works.

In this tutorial, you will step through the basic steps for defining, producing and exporting a data set based on a query.

Make sure pfDataViewer is started and you are on the main form.

See Overview for a description of the various fields on the form.

 

  • Do not change Query Definitions Save Folder.
  • Set Query Name = MyFirstQuery.
  • Use Data Source dropdown to set Data Source = SQLServerCE3.5.
  • Click the Show Connection String Manager button image\ebx_1972759147.gif to show the form for defining a connection string
  • You should see the Data Source equal to something like the following:
    • C:\Users\YourUsername\Documents\pfApps\pfDataViewer\SampleData\SampleOrderDataCE35.sdf
    • .If you do not see the above, use the image\ebx_-1986081878.gif File Open button to search for the folder containing the SampleOrderDataCE35.sdf file.
  • Click the Build button.
  • Connection String value should now be:
    • data source='C:\Users\YourUsername\Documents\pfApps\pfDataViewer\SampleData\SampleOrderDataCE35.sdf';
  • Click the Verify button.
  • You should see a popup message that reads:
    • Connection Successful!
  • Click the Accept button.
    • You will be returned to the Main Form.
    • Connection String For Data Source value will now be filled in with the text produced by the Connection String Manager.
  • Click the Show Query Builder button.
    • See Query Builder Overview for more information on how to use the Query Builder.
    • You can also get help from the Help/Tutorial menu item on the Query Builder.
  • Add the Customers table to the query.
    • Two ways of adding the table:
      • Right-click inside the Main tab of the Query Builder.
        • Select Add Object.
        • Select Customers from the list that appears.
        • Click Add Selected Objects button.
        • Click Close button to return to Main tab.
      • Double-click Customers in the table list directly to the right of the Query Builder Main tab.
  • Place check marks next to the following fields in the Customers table:
    • CustomerID
    • FirstName
    • MiddleName
    • LastName
    • EmailAddress
    • Phone
    • City
    • StateProvinceName
    • CountryName
    • PostalCode
  • Notice how the query has been built in the query pane at the bottom of the form.
  • Click Accept button to return to the Main Form.
  • SQL Query text box has been filled with the SQL you defined in the Query Builder.
  • Select the Show Row Number in Results Output option on the right side of Main Form.
  • Make sure Erase log before the query is run is selected.
  • Click the Save button.
    • File name = MyFirstQuerey.qrydef
  • Click the Run Query button.
  • Data output grid containing the results returned by the query will show.
    • For more information on how to work with the Data Output Grid, see Data Output Grid Overview.
    • For more information on exporting data from the Data Output Grid to external data destinations, see Data Exporting.
    • Notice how the row number was added to the front of each row in a new column called dgvRowNumber.
  • Click Grid/Export To/Text File/Delimited Format.
  • Make sure the following values are set on the Specify Data Delimiters for Text File form that pops up.
    • Column Delimiter = Comma Separated
    • Line Terminator = CR/LF
    • Include Column Headings in Output is checked (true).
  • Click the OK button.
  • At Save As prompt:
    • File name = MyFirstQuery.txt.
    • Note the folder path at the top of the Save As prompt. It should read something like the following:
      • C:\Users\YourUsername\Documents\PFApps\pfDataViewer\DataExports
    • You can use Notepad to view the contents of the output file after the export is finished.
  • Click Exit on the Data Output Grid to return to the Main Form for the data viewer.
  • Next, you will place data masks over some of the columns in the output.
  • Click the Randomizer button.
  • Use the drop-down lists in the Randomizer Type, Randomizer Source and Random Value columns on the Map Random Values to Data Columns form.

 

Column Name

Randomizer Type

Randomizer Source

Random Value

 

FirstName

Random Names And Locations

PersonNames_Quebec.xml

First Name

LastName

Random Names And Locations

PersonNames_Quebec.xml

Last Name

EmailAddress

Random Data Elements

EmailAddress.xml

GeneratedValue

Phone

Random Names And Locations

PersonNames_Quebec.xml

Telephone Number

City

Random Names And Locations

PersonNames_Quebec.xml

City

StateProvinceName

Random Names And Locations

PersonNames_Quebec.xml

State Province Name

CountryName

Random Names And Locations

PersonNames_Quebec.xml

Country

PostalCode

Random Names And Locations

PersonNames_Quebec.xml

Zip Postal Code

 

  • Next, you will create a random numbers data mask for the CustomerID column.
  • Click Randomizer/Manage Sources.
  • .Select Random Numbers option on the RandomDataFormsManager form.
  • Click Edit Sources button.
  • Set the following values on the Define Numeric Data Mask form.
    • Data Mask Name = NumberSequence_100000_step2.
    • Numeric Data Type:
      • Integer.
      • Unsigned Integer
      • 32 bit
    • Number Sequence:
      • Start Value = 100000
      • Increment = 2
      • Max Value = 999999999
  • Click Save button.
  • You will see a popup message box that says the Save was successful.
  • Click OK to return to the RandomDataFormsManager form.
  • Click Exit to return to the Map Random Values to Data Columns form.
  • Set the following values on the Define Numeric Data Mask form.

 

Column Name

Randomizer Type

Randomizer Source

Random Value

 

CustomerID

Random Numbers

NumberSequence_100000.xml

Generated Value

 

  • Click Accept button to return to data viewer Main Form.
  • Make sure the Randomize Output checkbox is now checked.
  • Click the Run Query button.
  • On the DataOutputGridForm that pops up, notice the following changes to the output data:
    • Names are now of the kind you would expect to see in Quebec province.
    • City and Provide information is now all for Quebec.
    • Phone numbers and email addresses have been changed.
  • Click Exit button to leave the data viewer application.
  • If you have not already save your latest changes to the query definition, you will be prompted to save the unsaved changes.
    • Click Yes to save the changes.
    • A popup message will appear that gives the location on disk where the modified query definition was saved.
      • This will be to the same location you originally saved the query definition to earlier in this tutorial.
  • Application will shut down.