---
schema_version: "1"
id: 38ea77ff47c81766df9d6aaba0ecd1985a5d36dd9573d18f25948bef01a45b65
title: Query Code Extension Logs by Using Query Editor
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-code-ext/guides/query-logs-queryeditor.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/query-logs-queryeditor.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1ffd42b66a1a7d476ae96611b2d93cc16596d451aa41dbb2772f0f56e9d694fd
products:
  - Data 360 Code Extension Guide
  - Data 360 Developer Documentation
---
# Query Code Extension Logs by Using Query Editor

Use Query Editor in Data 360 to view logs generated for code extension runs. Logs are stored in the Data Lake Object (DLO) named `DataCustomCodeLogs__dll`, and you can query them like any other DLO.

**note:** You can also use Data Explorer to view code extension logs saved in the DLO named `DataCustomCodeLogs__dll`. See [View Your Data in Data Explorer](https://help.salesforce.com/s/articleView?id=data.c360_a_view_your_data.htm&type=5).

| Edition Table                                                                                                                                                                                                 |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Available in: **Developer**, **Enterprise**, **Performance**, and **Unlimited** Editions. See Data 360 [edition availability](https://help.salesforce.com/s/articleView?id=sf.c360_a_dc_editions.htm&type=5). |

| User Permissions Needed                             |                                                        |
| :-------------------------------------------------- | :----------------------------------------------------- |
| To query code extension logs by using Query Editor: | Permission set: <ul><li>Data Cloud Architect</li></ul> |

## Prerequisites

- Data 360 access and permission to use Query Editor in your org
- Enable Code Extension in Data Cloud Setup by using the Feature Manager. See [Enable Data 360 Features in Feature Manager](https://help.salesforce.com/s/articleView?id=data.c360_a_feature_manager.htm&language=en_US&type=5).
- A completed batch transform or search index run

## Considerations

- **Latency:** Logs typically appear within a few minutes after code execution. Allow up to about 10 minutes.
- **Message limits:** The maximum log message length is 31,072 characters. Longer messages are truncated.

## Steps to Query Code Extension Logs

1. In Data 360, go to Query Editor.
2. Select a workspace or create one. The workspace defines the objects and metadata that the query can access.
3. In the left pane, click **Data Lake Objects**.
4. Use the search box to find `DataCustomCodeLogs` or scroll through the list to locate and select it.
5. Review the `DataCustomCodeLogs__dll` table to understand the relevant fields.

| Field (API Name)           | Description                                                                                   | Data type |
| :------------------------- | :-------------------------------------------------------------------------------------------- | :-------- |
| `EventId__c`               | DLO primary key for each log record                                                           | UUID      |
| `Timestamp__c`             | Log record timestamp                                                                          | Datetime  |
| `Message__c`               | Your log message                                                                              | Text      |
| `CorrelationId__c`         | Correlates your code extension logs to Data 360 internal logs                                 | UUID      |
| `ExecutionId__c`           | Unique identifier for the code execution; multiple `CorrelationId__c` can share one execution | UUID      |
| `DataCustomCodeName__c`    | Code extension package name                                                                   | Text      |
| `ProcessDefinitionName__c` | Name of the batch data transform or search index that uses the code package                   | Text      |
| `UsedInFeature__c`         | Feature where the code is used, for example, batch data transform or search index             | Text      |
| `OrgId__c`                 | Org identifier                                                                                | Text      |

6. From the `DataCustomCodeLogs` DLO dropdown, select how to create the query.
7. Build a query based on your requirement by using the relevant fields of the `DataCustomCodeLogs` DLO. The editor suggests fields as you build the query.
   For information on building a SQL query in Data 360, see [Get Started with Data 360 SQL](https://developer.salesforce.com/docs/data/data-cloud-query-guide/guide/dc-query-section.html).
8. Click **Run Query** to view the results. To keep the query for future reference, click **Save**.

## Example Queries

- Filter by transform (process) name.

```sql
SELECT "EventId__c",
       "Timestamp__c",
       "Message__c",
       "CorrelationId__c",
       "ExecutionId__c",
       "DataCustomCodeName__c",
       "ProcessDefinitionName__c",
       "UsedInFeature__c",
       "OrgId__c"
FROM "DataCustomCodeLogs__dll"
WHERE "ProcessDefinitionName__c" = 'MyTransformName'
ORDER BY "Timestamp__c" DESC
LIMIT 100;
```

- Filter by code extension package name.

```sql
SELECT "EventId__c",
       "Timestamp__c",
       "Message__c",
       "CorrelationId__c",
       "ExecutionId__c",
       "DataCustomCodeName__c",
       "ProcessDefinitionName__c",
       "UsedInFeature__c",
       "OrgId__c"
FROM "DataCustomCodeLogs__dll"
WHERE "DataCustomCodeName__c" = 'my_custom_code'
ORDER BY "Timestamp__c" DESC
LIMIT 100;
```

- Filter by execution ID (exact run).

```sql
SELECT "EventId__c",
       "Timestamp__c",
       "Message__c",
       "CorrelationId__c",
       "ExecutionId__c",
       "DataCustomCodeName__c",
       "ProcessDefinitionName__c",
       "UsedInFeature__c",
       "OrgId__c"
FROM "DataCustomCodeLogs__dll"
WHERE "ExecutionId__c" = '00000000-0000-0000-0000-000000000000'
ORDER BY "Timestamp__c" DESC;
```

- Filter logs from the last 60 minutes.

```sql
SELECT "EventId__c",
       "Timestamp__c",
       "Message__c",
       "CorrelationId__c",
       "ExecutionId__c",
       "DataCustomCodeName__c",
       "ProcessDefinitionName__c",
       "UsedInFeature__c",
       "OrgId__c"
FROM "DataCustomCodeLogs__dll"
WHERE "Timestamp__c" >= TIMESTAMPADD('minute', -60, CURRENT_TIMESTAMP)
ORDER BY "Timestamp__c" DESC;
```

## See Also

- [Create Queries in a Data 360 Query Workspace](https://help.salesforce.com/s/articleView?id=sf.c360_a_add_queries_to_a_query_workspace.htm&type=5)
- [Query Code Extension Logs by Using the Query API](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/query-logs-api.md)
- [Query Code Extension Logs by Using Salesforce CLI](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/query-logs-cli.md)
