Writer Directives
显示的后缀以当前
in a mapping file. By default, the
对于googlefusion表编写器来说GOOGLEFUSIONTABLES\u输出
.
数控
This directive specifies a Named Connection for OAuth 2.0 authentication to Google Fusion Table private data tables from a specific Google account.
For more information on how the Named Connection is used, please refer to the topicReader Parameters.
要求的/Optional
要求的
Mapping File Syntax
Workbench Parameter
Named Connection
定义
Each Google Fusion table must be defined before it can be written. The general form of a Google Fusion table definition statement is:
GOOGLEFUSIONTABLES_DEF\
[googlefusiontables_create_table (yes|no)] \
[googlefusiontables_drop_table (yes|no)] \
[googlefusiontables_truncate_table (yes|no)] \
[googlefusiontables_mode (inherit_from_writer|insert|update|delete)]\
[googlefusiontables\u update\u key\u columns]
The table definition allows control of the table that will be created. If the table already exists, the majority of thegooglefusiontables_
parameters will be ignored and need not be given. If the fields and types are listed, they must match those in the database.
If the table does not exist, then the field names and types are used to first create the table. In any case, if a
is given, it may be any field type supported by the target database.
The configuration parameters present on the definition line are described in the following table:
Parameter | Contents |
---|---|
tableName | 要写入的表的名称 |
googlefusiontables\u创建\u表 | 指定是否基于writer功能类型中的name和user属性名称和类型,使用表和列的名称创建新表。 不 |
googlefusiontables_geometry_columns | 用逗号分隔的几何图形列名列表。。在创建新表时,将为每个提供的几何图形列名创建这些几何图形列,或在写入现有表时与现有几何图形列匹配。 Default:geom |
googlefusiontables _drop_table | 如果该表以该名称存在,则应删除该表。仅在创建新表时有效。 不 |
googlefusiontables\u truncate\u表 | 如果该表以该名称存在,则应在向其写入任何功能之前将其截断。如果与更新或删除模式结合使用,将导致空表。 不 |
googlefusiontables _update_key_columns | A comma-separated list of the columns which are matched against the corresponding FME attribute’s values to specify which rows are to be updated or deleted when the writer mode is either UPDATE or DELETE. |
要求的/Optional
Optional
TRANSACTION_INTERVAL
This statement defines the number of features to be placed in each transaction before a transaction is committed to the database.
If the
Note:最大值为500。
要求的/Optional
Optional
Mapping File Syntax
Workbench Parameter
Transaction Interval
WRITER_MODE
Note:For more information on this directive, see the chapterDatabase Writer Mode.
This directive determines which operations will be performed by default by this writer.
This operation can be set to插入, UPDATE或DELETE. The default writer level value for this operation can be overwritten at the feature type or table level. The corresponding feature type def parameter name is calledGOOGLE_FUSION_TABLE_MODE. It has the same valid options as the writer level mode and additionally the valueINHERIT_FROM_WRITERwhich causes the writer level mode to be inherited by the feature type as the default for features contained in that table.
If theGOOGLEFUSIONTABLES\ WRITER\模式语句,则值为插入是给定的。
Mapping File Syntax
Workbench Parameter
编写器模式
BEGIN_SQL{n}
有时,您必须在打开表之前执行一些特殊的SQL。例如,在尝试读取视图之前,可能需要确保该视图存在。
Upon opening a connection to read from a database, the reader looks for the directive
, and executes each such directive’s value as an SQL statement on the database connection.
Multiple SQL commands can be delimited by a character specified using theFME\ U SQL\分隔符
keyword, embedded at the beginning of the SQL block. The single character following this keyword will be used to split the SQL, which will then be sent to the database for execution. Note: Include a space before the character.
例如:
FME\ U SQL\分隔符;
DELETE FROM instructors;
从LastName='Doe'和FirstName='John'的联系人中删除
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
要求的/Optional
Optional
Workbench Parameter
SQL Statement to Execute Before Translation
END_SQL {n}
有时,您必须在关闭一组表之后执行一些特殊的SQL。例如,可能需要在写入数据库后清理临时视图。
Just before closing a connection on a database, the reader looks for the directive
Multiple SQL commands can be delimited by a character specified using theFME\ U SQL\分隔符directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL, which will then be sent to the database for execution.
Note:Include a space before the character.
例如:
FME\u SQL\u分隔符;从讲师中删除;从LastName='Doe'和FirstName='John'所在的人员中删除
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
要求的/Optional
Optional
Workbench Parameter
转换后要执行的SQL语句