Variable-Length Write Wizard

Variable-Length Write Wizard

Variable-Length Write Wizard is a wizard with the ability to set the necessary schema definitions for generating variable-length data from input data.
Refer to "Variable-length text file" for details about variable-length files.

To launch Variable-Length Write Wizard

You can click the [Variable-Length Write Wizard] in the configuration dialog for the variable-length format definition in the Global Resource to launch the Variable-Length Write Wizard.

Variable-Length Write Wizard Screen Structure



Screen Element Number Name Description Remarks
(1) Column list Define structures of the input data.
Add fields which has the same number of columns in the input data and define structures which are the name, the type to the fields added.
  • The column list has the same structure as the Table model type.
    Refer to "Table model type" for details.
(2) Structure definition Define structures of the output data.
Define groups and records in the Structure Definition and add fields added in the column list to the groups and records added by drag and drop.
 
(3) Field(Column list)  
  • Fields are shown as yellow icons.
(4) Remove(Column list) Delete the element selected in the tree of the [Column list].
  • You can also operate to select [Delete] in the right-click menu of the element.
(5) Add Add a field to the [Column list].
  • You can also operate to select [Add]-[Field] in the right-click menu of the "Column".
(6) Edit(Column list) Show the definition dialog of the field selected in the tree of the [Column list].
  • You can also operate to select [Property] in the right-click menu of the element.
(7) Group  
  • Groups are shown as blue icons.
(8) Record  
  • Records are shown as green icons.
(9) Fixed Value Field By adding fixed field to structure definition, it can be defined as constant field.
  • Fixed Value Fields are shown as yellow icons checked.
(10) Field(Structure Definition)  
  • Fields are shown as yellow icons.
(11) Remove(Structure definition) Delete the element selected in the tree of the [Structure Definition].
  • You can also operate to select [Delete] in the right-click menu of the element.
(12) Edit(Structure definition) Show the definition dialog of the element selected in the tree of the [Structure definition].
  • You can also operate to select [Property] in the right-click menu of the element.

Column List Configuration

Define a structure definition which defines columns of the input data as fields and define a record in the variable-length data.

Field Configuration

Configure fields by the following steps.
  1. Operate either as follows to open "Field definition" dialog.
  2. Configure properties in the "Field definition" dialog.
    Basic settings
    Item name Required / Optional Description Remarks
    Field name Required Enter a name of the field.  
    Field type Required Select a type of the field. Available characters are as follows.
    • [String]:(default)
    • [Numeric]
    • [Date]
    • [Tag]
     
    Tag Optional Enter tag (record identification code).
    • Enabled when [Tag] is selected in [Field type].
    Date format Optional Select or enter a date format.
    Year Meaning Display Example
    y Year Number 1996
    M Month Text or number July or 07
    d Day Number 10
    h Hour (1-12) Number 12.
    H Hour (0-23) Number 0
    m Minute Number 30
    s Second Number 30
    S Millisecond Number 978
    • Enabled when [Date] is selected in [Field type].
    • The default is "$yy$MM$dd".

  3. Click the [Finish] button to add the field to the column list.

Structure Definition Configuration

Define structure of the output data.

Group Configuration

Configure groups by the following steps.
  1. Select [Add]-[Group] in the right click menu for structure definition icons.

  2. Configure properties in the "Group definition" dialog.
    Basic settings
    Item name Required / Optional Description Remarks
    Group name Required Enter a name of the group.  
    Occurrence Optional Not used in write operation.  
    Omittable Optional Not used in write operation.  
    Unlimited Optional Not used in write operation.  

  3. Click the [Finish] button to the group to the structure definition.

Record Configuration

Configure records by the following steps.
  1. Select [Add]-[Record] in the right click menu for structure definition icons or group icons.

  2. Configure properties in the "Record definition" dialog.
    Record Properties
    Item name Required / Optional Description Remarks
    Record name Required Enter a name of the record.  
    Occurrence Optional Not used in write operation.  
    Omittable Optional Select whether to write the input data corresponding to the record to each and every row.
    • [Checked]:
      • If the input data corresponding to the record is the same with the row before, output data could be omitted.
      • The output data is omitted when all the following conditions are matched.
        • In the subsequent records, there are no record with the [Omittable] which is "Not Checked".
        • In the subsequent records, record with the [Omittable] which is "Checked" exists, and the input data corresponding to the record is the same with 1 row before.
        • In the subsequent record, there is a record with the first field being tag field, and the input data corresponding to the record is the same with 1 row before.
        • It is not the end row of the input data.
    • [Not Checked]: (default)
      • Records are always written to each row.
     
    Unlimited Optional Not used in write operation.  

  3. Click the [Finish] button to the record to the structure definition.

Field Configuration

Configure fields by the following steps.
  1. Select a field defined in the [Column list] and do drag and drop the record to a record defined in the [Structure Definition].



  2. Add a field to the structure definition and link the fields.

Fixed Value Field Configuration

Configure fixed value fields by the following steps.
  1. Select [Add]-[field] in the right click menu for record icons and show the "Field definition" dialog.

  2. Configure properties in the "Field definition" dialog.
    Refer to "Field Configuration(Column list)" for details.
    The [Field name] is written as an output value.

  3. Click the [Finish] button to add the fixed value field to the structure definition.

Structure definition file export / import function

The column list and structure definitions defined in the wizard, can be saved in CSV file format, and the the column list and structure definitions can be restored from the file.
Once structure definition file is created, it can be used in both read and write process.

Structure Definition File Specifications

Export structure definition file

Export the following structure definition.



  1. Select [Export] from [Structure definition file] menu.

  2. Select or enter the destination file, and Press [Finish].
    Specify the absolute path of the DataSpider file system as the file path.
    Constrained characters of DataSpider File System cannot be used except for path separator "/".
    Click [Browse] button to activate the file Selectr and Select the file.
    Click [Preview] button to display the contents of the specified in file.

  3. "Export completion" dialog will appear when export succeeded.

  4. Exported content is as follows.
    GROUP,group,,false
    RECORD,record,,false
    FIELD,Tag,tag,HDR,true
    FIELD,String,string,,true
    FIELD,Number,numeric,,true
    FIELD,Date,date,$yyyy/$MM/$dd,true

Import Structure Definition File

Import the following structure definition file.
GROUP,group,,false
RECORD,record,,false
FIELD,Tag,tag,HDR,true
FIELD,String,string,,true
FIELD,Number,numeric,,true
  1. Select [Import] from [Structure definition file] menu.

  2. Select or enter the import file, and Press [Finish].
    Specify the absolute path of the DataSpider file system as the file path.
    Constrained Characters of DataSpider File System except for path separator "/" cannot be used.
    Click [Browse] button to activate the file Selectr and Select the file.
    Click [Preview] button to display the contents of the specified in file.
    If Structure definition already exists, an alert box appears to check whether to overwrite.

  3. The structure definition will be shown in the Wizard if following dialog will appear when export succeeded.



Note when editing the structure definition file

Specification Limits