---
title: "Devo Sink"
canonical: "https://docs.devo.com/space/latest/95214553/Devo%20Sink"
format: markdown
---
> Macro (toc)

## Description

This unit is a [Sink](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213765) unit type.

This unit sends past and current events to a specified **my.app** table in your Devo domain.

An event comes in through the *in *port. The event is sent to the appropriate Devo relay. Input events successfully sent to the **my.app **table exit via the *done* port without modification.

If an error occurs, the input event is enriched with new fields describing the problem, and the event is sent through the *error* port.

![image](media://8d73891e-d8b5-4c4e-8664-0c22693a02e9)

## Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

| **Tab** | **Field** | **Description** |
| --- | --- | --- |
| *General* | *Name* | Enter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed. |
| *Description* | Enter a description detailing the scope of the unit. |
| *Table name* | Enter the name of the Devo table where you want to send the events. It must always be a [my.app table](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95125927/Special+Devo+tags+and+data+tables#my.app). |
| *Time field name* | Enter the name of the event field containing the timestamp of the recent. This input allows you to send past events.<br>When not defined or invalid, the event will be sent using the current date and time. |
| *Domain* | Current: inject data into another table in the same domain. |
| External: inject data into another table in a different domain.<br>- Target domain name: enter the name of the domain you want to inject data into.
- Target domain api key: enter the api key of the domain you want to inject data into. Api keys can be found under **Administration - Credentials - Access keys** ([learn more here](https://devodocs.atlassian.net/wiki/spaces/latest/pages/94763701)). |
| *Refresh columns automatically* | When toggled ON, the input event types will be separated into the following columns in the my.app destination table:<br>1. **Event Type**
  1. Integer
  2. Long
  3. Other values
2. **Table column type**
  1. Int
  2. Int
  3. Str<br>When toggled OFF, all event types will appear in one column. |

![2024-10-18_13-49-27-20241018-122719.png](media://f78e363e-949f-4eab-9483-00981aa51bea)

## Input ports

| **Port** | **Description** |
| --- | --- |
| *in* | This port receives the input events to be sent to the specified** my.app** table. |

## Output ports

| **Port** | **Description** |
| --- | --- |
| *done* | This port outputs the events that were successfully sent to the specified Devo **my.app** table, without any modification. |
| *error* | This port outputs events that couldn't be successfully sent to the specified **my.app** table. Input events are enriched with two additional fields to describe the error (*error* and *exception*). |

## Example

In this example, we want to create a dynamic query to send events every ten minutes to enrich the main query and send the data to a **my.app** table using a Devo sink unit. 

![image](media://a3913044-1f23-4ace-832d-c7ec7666b21e)

To do this, we will add a [Tick](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214835) unit to fire events. Then, we will add a [Scheduler](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214759) unit to send events every 10 minutes.

![image](media://f6b871c8-d51e-4856-a4f9-d24a79881241)

Link the *out *port of the Tick unit to the *do *port of the Scheduler unit.

Next, add a Map [unit](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214080) to define the main query. In the **Fields to add **tab of the properties, add the following information:

![image](media://9a438be5-1fb5-4483-8923-0d382f80b1c1)

In the **Fields to remove **tab, insert:

![image](media://0554aa52-7e79-4337-9cd2-76bff614e642)

Now add a [Devo Full Query](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214466) unit and in the **From event **tab, specify the values corresponding to the input event fields, overriding previous settings.

We will send the data of the main query from the *out *port of the Map unit to the *in *port of the Devo Full Query unit. 

Finally, send the data to a specific **my.app **table using a [ Devo Sink ](#)unit, linking the *data *port of the Devo Full Query to the *in *port.

> ℹ️ After [saving and starting](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213352) the Flow, you must click the red button of the Tick unit to begin sending events.

### Download this example

You can try this flow by downloading the following JSON file and uploading it to your domain using the **Import **option: