---
title: "Sys.Connection"
slug: "sysconnection"
updated: 2024-08-21T07:21:39Z
published: 2024-08-21T07:21:39Z
canonical: "support.lusid.com/sysconnection"
---

> ## 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.

# Sys.Connection

| **Type** | **Read/write** | **Author** | **Availability** |
| --- | --- | --- | --- |
| [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID |

The `Sys.Connection` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that lists information about the user running a query in Luminesce.

> **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read system connection data. This should automatically be the case if you are the domain owner.

**See also:** [Sys.User](/v1/docs/sysuser)

## Basic usage

```sql
select * from Sys.Connection where <filter-expression>;
```

## Data fields

By default, `Sys.Connection` returns a table of data populated with particular fields (columns). You can return a subset of these fields.

To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Sys.Connection' and FieldType = 'Column';
```

> **Note:** Fields marked 'main' are returned by queries that include a caret character, for example `select ^ from Sys.Connection`.

## Examples

> **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples).

### Example 1: Retrieve data on the user running the query

```sql
select * from Sys.Connection
```

### Example 2: Retrieve ID of the user running the query

```sql
select Value from Sys.Connection where Name = 'UserId'
```
