Query Code Extension Logs by Using the Query API
Use the Data 360 Query API to programmatically retrieve logs generated for code extension runs. Logs are stored in the Data Lake Object (DLO) named DataCustomCodeLogs__dll. You can query them like any other DLO.
| Edition Table |
|---|
| Available in: Developer, Enterprise, Performance, and Unlimited Editions. See Data 360 edition availability. |
| User Permissions Needed | |
|---|---|
| To query code extension logs by using the Query API: | Permission set:
|
- Data 360 access with permission to query data
- Enable Code Extension in Data Cloud Setup by using the Feature Manager. See Enable Data 360 Features in Feature Manager.
- Authenticate to the Data 360 Connect API. See Get Started with Data 360 Connect API.
- A completed batch transform execution
- Latency: Logs typically appear within a few minutes after code execution. Allow up to about 10 minutes.
- Message limits: Maximum log message length is 31,072 characters. Longer messages are truncated.
-
Understand the relevant fields of the
DataCustomCodeLogs__dllDLO.EventId__c— DLO primary key for each log recordTimestamp__c— Log record timestampMessage__c— Your log messageCorrelationId__c— Correlates your code extension logs to Data 360 internal logsDataCustomCodeName__c— Name of the code extension packageProcessDefinitionName__c— Name of the batch data transform that uses the code packageExecutionId__c— Unique identifier for the code execution. More than oneCorrelationId__ccan share one executionUsedInFeature__c— Feature where the code is used, for example, batch data transformOrgId__c— Org identifier
-
Create your SQL query to query the
DataCustomCodeLogs__dllDLO like any other Data 360 object. See Create sql query.Examples
- Filter by transform (process) name.
- Filter by code extension package name.
- Filter by execution ID.
- Filter by correlation ID.
-
Check the query status. See Get SQL Query Status.
-
(Optional) Retrieve additional rows. If your query returns more data than the initial response, retrieve additional rows. See getSqlQueryRows.