Skip to content

/AWS1/IF_CRM=>STARTANALYSISLOGEXPORT()

About StartAnalysisLogExport

Starts an export of the Apache Spark logs for a protected query to an Amazon S3 bucket that you own. Use the exported logs to diagnose a query that failed or that ran more slowly than you expected.

Clean Rooms exports a redacted copy of the Spark logs instead of the raw logs. Analyze the exported logs with the tooling of your choice, such as Spark History Server. For details about what the exported logs contain, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs-contents.html.

The export runs asynchronously and returns with a status of IN_PROGRESS. Call GetAnalysisLogExport to poll for the final status.

To use this operation, you must have the CAN_EXPORT_QUERY_ANALYSIS_LOG ability for your membership. You must also be the query runner or the query payer. Having the ability alone is not sufficient.

The query must have reached a terminal state, and it must have reached the execution stage. A query that failed validation or that was canceled before it started produces no Spark logs.

Log export isn't supported for queries that use differential privacy, and isn't supported for PySpark jobs.

The destination bucket must be in the same Amazon Web Services Region as the collaboration. Cross-Region export isn't supported.

For more information, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs.html.

Method Signature

METHODS /AWS1/IF_CRM~STARTANALYSISLOGEXPORT
  IMPORTING
    !IV_MEMBERSHIPIDENTIFIER TYPE /AWS1/CRMMEMBERSHIPIDENTIFIER OPTIONAL
    !IV_ANALYSISID TYPE /AWS1/CRMUUID OPTIONAL
    !IV_ANALYSISTYPE TYPE /AWS1/CRMLOGEXPORTANALYSISTYPE OPTIONAL
    !IO_RESULTCONFIGURATION TYPE REF TO /AWS1/CL_CRMALYLOGEXPRSLTCONF OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_crmstartalylogexpout
  RAISING
    /AWS1/CX_CRMACCESSDENIEDEX
    /AWS1/CX_CRMINTERNALSERVEREX
    /AWS1/CX_CRMRESOURCENOTFOUNDEX
    /AWS1/CX_CRMSERVICEQUOTAEXCDEX
    /AWS1/CX_CRMTHROTTLINGEX
    /AWS1/CX_CRMVALIDATIONEX
    /AWS1/CX_CRMCLIENTEXC
    /AWS1/CX_CRMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_membershipidentifier TYPE /AWS1/CRMMEMBERSHIPIDENTIFIER /AWS1/CRMMEMBERSHIPIDENTIFIER

A unique identifier for the membership to export the analysis logs for. Currently accepts a membership ID.

iv_analysisid TYPE /AWS1/CRMUUID /AWS1/CRMUUID

The unique identifier of the protected query that you want to export the analysis logs for.

iv_analysistype TYPE /AWS1/CRMLOGEXPORTANALYSISTYPE /AWS1/CRMLOGEXPORTANALYSISTYPE

The type of analysis that the logs are exported for. Currently, only PROTECTED_QUERY is supported.

io_resultconfiguration TYPE REF TO /AWS1/CL_CRMALYLOGEXPRSLTCONF /AWS1/CL_CRMALYLOGEXPRSLTCONF

The details needed to write the exported analysis logs.

You don't need to create an IAM role for log export. Clean Rooms writes the exported logs using your own identity, so Clean Rooms writes the exported logs only where your existing permissions allow.

RETURNING

oo_output TYPE REF TO /aws1/cl_crmstartalylogexpout /AWS1/CL_CRMSTARTALYLOGEXPOUT

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->startanalysislogexport(
  io_resultconfiguration = new /aws1/cl_crmalylogexprsltconf(
    io_outputconfiguration = new /aws1/cl_crmalylogexpoutconf(
      io_s3 = new /aws1/cl_crmalylogexp3outconf(
        iv_bucket = |string|
        iv_keyprefix = |string|
      )
    )
  )
  iv_analysisid = |string|
  iv_analysistype = |string|
  iv_membershipidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_analysislogexport = lo_result->get_analysislogexport( ).
  IF lo_analysislogexport IS NOT INITIAL.
    lv_analysislogexportidenti = lo_analysislogexport->get_analysislogexportid( ).
    lv_uuid = lo_analysislogexport->get_analysisid( ).
    lv_logexportanalysistype = lo_analysislogexport->get_analysistype( ).
    lv_uuid = lo_analysislogexport->get_membershipid( ).
    lv_analysislogexportstatus = lo_analysislogexport->get_status( ).
    lo_analysislogexportresult = lo_analysislogexport->get_resultconfiguration( ).
    IF lo_analysislogexportresult IS NOT INITIAL.
      lo_analysislogexportoutput = lo_analysislogexportresult->get_outputconfiguration( ).
      IF lo_analysislogexportoutput IS NOT INITIAL.
        lo_analysislogexports3outp = lo_analysislogexportoutput->get_s3( ).
        IF lo_analysislogexports3outp IS NOT INITIAL.
          lv_string = lo_analysislogexports3outp->get_bucket( ).
          lv_keyprefix = lo_analysislogexports3outp->get_keyprefix( ).
        ENDIF.
      ENDIF.
    ENDIF.
    lv_timestamp = lo_analysislogexport->get_createtime( ).
    lv_timestamp = lo_analysislogexport->get_updatetime( ).
    lo_analysislogexporterror = lo_analysislogexport->get_error( ).
    IF lo_analysislogexporterror IS NOT INITIAL.
      lv_string = lo_analysislogexporterror->get_code( ).
      lv_string = lo_analysislogexporterror->get_message( ).
    ENDIF.
  ENDIF.
ENDIF.