googledriveConnector.
访问Google Drive文件存储服务以上传,下载或删除文件和文件夹或从Google Drive帐户列出文件夹的内容。
Typical Uses
- Manage datasets on Google Drive by uploading, downloading, and deleting files and folders
- Transfer a file's contents (such as XML, point cloud, or raster) into or out of an attribute in FME
- 阅读下载的Google Drive数据使用FeatureReader., or upload data written by theFeatureWriterto Google Drive
- 从Google驱动器检索文件和文件夹名称,路径,链接和其他信息以在工作区中的其他位置使用。
它是如何工作的?
GoogledriveConnector使用您的Google Drive帐户凭据(通过先前定义的FME Web连接,或通过从变压器设置新的FME Web连接)来访问文件存储服务。
Depending on your choice of actions, it will upload or download files, folders, and attributes; list information from the service; or delete items from the service. On uploads, link attributes are added to the output features. On List actions, links and file/folder information are added as attributes.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
在此示例中,GoogledriveConnector用于从Google Drive下载ESRI地理数据库。创建到Google Drive帐户的有效Web连接(可在Google Drave帐户参数中完成),并浏览到地理数据库文件夹,检索对象ID,选择下载的目标。
AFeatureReader.is added to read the newly downloaded dataset. Here, the PostalAddress feature type will be further processed elsewhere in the workspace.
通过在工作区中执行下载,每次运行工作空间时都会刷新地理数据库。
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
在工作空间的此示例部分中,GoogledriveConnector用于将Google Drive从Google Drive下载到属性中的栅格OrthoImage。
该文件从Google Drive读取,并将内容存储为Blob属性。然后一个RasterReplaceris used to interpret the blob into a usable raster format.
这两个变换器的组合避免了必须将图像下载到本地存储并重新读取它。一种类似的技术可以用于点云文件,使用pointcloudreplacer.变压器。
使用说明
此变换器不能用于直接移动或复制不同Google驱动器位置之间的文件。但是,可以使用多个GoogledriveConnectors来完成这些任务。
TheFeatureReader.但是,可以直接访问Google Drive(不使用GoogledriveConnector),但不会创建数据集的本地副本。
Configuration
输入端口
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
此变形器接受任何功能。
输出端口
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
此变压器的输出将根据执行的Google Drive操作而有所不同。
- After an上传action, URLs to the file may be saved to the Sharable Link and Direct Download Link attributes, and the ID of the file will be saved to an attribute.
- ADownloadaction can save to a file, a folder, or an attribute.
- A删除操作没有输出端口。
- AListaction will output a new feature for each file/folder found in the path specified. Each of these new features will have attributes listing various pieces of information about the object.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
导致操作失败操作的功能将通过此端口输出。一个fme_reimpe_code.attribute, having the valueERROR_DURING_PROCESSING,将添加,以及更具描述性的fme_rejection_message属性包含更具体的细节,以及失败的原因。
Rejected Feature Handling:可以设置为终止翻译或在遇到被拒绝的功能时继续运行。此设置可用作默认设置FME option和A.工作区参数.
Parameters
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
Google Drive Action | The type of operation to perform. Choices include:
|
谷歌驾驶账户 | 对Google Drive帐户执行操作需要使用Web连接使用OAuth2身份验证。要创建Google Drive连接,请单击“Google Drive帐户”下拉框,然后选择“添加Web连接...”。然后可以通过工具 - > FME选项... - > Web连接来管理连接。 |
可用的剩余参数取决于请求> Google驱动器操作参数的值。下面详述每个Google Drive操作的参数。
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
谷歌驱动器路径
对象ID |
谷歌驱动器上的文件或文件夹的对象ID删除。如果已作为Web连接提供有效凭据,则可以浏览到位置。 |
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
谷歌驾驶源码
对象ID |
要下载的文件/文件夹的Google Drive ID。如果已作为Web连接提供有效凭据,则可以浏览到位置。 |
目的地
下载as. | Select whether to store the downloaded data in a File, Folder or Attribute.
|
Download to Folder | 指定将存储下载文件的文件夹的路径。有效地下载为文件或文件夹。 |
Include Subfolders | 选择是否下载Google Drive Source的子文件夹。仅适用于下载作为文件夹。 |
下载到属性 | Specify the attribute that will store the contents of the downloaded file. Valid for Download as Attribute only. 不te:FME将尝试将属性的内容转换为UTF-8字符串。如果此失败,则属性的内容将被创建为原始二进制文件。为确保始终保留原始字节并从未转换为UTF-8,请使用下载作为文件。 |
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
谷歌驱动器路径
对象ID |
The folder ID on Google Drive to list the contents of. If valid credentials have been provided as a web connection, you may browse to a location. |
输出属性
提供默认属性名称,可能会被覆盖。
文件或文件夹名称 |
Specify the attribute to hold the name of an object on Google Drive. |
文件或文件夹ID |
Specify the attribute to hold the ID of an object on Google Drive. |
File or Folder Link |
Specify the attribute to hold the link to an object on Google Drive. |
文件大小 |
Specify the attribute to hold the size of a file object on Google Drive. |
最后修改 |
Specify the attribute to hold the last modified date of an object on Google Drive. |
File or Folder Flag |
Specify the attribute to hold the type (file or folder) of an object on Google Drive. |
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
来源
上传 |
The type of data to be uploaded.
使用大型对象时,文件是比属性内容更好的选择,因为数据将直接从磁盘流式传输,而不要求对象完全存储在功能上的内存中。 Google Drive treats file uploads of the same name, in a specific folder, as duplicates, so you can upload multiple files with the same name to a specific folder. When wanting to upload content from a folder, it is better to upload as a folder instead of setting a fixed path and sending multiple features into the connector to upload as a file. |
文件上传 |
The file to be uploaded to Google Drive if Upload from is set to File. |
Folder to Upload |
如果上传到文件夹,则要将文件夹上载到Google Drive。 |
Include Subfolders |
Choose whether to upload subfolders of the Folder to Upload or not. |
属性以载为文件 |
The data to be uploaded, supplied from an attribute if Upload is set to Attribute. |
谷歌驾驶目的地
文件夹ID. | Google驱动器上的路径将源文件上传到。要上传到根目录,请输入“/”。 |
上传with File Name | 从属性中提供的数据创建的文件的名称以将其作为文件上传。名称必须包含文件名扩展名(例如,.txt,.jpg,.doc)。 |
输出属性
Sharable Link | Specify the output attribute that will store a temporary publicly accessible URL that links to the file on Google Drive. |
直接下载链接 | Specify the output attribute that will store a URL that links to the file on Google Drive. The URL can only be used by authenticated users. |
File or Folder Id |
指定将存储刚才上载的文件/文件夹的ID的输出属性。 |
Editing Transformer Parameters
使用一组菜单选项,变压器参数s can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click除适用的参数旁边。有关更多信息,请参阅变压器参数菜单选项.
定义值
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
算术编辑器提供了一种方便的方法来构建来自各种数据源的数学表达式,例如属性,参数和特征函数,其中结果直接在参数内使用。
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
内容
表达式和字符串可以包括许多函数,字符,参数等 - 是否直接在参数中输入或使用其中一个编辑器构造。
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/../Skins/Default/Stylesheets/Images/transparent.gif)
These functions manipulate and format strings. | |
文本编辑器中提供了一组控制字符。 | |
两个编辑器都有数学函数。 | |
这些运算符可在算术编辑器中使用。 | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Working with User Parameters | 创建自己的可编辑参数。 |
参考
Processing Behavior |
|
Feature Holding |
不 |
Dependencies | Google Drive account |
FME Licensing Level | FME Professional Edition and above |
Aliases | |
History | 发布FME 2017.0. |
Categories |
FME Knowledge Center
FME知识中心是演示,How-TOS,文章,常见问题和更多的地方。获取您的问题的答案,从其他用户学习,并建议,投票和评论新功能。
Search forall results about the GoogleDriveConnectoron the FME Knowledge Center.