Datastore 2.3.0 User Guide Extract data The Extract facility allows you to execute a query and store the result in an output file: dstools extract --file data.txt --query folder/myquery Where -file indicates the output file name, and --query indicates the complete path to the query. You can use the startDate and endDate command line arguments to overwrite query definition settings. Limits such as maximum number of returned rows or maximum execution time, are not applied during extraction. Use format to produce a Variable Flat File or a Fixed Flat File output file. Variable Flat File format Use the Label and header parameters to add label and header lines. Localization Use the parameter language to localize output file labels and separators using the datastore dictionary. To customize the datastore dictionary by adding a language and changing labels or technical information: Use the Designer to create and populate a dictionary name datastore. Deploy the dictionary into the admin application. Restart Apache Tomcat (or the Administration application in WebSphere). The following table displays an example of technical information values: Key Value VariableFlatFile.delimiter , VariableFlatFile.quoteChar " VariableFlatFile.decimalFormat en VariableFlatFile.dateFormat MM/dd/yyyy VariableFlatFile.dateTymeFormat MM/dd/yyyy HH:mm For functional properties, the property type name is used as dictionary key and the label as value: Key Value CRE_TYP Input Type ENR_NOM Record Name CRE_VERSIO Input Version Output format Parameter output-name (or parameters output-name and output-version) allows you to map the query result to an ObjectType definition: dstools extract --file data.txt --query folder/myquery -output-name ACC_ME When output-version is omitted, the last valid Object type is used. The validity of the Object type is determined by comparing its validity period compared with the extraction date. Files with decimal property types To export files with decimal fields, the fields must be defined with the formatter decimalFormatter. To export files with Variable Flat File decimal fields, the fields must be defined with the formatter commaDecimalFormatter. Related topics About Datastore Runtime Inject data Use the Datastore API Partition lifecycle management Related Links
Extract data The Extract facility allows you to execute a query and store the result in an output file: dstools extract --file data.txt --query folder/myquery Where -file indicates the output file name, and --query indicates the complete path to the query. You can use the startDate and endDate command line arguments to overwrite query definition settings. Limits such as maximum number of returned rows or maximum execution time, are not applied during extraction. Use format to produce a Variable Flat File or a Fixed Flat File output file. Variable Flat File format Use the Label and header parameters to add label and header lines. Localization Use the parameter language to localize output file labels and separators using the datastore dictionary. To customize the datastore dictionary by adding a language and changing labels or technical information: Use the Designer to create and populate a dictionary name datastore. Deploy the dictionary into the admin application. Restart Apache Tomcat (or the Administration application in WebSphere). The following table displays an example of technical information values: Key Value VariableFlatFile.delimiter , VariableFlatFile.quoteChar " VariableFlatFile.decimalFormat en VariableFlatFile.dateFormat MM/dd/yyyy VariableFlatFile.dateTymeFormat MM/dd/yyyy HH:mm For functional properties, the property type name is used as dictionary key and the label as value: Key Value CRE_TYP Input Type ENR_NOM Record Name CRE_VERSIO Input Version Output format Parameter output-name (or parameters output-name and output-version) allows you to map the query result to an ObjectType definition: dstools extract --file data.txt --query folder/myquery -output-name ACC_ME When output-version is omitted, the last valid Object type is used. The validity of the Object type is determined by comparing its validity period compared with the extraction date. Files with decimal property types To export files with decimal fields, the fields must be defined with the formatter decimalFormatter. To export files with Variable Flat File decimal fields, the fields must be defined with the formatter commaDecimalFormatter. Related topics About Datastore Runtime Inject data Use the Datastore API Partition lifecycle management