blob: e9106b8f3e2cf15af114bc64f8498aa9f205d68f [file] [log] [blame]
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /plugins/transforms/
:language: en_US
:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/transforms/tableinput/src/main/doc/tableinput.adoc
= Table Input
== Description
This transform is used to read information from a database, using a connection and SQL. Basic SQL statements can be generated automatically by clicking Get SQL select statement.
== Options
[width="90%", options="header"]
|===
|Option|Description
|Transform name|Name of the transform.
|Connection|The database connection from which to read data
|SQL|The SQL statement used to read information from the database connection. You can also click Get SQL select statement... to browse tables and automatically generate a basic select statement.
|Enable lazy conversion|When enabled, lazy conversion avoids unnecessary data type conversions and can result in a significant performance improvements.
|Replace variables in script?|Enable to replace variables in the script; this feature was provided to allow you to test with or without performing variable substitutions.
|Insert data from transform|Specify the input transform name where Hop can expect information to come from. This information can then be inserted into the SQL statement. The locator where Hop inserts information is indicated with a question mark: ?.
|Execute for each row?|Enable to perform the data insert for each individual row.
|Limit size|Sets the number of lines that is read from the database; zero (0) means read all lines.
|===
== Example
Below is a SQL statement:
``
SELECT * FROM customers WHERE changed_date BETWEEN ? AND ?
``
This SQL statement requests two calendar dates, to create a range, that are read from the Insert data from transform option. The target date range can be provided using the Get System Info transform. For example, if you want to read all customers that have had their data changed yesterday, you can get a target range for yesterday and read the customer data.