In this article
The page's title should always be the Snap's name. For example, File Reader.
Use this Snap to add the LIMIT clause to the incoming SQL query. The LIMIT clause sets an upper limit on the number of records returned by the SQL query. Additionally, you can also specify an offset value so that the Snap displays the records from the specified offset value up to the number of records based on the specified limit. This Snap also allows you to preview the result of the output query. You can validate the modified query using this preview functionality.
Provide a functional overview of the Snap. Do not mention anything about the Snap's internal technology or techniques. The user should be able to understand what the Snap. Include a screenshot of a well-configured Snap 600px.
None.
None.
Type of view: Document/Binary/Both. Get number of views from the Views tab in the Snap. List at least three compatible Snaps in each category. Provide a brief of the input/output required. If the input/output is optional then preface the description with "Optional." For example, "Transaction data complying with the Orderful schema as a JSON document."
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| The SQL query in which you want to add the LIMIT clause. |
Output | Document |
|
| The incoming SQL query with the LIMIT clause. |
Parameter Name | Data Type | Description | Default Value | Example | |
---|---|---|---|---|---|
Label | String | ELT Limit | Top 10 Records | ||
ELT Limit | Integer | Required. The maximum number of records to be displayed. | N/A | 3 | |
ELT Limit Offset | Integer | The number of rows from the top that you want to skip. If this field is not configured, then the Snap fetches from the first row of records. For example, if you specify 2 here, then the Snap fetches records from the third row up to the number of rows specified in the ELT Limit field.
| N/A | 2 | |
Get preview data | Check box | Not selected | Selected |
None.
Retrieving a Fixed Number of Records from a TableIn a typical scenario, we use the SELECT command to retrieve records from a table. We can control how many records are retrieved by specifying a WHERE condition. However, if we want to limit the number of records retrieved from the table without any conditions, or if we want to retrieve a fixed number of records starting from a specific row, we must use the SELECT command with the LIMIT clause. This example shows how we can use the ELT Limit Snap to achieve this result. First, we use the ELT Select Snap to build a query to retrieve all records from the target table. Upon execution, this Snap builds the query as shown below: Then, we add the ELT Limit Snap and configure it as needed. In this example, we want to retrieve the next 5 records after the first record. So, we configure the ELT Limit Snap as shown below: Based on this configuration, the ELT Limit Snap retrieves 5 (ELT Limit field's value) records starting from the second record (ELT Limit Offset field's value) We can also add an ELT Insert-Select Snap downstream and write the result of this query into another table. |
|
Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt.
Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.