# Filtering SQlite data

This scenario describes a rather simple Job which uses a select statement based on a filter to extract rows from a source SQLite Database and feed an output SQLite table.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tSQLite1.png)

* Drop from the Palette, a tSQLiteInput and a tSQLiteOutput component from the Palette to the design workspace.

* Connect the input to the output using a row main link.

* On the tSQLiteInput Basic settings, type in or browse to the SQLite Database input file.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tSQLite2.png)

* The file contains hundreds of lines and includes an ip column which the select statement will based on

* On the tSQLite Basic settings, edit the schema for it to match the table structure.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tSQLite3.png)

* In the Query field, type in your select statement based on the *ip* column.

* On the tSQLiteOutput component Basic settings panel, select the Database filepath.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tSQLite4.png)

* Type in the Table to be fed with the selected data.

* Select the Action on table and Action on Data. In this use case, the action on table is *Drop and create* and the action on data is *Insert*.

* The schema should be synchronized with the input schema.

* Save the Job and run it.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tSQLite5.png)

The data queried is returned in the defined SQLite file.

For an example of how to use dynamic schemas with Input components, see [Writing dynamic columns from a database to an output file](https://help.qlik.com/talend/en-US/components/8.0/dynamic-schema/tmysqlinput-tfileoutputdelimited-tmap-tfileoutputdelimited-tmap-writing-dynamic-columns-from-database-to-output-file-standard-component-enterprise-in-this).

**Related reference**

* [tSQLiteInput](https://help.qlik.com/talend/en-US/components/8.0/sqlite/tsqliteinput "Executes a DB query with a defined command which must correspond to the schema definition. It passes on rows to the next component via a Main row link.")
* [tSQLiteOutput](https://help.qlik.com/talend/en-US/components/8.0/sqlite/tsqliteoutput "Executes the action defined on the table and/or on the data contained in the table, based on the flow incoming from the preceding component in the job.")