---
title: "Drive.Sqlite"
slug: "drivesqlite"
updated: 2026-06-29T12:49:58Z
published: 2026-06-29T12:49:58Z
canonical: "support.lusid.com/drivesqlite"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Drive.Sqlite

| Type | Read/write | Author | Availability |
| --- | --- | --- | --- |
| [Direct provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider#direct-provider) | Write | FINBOURNE | Provided with LUSID |

The `Drive.Sqlite` provider enables you to write a [Luminesce query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that extracts data from one or more SQLite files stored in [Drive](/v1/docs/drive).

The query returns a table of data assembled from the contents of the file or files in the order they are read.

**See also:** [Drive.Excel](/v1/docs/driveexcel), [Drive.Csv](/v1/docs/drivecsv), [Drive.Xml](/v1/docs/drivexml), [Drive.RawText](/v1/docs/driverawtext)

## Basic usage

```sql
@x = use Drive.Sqlite
<options>
enduse;
select * from @x
```

## Options

`Drive.Sqlite` has options that enable you to filter or refine a query.

> **Note:** The `--file` option is mandatory.

An option takes the form `--&lt;option&gt;=&lt;value&gt;`, for example `--file=my_file.sqlite`. Note no spaces are allowed either side of the `=` operator. If an option:

- Takes a boolean value, then specifying that option (for example `--addFileName`) sets it to True; omitting the option specifies False.
- Takes multiple string values, then specify a comma-separated list, for example `--select=My,Column,Names`.

Current options at article update time are listed in the table below. For the very latest information, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries) and examine the online help:

```sql
@x = use Drive.Sqlite
enduse;
select * from @x
```

| Current options | Explanation |
| --- | --- |
| `file` (`-f`) | **Mandatory**. The file to read. Should be a sqlite file. It may also be a folder, in which case --folderFilter is also required to specify which files in the folder to process. [String] |
| `folderFilter` | Denotes this is searching an entire folder structure and provides a Regular Expression of path/file names within it that should be processed. All matches should be of the same format. [String] |
| `zipFilter` (`-z`) | Denotes this is a Zip file and provides a Regular Expression of path/file names within it that should be processed. All matches should be of the same format. [String] |
| `allowMissing` | Should a file/folder simply not exist, don't throw an error but return an empty table with column names and types created as best possible given other options. [Boolean] |
| `addFileName` | Adds a column (the first column) to the result set which contains the file the row came from. [Boolean] |
| `table` | Table name to read. If missing then an error will be raised if there is any number of tables other than one. [String] |

## Examples

In the following examples, the `select * from @x` syntax at the end prints the table of data assembled by the query.

> **Note:** For more examples, try the [Luminesce Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples/drive).

### Example 1: Extract data from a particular SQLite file

```sql
@x = use Drive.Sqlite
--file=/Finbourne-Examples/my_file.sqlite
enduse;
select * from @x
```

### Example 2: Extract a specific table from a SQLite file

In this example, just the table `instruments1` is extracted from a SQLite file containing more than one table of data.

```sql
@x = use Drive.Sqlite
--file=/Finbourne-Examples/combined.sqlite
--table=instruments1
enduse;
select * from @x
```

### Example 3: Extract data from a particular SQLite file stored in a ZIP archive

In this example, `my-sqlite-files.zip` is stored in the root Drive folder, containing one or more SQLite files. Data is extracted from the archived SQLite file specified by the `--zipFilter` option.

```sql
@x = use Drive.Sqlite
--file=my-sqlite-files.zip
--zipFilter=my_file.sqlite
enduse;
select * from @x
```
