GoogleCloudStorageConnector
访问Google Cloud Storage帐户中载,下载或删除文件和文件夹或列出文件/文件夹信息的谷歌云存储文件存储服务。
Typical Uses
- 通过上传,下载和删除文件和文件夹来管理Google云存储上的数据集
- 将文件的内容(例如XML或栅格)传输到FME中的属性中
- 阅读下载的Google云存储数据使用FeatureReader.或上传由featurewriter.到谷歌云存储
- 从Google Cloud Storage检索文件和文件夹名称,路径,链接和其他信息以在工作区中的其他位置使用。
它是如何工作的?
的GoogleCloudStorageConnector uses the Google Cloud Storage account credentials (either via a previously defined FME web connection, or by setting up a new FME web connection right from the transformer) to access the file storage service.
Depending on the specified action, it will upload or download blobs and attributes; list information from the service; or delete blobs from the service. On uploads, link attributes can be added to the output features. On List actions, file/folder information are added as attributes.
在此示例中,GoogleCloudStorAgeConnector用于从Google云存储下载ESRI地理数据库。在创建到Google Cloud Storage帐户的有效Web连接(可以在帐户参数中完成)后,并浏览到地理数据库文件夹,检索桶和对象的路径,选择下载的目的地。
AFeatureReader.is added to read the newly downloaded dataset. Here, the PostalAddress feature type will be further processed elsewhere in the workspace.
通过在工作区中执行下载,每次运行工作空间时都会刷新地理数据库。
在工作空间的此示例部分中,GoogleCloudStorAgeConnector用于将Google云存储从Google Cloud存储器下载到属性中的栅格OrthoImage。
该文件从Google云存储读取,并将内容存储为Blob属性。然后一个RasterReplaceris used to interpret the blob into a usable raster format.
这两个变换器的组合避免了必须将图像下载到本地存储并重新读取它。一种类似的技术可以用于点云文件,使用pointcloudreplacer.变压器。
使用说明
- This transformer cannot be used to directly move or copy files between different Google Cloud Storage locations. However, multiple GoogleCloudStorageConnectors can be used to accomplish these tasks.
- 的FeatureReader.can access Google Cloud Storage directly, without using the GoogleCloudStorageConnector. In this case, a permanent local copy of the dataset will not be created.
配置
输入端口
此变形器接受任何功能。
输出端口
的output of this transformer will vary depending on the action performed.
- After an上传操作,有关该文件的选定信息将可用作属性。
- ADownload操作将输出传入功能,可以保存到文件,文件夹或属性。
- A删除action will output the incoming feature.
- AList操作将为指定路径中的每个文件/文件夹输出新功能。这些新功能中的每一个都将具有列出有关对象的各种信息的属性。
的incoming feature is output through this port.
导致操作失败操作的功能将通过此端口输出。一个fme_reimpe_code.attribute, having the valueERROR_DURING_PROCESSING,将添加,以及更具描述性的fme_rejection_message属性包含更具体的细节,以及失败的原因。
不te:如果一个功能进入googlecloudstoragecector,则已经具有值fme_reimpe_code., this value will be removed.
拒绝功能处理:可以设置为终止翻译或在遇到被拒绝的功能时继续运行。此设置可用作默认设置FME option和A.工作区参数。
Parameters
凭证来源 | GoogleCloudStorageconconnector可以使用来自不同源的凭据。使用Web连接最佳FME,但在某些情况下,您可能希望使用其中一个来源。
|
帐户 | Available when the credential source is网页Connection。To create a Google Cloud Storage connection, click the 'Account' drop-down box and select 'Add Web Connection...'. 然后可以通过工具 - > FME选项... - > Web连接来管理连接。 |
项目ID. | Google云项目ID。只有在凭证来源时需要网页Connection。 |
行动 | 的type of operation to perform. Choices include:
|
可用的剩余参数取决于请求>操作参数的值。每个操作的参数如下所述。
删除选项
桶 | 桶文件或文件夹所在。如果已作为Web连接提供有效凭据,则可以浏览桶。 |
Path | 的full path of a file or folder on Google Cloud Storage to delete. If valid credentials have been provided as a web connection, you may browse for a location. |
下载选项
桶 | 桶文件或文件夹所在。如果已作为Web连接提供有效凭据,则可以浏览桶。 |
Path | 要下载的文件或文件夹的完整路径。如果已作为Web连接提供有效凭据,则可以浏览位置。 |
目的地
下载as. | 选择是否将下载的数据存储在文件,文件夹或属性中。
|
下载到属性 | Specify the attribute that will store the contents of the downloaded file. Valid for Download as Attribute only. |
响应身体编码 | 如需下载作为属性,可以指定字符集编码以确保输出处于人类可读的形式。 如果Auto Detect from HTTP Headeris specified but there is no encoding in the Content-Type metadata associated with the data, the output will be returned as raw bytes. |
Download to Folder | 指定将存储下载文件的文件夹的路径。有效地下载为文件或文件夹。 |
如果文件Exists | 如果该文件已在本地存在,请指定该怎么办。有效地下载为文件或文件夹。
|
Include Subfolders | 选择是否下载Google云存储源的子文件夹。仅适用于下载作为文件夹。 |
输出属性
所选属性将添加到输出功能。
_download_path |
本地文件系统上下载的对象的路径。此属性将不会添加为属性下载。 |
List Options
桶 | 该桶中的桶。如果已作为Web连接提供有效凭据,则可以浏览桶。 |
Path | 要列出文件夹的完整路径。如果已作为Web连接提供有效凭据,则可以浏览位置。 |
Include Subfolders | 如果设置为是的然后,递归遍历子文件夹,并且它们的内容包括在结果中。 |
输出属性
所选属性将添加到输出功能。
_name |
Name of the file or folder |
_完整路径 |
Full path of the file or folder |
_url |
文件或文件夹的URL。 |
_file_or_folder. |
Whether the item is a file or a folder |
_文件大小 |
文件大小(文件夹不存在) |
_created |
Date and time when the file was created |
_最后修改 |
Date and time when the file was last modified |
_relative_path. |
相对于列表路径的项目路径 |
数据源
上传 |
的type of data to be uploaded.
使用大型对象时,文件是比属性更好的选择,因为数据将直接从磁盘流式传输,而不要求对象完全存储在功能上的内存中。 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. |
文件上传 |
的file to be uploaded to Google Cloud Storage if上传设定为文件。 |
要上传的文件夹 |
的folder to be uploaded to Google Cloud Storage if上传设定为文件夹。 |
Include Subfolders |
Choose whether to upload subfolders of the要上传的文件夹或不。 |
属性以载为文件 |
从属性提供的要上载的数据上传设定为Attribute。 |
上传选项
桶 | 该桶中的桶。如果已作为Web连接提供有效凭据,则可以浏览桶。 |
Path | 的full path to the folder on Google Cloud Storage to upload to. If valid credentials have been provided as a web connection, you may browse for a location. |
上传文件名 | 的name of the file created from the data supplied in属性以载为文件。名称必须包含文件名扩展名(例如,.txt,.jpg,.doc)。 |
如果文件Exists | Specify what to do if the file already exists on Google Cloud Storage.
|
Permissions | 指定上载文件或文件夹的访问权限。
|
Metadata
It is possible to specify custom name-value pairs that are associated with the uploaded features.
输出属性
所选属性将添加到输出功能。仅适用于文件和文件夹上传。
_name | 文件或文件夹的名称。 |
_完整路径 | Full path of the file or folder. |
_url |
文件或文件夹的URL。 |
Editing Transformer Parameters
使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅变压器参数菜单选项。
定义值
有几种方法可以在变压器中定义使用的值。最简单的是简单地输入值或字符串,其可以包括各种类型的函数,例如属性引用,数学和字符串函数和工作区参数。有许多工具和快捷方式可以帮助构造值的值,通常可以从与值字段相邻的下拉上下文菜单中提供。
使用文本编辑器
的文本编辑器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.
内容
表达式和字符串可以包括许多函数,字符,参数等。
设置值 - 无论是否直接在参数中输入或使用其中一个编辑器和包含字符串的表达式都是构造的,都会评估这些函数的字符串和表达式。因此,这些函数的名称(以@ <function_name.>) should not be used as literal string values.
的se functions manipulate and format strings. | |
Special Characters |
文本编辑器中提供了一组控制字符。 |
两个编辑器都有数学函数。 | |
Date/Time Functions | 文本编辑器中提供日期和时间函数。 |
这些运算符可在算术编辑器中使用。 | |
的se return primarily feature-specific values. | |
可以使用FME和工作区的参数。 | |
创建和修改用户参数 | 创建自己的可编辑参数。 |
参考
处理行为 |
|
Feature Holding |
不 |
Dependencies | 谷歌云存储帐户 |
FME Licensing Level | FME基本版及以上 |
Aliases | |
History | Released FME 2019.0 |
Categories |
FME社亚搏国际在线官网区
FME社区是演示亚搏国际在线官网,TOS,文章,常见问题和更多的地方。获取您的问题的答案,从其他用户学习,并建议,投票和评论新功能。
Search forall results about the GoogleCloudStorageConnectoron the FME Community.
例子可能包含根据开放政府许可证的信息 - 温哥华