• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
      • CSPro DB
      • Encrypted CSPro DB
      • Text
      • JSON
      • CSWeb
      • None
      • In-Memory
      • Comma Delimited (CSV)
      • Semicolon Delimited
      • Tab Delimited
      • Excel
      • R
      • SAS
      • SPSS
      • Stata
      • CSPro Export
      • Case Read Optimization
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

CSPro Export Data Source

Overview
The CSPro Export data source allows writing, but not reading, data to any of CSPro's supported data sources. This data source wraps another data source, allows you to restrict which records are output, and creates a dictionary that describes the output data. This data source is primarily intended for outputting your data to other formats.
Typically CSPro uses a file extension to determine what kind of data source to open, but because there is no file associated with a CSPro Export data source, you must use the connection string to specify that you want to use a CSPro Export data source. For example, the following connection string, specified in a batch PFF, would result in cases being written using the JSON data source, wrapped by the CSPro Export data source:
OutputData=.\census-2026.json|type=CSProExport
Because multiple OutputData entries can be provided for batch applications, it is possible to use the CSPro Export data source more than once during a batch run. For example:
OutputData=.\census-2026-person.json|type=CSProExport&record=PERSON_REC
OutputData=.\census-2026-housing.json|type=CSProExport&record=HOUSING_REC
This would result in two output JSON files, one containing only the data from PERSON_REC, with a corresponding dictionary census-2026-person.json.dcf, and another file with the data from HOUSING_REC, with a corresponding dictionary census-2026-housing.json.dcf.
Functionality
The CSPro Export data source inherits the functionality of the data source it wraps. For example, if the wrapped data source supports binary data, then binary data will be written by CSPro Export. However, because the CSPro Export data source can only be used for writing, any reading functionality supported by the wrapped data source cannot be used.
Customizable Behavior
The following behavior can be customized by specifying properties in the connection string. In addition to these properties, any properties supported by the wrapped data source are also handled.
Property Name and ValuesDescription
 
"dictionaryPath"By default, the dictionary file is written in the same directory as the data file, with the same name as the data file, followed by .dcf. This property allows you to give a custom name for the dictionary. The property is evaluated relative to the path of the data file.
 
"record"If the name of a record is provided, only items from that record are written.
For example, the following connection string, specified in a batch PFF, would result in cases from the SCHOOL_REC record being written using the CSPro DB data source with an overridden name for the dictionary (rather than the default school.csdb.dcf).
OutputData=.\school.csdb|type=CSProExport&record=SCHOOL_REC&dictionaryPath=school-export.dcf
See also: Data Sources