Write File/Folder

Operation name

Write File/Folder

Function overview

Writes file/folder on HULFT Square Storage to Google Drive.

Data model

The data model of this component is XML type.

Properties

= Remarks =

For details on use of variables, refer to Variables.

Basic settings

Item name

Required/Optional

Use of variables

Description

Remarks

Name

Required

Not available

Enter a name that is used on the script canvas.

 

Required settings

Item name

Required/Optional

Use of variables

Description

Remarks

Destination

Required

Not available

Select a connection resource.

Add

A new connection resource can be added.

Edit list

Connection resource settings can be edited in > HULFT INTEGRATE > Connections.

 

Local directory

Required

Available

Enter a directory path of HULFT Square Storage.

The Browse button launches a directory chooser that allows you to select a directory.

Note

Case-insensitive.

Local file/directory name

Required

Available

Specify a file/directory on HULFT Square Storage.

  • In file/folder names, wildcards ("*" and "?") can be used.

  • "/" can't be included.

Recursive processing

Optional

Not available

For the specified local directory, select whether to process file/directory recursively.

Selected

If a directory is contained in the specified local directory, process file/directory recursively.

Not selected

(Default)

Only process files in the specified local directory.

 

Convert file To Google format

Optional

Not available

Select whether to convert the file to Google format.

Selected

Convert the file to Google format and upload it.

Not selected

(Default)

Upload the file without converting.

= Remarks =

For details, refer to Conversion to Google format.

Drive type

Required

Not available

Select the drive to perform the operation.

My drive

(Default)

Set "My drive" for the operation target.

Shared drive

Set "Shared drive" for the operation target.

Shared drive name

Required

Available

Select or enter a shared drive name.

  • Enabled when Shared drive is selected for Drive type.

Folder path

Required

Available

Enter a Google Drive folder path.

Note

Create folder when it doesn't exist

Optional

Not available

Select whether to create the folder when the specified folder doesn't exist.

Selected

(Default)

Create the folder when the specified folder doesn't exist.

Not selected

Raise an error without creating the folder when the specified folder doesn't exist.

 

Overwrite

Optional

Not available

Select whether to overwrite when a file with the same name exists in the specified folder.

Selected

(Default)

Overwrite when a file with the same name exists in the specified folder.

Not selected

Raise an error without overwriting when a file with the same name exists in the specified folder.

 

Property actions

Item name

Description

Remarks

Refresh shared drive name list

Get shared drives in the specified destination and set them in Shared drive name.

  • Disabled when Destination isn't specified or My drive is selected for Drive type.

  • If Destination is specified/edited or a drive has been added/edited on Google Drive, the changes can be reflected using this property action.

Refresh list of folder paths

Get folder paths in the specified destination and set them to Folder path.

  • This property action is disabled in the following cases:

    • Destination isn't specified

    • Shared drive name isn't specified

    • A script variable is set in Shared drive name

  • If Destination and Shared drive name are specified/edited or a folder has been added/edited on Google Drive, the changes can be reflected using this property action.

Comment

Item name

Required/Optional

Use of variables

Description

Remarks

Comment

Optional

Not available

You can write a short description of this connector.

 

Schemas

Input schema

None.

Output schema

<?xml version="1.0"?>
<server>
  <files drivename="" drivetype="">
    <file etag="" localpath="" md5checksum="" name="" remotepath="" size="" status="" type="" updated="" />
  </files>
</server>

Element name

Attribute name

Description

Remarks

server

-

 

 

files

-

 

 

drivename

Outputs the name of the shared drive where a file/folder is written.

 

drivetype

Outputs the type of the drive where a file/folder is written.

 

file

-

Appears once for each written file/folder.

 

etag

-

Note
  • Refer to the specification limits.

localpath

Outputs local path of written file/folder.

  • Output when status isn't "ErrorRemoteFolderNotFound".

md5checksum

Outputs the MD5 checksum for the written file.

  • Output when a file/folder is written correctly.

  • In the case of a folder, the value is always blank.

  • In the case of a Google format file, the value is always blank.

name

Outputs name of the written file/folder.

  • Output when status isn't "ErrorRemoteFolderNotFound".

remotepath

Outputs file path on Google Drive of written file/folder.

 

size

Outputs size of written file/folder. The unit is byte.

  • Output when a file/folder is written correctly.

  • In the case of a folder, "0" is always output.

  • In the case of a Google format file, "0" is always output.

