Write File

Operation Name

Write File

Function overview

Specifies files on Microsoft Azure Storage BLOB, and writes to the container on DataSpider file system.

Data model

Data model of this component is XML type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required / Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Required settings
Item name Required / Optional Use of Variables Description Remarks
Destination Required Not available Select Global Resources.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited with "Edit Resource list".
 
Local directory Required Available Specify a directory path of DataSpider filesystem.

Select a directory in the directory Selectr that is launched by pressing [Browse] button.
  • Specify the absolute path of the DataSpider file system as the file path.
  • Except for the '/' character, characters not allowed to be used in DataSpider filesystem cannot be specified in the file path.
  • Does not distinguish on upper/lower cases.
Local file name Required Available Specify a file to get (on DataSpiderServer side).
  • Wildcards ("*" and "?") can be used in the file name.
  • Distinguishes on upper/lower cases.
Container name Required Available Specify the container.
  • Refer to "Notes" for naming conventions of containers in Microsoft Azure.
Create container when not exist Optional Not available Select whether to create a container when the specified container does not exist.
  • [Checked]: (default)
    Creates a container when the specified container does not exist.
  • [Not Checked]:
    Raise an error without creating a container when the specified container does not exist.
  • If checked, the visibility of the container becomes 'private'.
Overwrite Optional Not available Select whether to overwrite when file with the same name exists in the specified container.
  • [Checked]: (default)
    Overwrite when file with the same name exists in the specified container.
  • [Not Checked]:
    Raises an error without overwriting when file with the same name exists in the specified container.
 
Comment
Item name Required / Optional Use of Variables Description Remarks
Comment Optional Not available Description for the usage of this adapter can be entered.
When a description is provided, it will be reflected in the output of specification document.
 

Schema

Input Schema

None.

Output Schema

<?xml version="1.0"?>
<server>
  <container name="" status="" >
    <file etag="" localpath="" name="" size="" status="" type="" updated="" uri="" />
  </container>
</server>
Element name Attribute name Description Remarks
server -    
container -    
name Outputs the name of the container of the written file.  
status Outputs the status of the container of the written file.
  • [Exist]: State that the container exists.
  • [Created]: State that the container is newly created.[Create container when not exist] is [Checked] and the specified container is successfully created.
  • [ErrorContainerNotCreated]: State that creating container failed.[Create container when not exist] is [Checked] and the creation of the specified container failed.
  • [ErrorContainerNotFound]: State that the container does not exist.[Create container when not exist] is [Not Checked] and the specified container does not exist.
  • [Error]: The existence of the container cannot be verified due to certain error.
 
file - Appears for each written file.  
etag Outputs the ETag of the written file.
  • Output when the specified file is successfully updated.
localpath Outputs the local path of the written file.  
name Outputs the name of the written file.  
size Outputs the size of the written file.The unit is byte.
  • Output when the specified file is successfully updated.
status Outputs the status of the written file.
  • [Updated]: State that the file has been successfully updated.
  • [ErrorLocalFileNotFound]: State that the specified [Local directory] does not exist, or the specified [Local file name] does not exist.
  • [ErrorRemoteFileExist]: State that [Overwrite] is [Not checked], and file with the same name exists in the specified container.
  • [Error]: Could not read the file due to certain error.
 
type Outputs the type of the written file.
  • Output when the specified file is successfully updated.
updated Outputs the last updated date of the written file.
  • The output format is yyyyMMddHHmmss.Example: "20071016131522" means 1:15 pm and 22 seconds on October 16, 2007.
  • Time zone is the time zone of DataSpiderServer.
  • Output when the specified file is successfully updated.
uri Outputs the URI of the written file.
  • Output when the specified file is successfully updated.

Loading schema in Mapper

Schema is loaded automatically.
For any details, please refer to the 'Editing Schema'

Mass Data Processing

Mass data processing is not supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available component variables

Component variable name Description Remarks
count Returns the number of written files.
  • The value defaults to null.
message_category Stores the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occurred error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occurred error.
  • The value defaults to null.
error_type Stores the type of the occurred error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Stores the error message for the occurred error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
com.microsoft.windowsazure.services.core.storage.StorageException Cannot be connected due to the following causes.
  • There's a mistake in [Account] or [Access key] in the global resource specified in [Destination].
  • There are double-byte characters in [Account] in the global resource specified in [Destination].
Check the settings and connection status of the global resource specified in [Destination] .
java.security.InvalidKeyException
Storage Key is not a valid base64 encoded string.
[Access key] of the global resource specified in [Destination] is incorrect. Check the settings of the global resource specified in [Destination] .

Notes