Query Code Extension Logs by Using the Query API (Beta)
Use the Data 360 Query API to programmatically retrieve logs generated for custom code runs. Logs are stored in the Data Lake Object (DLO) named DataCustomCodeLogs__dll, and you can query them like any other DLO.
Code extension is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Beta Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.
| 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
- 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 custom code 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.