Get File/Folder List

Operation Name

Get File/Folder List

Function overview

Gets file / folder list on Google Drive.

Data Model

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 managed from "Edit Resource list".
 
Drive type Required Not Available Select a processing drive.
  • [My drive]: (default)
    Specify the target of processing as "My drive".
  • [Shared drive]:
    Specify the target of processing as "Shared drive".
Shared drive name Required Available Select or enter the Shared drive name.
  • Enabled when [Shared drive] is selected in [Drive type].
Folder path Required Available Enter a Google Drive folder path.
Recursive processing Optional Not available For a specified folder, select whether to get the file/folder recursively.
  • [Checked]:
    If the specified folder contains folders, then gets the file/folder recursively.
  • [Not Checked]: (default)
    Gets a list of the specified folder only.
 
Property Action
Item name Description Remarks
Refresh shared drive name list Get the shared drive in the specified destination, and set it in [Shared drive name].
  • Disabled when [Destination] is not specified or [My drive] is selected in [Drive type].
  • If [Destination] is specified/edited, or a drive has been added/edited on Google Drive, you can apply the changes by using this property action.
Refresh list of folder paths Gets folder path in the specified destination and sets to [Folder path].
  • In the following cases, this property action is disabled:
    • [Destination] is not specified
    • [Shared drive name] is not specified
    • A script variable is specified in [Shared drive name]
  • If [Destination] or [Shared drive name] is specified/edited, or a folder has been added/edited on Google Drive, you can apply the changes by 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 adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

<?xml version="1.0"?>
<server>
  <files drivename="" drivetype="">
    <file etag="" md5checksum="" name="" remotepath="" size="" status="" type="" updated="" />
  </files>
</server>
Element name Attribute name Description Remarks
server -    
files -    
drivename Outputs the obtained shared drive name.  
drivetype Outputs the obtained drive type.  
file - Appears in each gotten file / folder.  
etag -
  • Refer to Specification Limits.
md5checksum Outputs the gotten MD5 checksum of file.
  • Output when file / folder information is successfully obtained.
  • In the case of a folder, the value is always a blank.
  • In the case of Google format files, the value is always a blank.
name Output the name of the retrieved file/folder.
  • If status is "ErrorRemoteFolderNotFound" then the value is blank.
remotepath Output the file path on Google Drive of the deleted file/folder.  
size Outputs the size of the file/folder retrieved. The unit is byte.
  • Output when file / folder information is successfully obtained.
  • Outputs "0" in case of folder.
  • For Google format files, "0" is always output.
status Outputs the status of the acquired file/folder.
  • Exist: Status that file / folder exists.
  • ErrorRemoteDriveNotFound: The specified [Shared drive name] does not exist on Google Drive.
  • ErrorRemoteFolderNotFound: The status that specified [Folder path] is not on the Google Drive, or file is specified.
  • Error: The status that because an error occurred file / folder information could not be got.
 
type Output the classification of gotten files / folders.
  • File: File
  • Folder: Folder
 
updated Output the last updated date of the retrieved file/folder.
  • Output when file / folder information is successfully obtained.
  • Output by the format of [xmlfw.daterenderingformat] inside system property. If it has not been set, the default format will be "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" is printed on.Example :2007-10-16T13: 15:22.738 +0900
  • Time zone is the time zone of DataSpiderServer.

Loading schema in Mapper

Schema is loaded automatically.
See "Edit Schema"for any details .

Mass Data Processing

Mass data processing is not supported.

PSP Usage

PSP is not supported.

Available component variables

Component variable name Description Remarks
count Return the number which is the total number of the gotten folder number and file number.
  • The value defaults to null.
  • The sum of' 'folder_count' and 'file_count'.
folder_count Returns the number of retrieved folder.
  • The value defaults to null.
file_count Returns the number of retrieved file.
  • 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 DataSpider Servista version.
error_message Stores the error message for the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on 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. Please specify [Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].

Notes