Microsoft SQL Server and Azure SQL Database Spatial Reader Parameters
Database Connections |
---|
Connections store authentication information. For general information about sharing database connections, please see Using Database Connections. Note: Depending on context and/or database format, you might see different combinations of Database Connection parameters. Connection
Select an existing connection, or Add Database Connection to define a new connection. The new connection can be made visible only to the current user, or can be shared among multiple users. |
Connection Parameters
The host name of the Microsoft SQL Server or Azure SQL Database. (It is not necessary to specify a port if a default configuration is used.)
If you have configured your Microsoft SQL Server database to use a non-standard port number, you can specify this port here.
The correct syntax is:
<Host>[\<Instance>][,<port>]
The name of the database to connect to.
- SQL Server Authentication: Select this option to proceed with specifying login credentials through the Username and Password parameters.
- Windows Authentication: Select this option when connecting through a Windows user account, and the database can validate the account name and password using the Windows principal token in the operating system. Since the user account is retrieved by Windows, the Username and Password parameters are ignored.
Enter the username and password to access the database, user account, or wherever authentication is required.
Note: This parameter is not present in the Azure SQL Database reader and writer. The Azure SQL Database reader and writer will always request Secure Sockets Layer (SSL) encrypted connections.
When selected, this parameter requests Secure Sockets Layer (SSL) encryption for the connection. If the server does not have a certificate trusted by the client machine, the connection will fail. Otherwise, data will be encrypted before traveling over the network. There are multiple ways to trust a server certificate on a client machine.
If this parameter is not selected, encryption behavior will be determined by encryption properties set for SQL Server Native Client, and for SQL Server.
Tip: When Encrypt Connection is selected, please provide a fully qualified Server name. For example, a server named safe-sql-server might have a fully qualified name of safe-sql-server.dev.safe. This fully qualified name should be an exact match for the server name on the trusted certificate.
When enabled, the database connection persists for the duration of an FME session.
For example, it may be desirable to maintain a connection when running a batch of 100 workspaces on the same database connection, which saves the processing time required to make and break a database connection.
FME considers the database connection to be the same when the database name, the username, and password are the same.
The time, in seconds, after which to terminate a query to the database if it has not yet returned a result.
If set to 0, there is no timeout. The default is 30.
Note: If this value is not set high enough, then the query will return the error Provider Error - Timeout Expired.
Constraints
Enter (or browse for) the name(s) of specific database table(s) to extract.
This optional specification is used to limit the rows read by the reader from each table. This example selects only the features whose lengths are more than 2000:
LENGTH > 2000
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, you can use this parameter to expose additional attributes on multiple feature types.
Use Search Envelope
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that intersect with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
When selected, this parameter removes any portions of imported features being read that are outside the Search Envelope.
The example below illustrates the results of the Search Envelope when Clip to Search Envelope is not selected (set to No) and when it is selected (set to Yes).
- No: Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.
- Yes: Any features that cross the search envelope boundary will be clipped at the boundary, and only the portion that lies inside the boundary will be read. The underlying function for the Clip to Search Envelope function is an intersection; however, when Clip to Search Envelope is selected, a clipping operation is also performed in addition to the intersection.
Advanced
The number of rows that are retrieved at one time into local memory from the data source. For example, if set to 10, the reader reads ten rows into local memory, and processes features from this memory buffer. After the reading the last row, the reader retrieves the next 10 rows from the data source.
This parameter will result in significantly degraded performance if incorrectly set. The optimum value depends primarily on the characteristics of individual records and the transport between the database and the client machine. It is less affected by the quantity of rows that are to be retrieved. The default value has been determined optimal.
This parameter allows for the execution of SQL statements before opening a table for reading. For example, it may be necessary to create a temporary view before attempting to read from it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND 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 or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
This parameter allows for the execution of SQL statements after a set of tables has been read. For example, it may be necessary to clean up a temporary view after creating it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND 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 or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
SQL Server does not constrain all geometry objects in a column to have the same Spatial Reference ID (SRID). However, it is common practice to use a single SRID within a given column. If No, FME will not assume that each geometry column uses a single SRID when querying the database. If not specified, Yes is the default value.
If Yes, feature geometry will be read into an aggregate. A directive is set on the aggregate to indicate that each part of the aggregate is independent from the others, and its own geometry. Geometry parts of the aggregate are named and contain geometry according to their respective column in the table being read.
When using this feature, neither the geometry/geography column, nor the feature type SELECT statement can be specified.
This parameter controls whether or not the MakeValid() SQL command will be used when there is a Search Envelope being applied.
- Yes: MakeValid() will be used. This may cause a slow-down during reading, as the spatial data will validated and possibly corrected.
- No (default): MakeValid() will not be used. This may speed up reading; however, it may cause the translation to fail if there is invalid data. If a translation fails, setting this parameter to Yes will allow the translation to succeed.