Read File/Folder

Operation name

Read File/Folder

Function overview

Obtains file/folder on Google Drive, then writes to the directory on HULFT Square Storage.

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.

 

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

File/folder name

Required

Available

Specify a file/folder.

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

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.

  • Case-insensitive.

Note

Overwrite

Optional

Not available

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

Selected

(Default)

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

Not selected

Output an error without overwriting if a file with the same name exists in the specified local directory.

 

Recursive processing

Optional

Not available

For a specified folder, select whether to get the file/folder recursively or not.

Selected

If the specified folder contains folders, get the file/folder recursively.

Not selected

(Default)

Get only the files in the folder you specify.

 

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.

Refresh list of item names

Get file/folder names in the specified folder path and set them in File/folder name.

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

  • If a variable is set to Folder path, this action will be invalid.

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 retrieved shared drive name.

 

drivetype

Outputs the retrieved drive type.

 

file

-

Appears once for each retrieved file/folder.

 

etag

-

Note
  • Refer to the specification limits.

localpath

Outputs the local path of the retrieved file/folder.

  • If status is "ErrorRemoteFolderNotFound", then the value is blank.

md5checksum

Outputs the MD5 checksum for the retrieved file.

  • Output when the file/folder is successfully retrieved.

  • 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 the name of the retrieved file/folder.

  • If status is "ErrorRemoteFolderNotFound", then the value is blank.

remotepath

Outputs the file path on Google Drive of the retrieved file/folder.

 

size

Outputs the size of the retrieved file/folder. The unit is byte.

  • Output when the file/folder is successfully retrieved.

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

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

status

Outputs the status of the retrieved file/folder.

Exist

The file/folder exists.

ErrorRemoteDriveNotFound

The specified Shared drive name doesn't exist on Google Drive.

ErrorRemoteFolderNotFound

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

ErrorRemoteFileNotFound

The specified file/folder doesn't exist in the specified Folder path on Google Drive.

ErrorLocalFileNotFound

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

ErrorLocalFileExist

Overwrite isn't selected and a file with the same name exists in the specified Local directory.

Error

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

 

type

Outputs the classification of the retrieved file/folder.

File

File

Folder

Folder

 

updated

Outputs the last updated date of the retrieved file/folder.

  • Output when the file/folder is successfully retrieved.

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.

Supports acquiring large files.

Parallel Stream Processing

PSP isn't supported.

Available component variables

Component variable name

Description

Remarks

count

The number of retrieved folders and files is stored.

  • The default value is null.

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

folder_count

The number of retrieved folders is stored.

  • The default value is null.

file_count

The number of retrieved 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 from Google format

  • The format after conversion is determined by the Google format before conversion.

    For files whose format isn't supported by Google format conversion, reading fails.

    In this case, the status attribute of the file element will be "Error" in the result data.

    • The readable Google formats and the corresponding formats after conversion are as follows:

      Google format

      Format after conversion

      Document

      Web page (html)

      Presentation

      PDF document (pdf)

      Spreadsheet

      Microsoft Excel (xlsx)

      Drawing

      PNG image (png)

Message codes, exception messages, and limitations

Connector

Message code

Exception message

Limitations

Messages and limitations of the Google Drive connector

check

check

check