status

Outputs status of written file/folder.

Exist

The file/folder exists.

ErrorLocalFileNotFound

The specified Local directory doesn't exist, or the specified file/directory doesn't exist.

ErrorLocalFileSize0Byte

The write operation has failed because the size of the file specified in filename is 0 bytes.

ErrorLocalFileInvalidType

The write operation has failed because the file extension of the specified File name doesn't correspond to any of the Google formats.

ErrorRemoteDriveNotFound

The specified Local directory doesn't exist, or a file is specified.

ErrorRemoteFolderNotFound

The specified Folder path doesn't exist on the Google Drive, or a file is specified.

ErrorRemoteFileExist

Overwrite isn't selected, and a file with the same name exists in the specified Folder path on Google Drive.

ErrorRemoteFileUploadFailed

The file has failed to be written. The possible reasons are as follows:

  • Failed to convert the file to Google format.

  • The file size exceeds the size limit for the Google format conversion.

Error

The file/folder couldn't be written due to an error.

 

type

Outputs classification of written file/folder.

File

File

Folder

Folder

 

updated

Outputs the last updated date of written file/folder.

  • Output when a file/folder is written correctly.

Loading schema in Mapper

The schema is loaded automatically.

= Remarks =

For details, refer to Edit Schema.

Mass data processing

Mass data processing isn't supported.

Transaction

Transaction isn't supported.

Parallel Stream Processing

PSP isn't supported.

Available component variables

Component variable name

Description

Remarks

count

The number of written folders and files is stored.

  • The default value is null.

  • The sum of "folder_count" and "file_count".

folder_count

The number of written folders is stored.

  • The default value is null.

file_count

The number of written files is stored.

  • The default value is null.

message_category

When an error occurs, the category of the message code corresponding to the error is stored.

  • The default value is null.

message_code

When an error occurs, the code of the message code corresponding to the error is stored.

  • The default value is null.

message_level

When an error occurs, the severity of the message code corresponding to the error is stored.

  • The default value is null.

error_type

When an error occurs, the error type is stored.

  • The default value is null.

  • The format of the error type is as follows.

    Example: java.io.FileNotFoundException

error_message

When an error occurs, the error message is stored.

  • The default value is null.

error_trace

When an error occurs, the trace information for the error is stored.

  • The default value is null.

Conversion to Google format

  • The Google format to which the file is converted is determined by the file extension.
    For files whose file extension isn't supported by Google format conversion, writing fails.
    As a result, "ErrorLocalFileInvalidType" is set to the status attribute of the file element.

    • File extensions that are available for writing and the corresponding Google formats are as follows:

      Extension

      Google format

      Remarks

      doc, docx, txt, html, htm, odt, sxw, rtf, jpg, jpeg, gif, pdf, png, bmp

      Document

       

      pps, ppt, pptx

      Presentation

       

      xls, xlsx, ods, csv

      Spreadsheet

       

      wmf

      Drawing

       

      tab, tsv, swf, svg

      File

      Note

      No file conversion takes place when exported to Google format.

      zip

      Compressed archive

      Note

      No file conversion takes place when exported to Google format.


  • When Overwrite is selected and overwriting is performed, if the specified conversion format and the format of the existing file with the same name are different, the operation is as follows:

    Existing file format

    Specified format when overwriting

    Process result

    Google format

    No conversion

    • File contents will be updated, but the format will remain as Google format.

    • The Status attribute of the file element in the result data becomes "Exist".

    No conversion

    Google format

    • File contents will be updated, but the format won't be changed.

    • The Status attribute of the file element in the result data becomes "Exist".

  • When writing file with Overwrite not selected, if any of the followings is true, the file can't be converted to a Google format and fails to write.

    As a result, "ErrorRemoteFileUploadFailed" is set to the status attribute of the file element.

    • The contents of the file are invalid.

    • The file size exceeds the size limit for the Google format conversion.

      Note

      For more details regarding file size limitation, refer to Google Drive Help.

  • When files are converted to Document/Presentation/Spreadsheet, the text formatting and images may be lost due to the Google Drive specifications.


  • html and htm files encoded with character encoding other than UTF-8 may be garbled when converted to Document.

Message codes, exception messages, and limitations

Connector

Message code

Exception message

Limitations

Messages and limitations of the Google Drive connector

check

check

check