August 15, 2023

Listing files and folders in Google Drive – Docs for ESB 6.x

Listing files and folders in Google Drive

  1. Double-click tGoogleDriveList to open its
    Basic settings view in the Component tab.

    components-tgoogledriveput_s1_list.png

  2. Select the Use Existing Connection check
    box and from the list that appears select the component you have configured
    to open your Google Drive connection.
  3. In the Folder Name field, enter the name of the folder
    to be iterated on. In this example, it is the root directory of Google Drive
    and you can use the alias root to refer
    to it.
  4. Select Both from the FileList
    Type
    drop-down list to list both files and folders in the
    root directory.

    Select the Includes subdirectories check box to iterate
    also on the subdirectories of the root directory.
  5. Double-click tIterateToFlow to open its
    Basic settings view in the Component tab.

    components-tgoogledriveput_s1_list_iterate.png

  6. Click the […] button next to Edit schema to open the schema editor.

    components-tgoogledriveput_s1_list_iterate_schema.png

    Click the [+] button to add four columns:
    ID, Title, and MimeType of
    the type string, and Size of the type
    long.
    Click OK to validate the changes and accept the
    propagation prompted by the pop-up dialog box.
  7. In the Mapping table,
    fill in the value for each column by selecting the corresponding cell in the
    Value column and then press
    Ctrl+Space and from the list of
    variables that appears select the corresponding global variable of the
    tGoogleDriveList component. In this
    example:

    Column

    Value

    ID

    ((String)globalMap.get(“tGoogleDriveList_1_ID”))

    Title

    ((String)globalMap.get(“tGoogleDriveList_1_TITLE”))

    MimeType

    ((String)globalMap.get(“tGoogleDriveList_1_MIME_TYPE”))

    Size

    ((Long)globalMap.get(“tGoogleDriveList_1_SIZE”))

  8. Double-click the third tLogRow to open
    its Basic settings view in the Component tab.

    components-tgoogledriveput_s1_output3.png

  9. In the Mode area, select Table (print values in cells of a table) for a
    better display of the results.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x