Skip to content

/AWS1/CL_GLU=>GETUNFILTEREDPARTITIONSMET()

About GetUnfilteredPartitionsMetadata

Retrieves partition metadata from the Data Catalog that contains unfiltered metadata.

For IAM authorization, the public IAM action associated with this API is glue:GetPartitions.

Method Signature

IMPORTING

Required arguments:

iv_catalogid TYPE /AWS1/GLUCATALOGIDSTRING /AWS1/GLUCATALOGIDSTRING

The ID of the Data Catalog where the partitions in question reside. If none is provided, the AWS account ID is used by default.

iv_databasename TYPE /AWS1/GLUNAMESTRING /AWS1/GLUNAMESTRING

The name of the catalog database where the partitions reside.

iv_tablename TYPE /AWS1/GLUNAMESTRING /AWS1/GLUNAMESTRING

The name of the table that contains the partition.

it_supportedpermissiontypes TYPE /AWS1/CL_GLUPERMTYPELIST_W=>TT_PERMISSIONTYPELIST TT_PERMISSIONTYPELIST

A list of supported permission types.

Optional arguments:

iv_region TYPE /AWS1/GLUVALUESTRING /AWS1/GLUVALUESTRING

Specified only if the base tables belong to a different Amazon Web Services Region.

iv_expression TYPE /AWS1/GLUPREDICATESTRING /AWS1/GLUPREDICATESTRING

An expression that filters the partitions to be returned.

The expression uses SQL syntax similar to the SQL WHERE filter clause. The SQL statement parser JSQLParser parses the expression.

Operators: The following are the operators that you can use in the Expression API call:

=

Checks whether the values of the two operands are equal; if yes, then the condition becomes true.

Example: Assume 'variable a' holds 10 and 'variable b' holds 20.

(a = b) is not true.

< >

Checks whether the values of two operands are equal; if the values are not equal, then the condition becomes true.

Example: (a < > b) is true.

>

Checks whether the value of the left operand is greater than the value of the right operand; if yes, then the condition becomes true.

Example: (a > b) is not true.

<

Checks whether the value of the left operand is less than the value of the right operand; if yes, then the condition becomes true.

Example: (a < b) is true.

>=

Checks whether the value of the left operand is greater than or equal to the value of the right operand; if yes, then the condition becomes true.

Example: (a >= b) is not true.

<=

Checks whether the value of the left operand is less than or equal to the value of the right operand; if yes, then the condition becomes true.

Example: (a <= b) is true.

AND, OR, IN, BETWEEN, LIKE, NOT, IS NULL

Logical operators.

Supported Partition Key Types: The following are the supported partition keys.

  • string

  • date

  • timestamp

  • int

  • bigint

  • long

  • tinyint

  • smallint

  • decimal

If an type is encountered that is not valid, an exception is thrown.

io_auditcontext TYPE REF TO /AWS1/CL_GLUAUDITCONTEXT /AWS1/CL_GLUAUDITCONTEXT

A structure containing Lake Formation audit context information.

iv_nexttoken TYPE /AWS1/GLUTOKEN /AWS1/GLUTOKEN

A continuation token, if this is not the first call to retrieve these partitions.

io_segment TYPE REF TO /AWS1/CL_GLUSEGMENT /AWS1/CL_GLUSEGMENT

The segment of the table's partitions to scan in this request.

iv_maxresults TYPE /AWS1/GLUPAGESIZE /AWS1/GLUPAGESIZE

The maximum number of partitions to return in a single response.

io_querysessioncontext TYPE REF TO /AWS1/CL_GLUQUERYSESSCONTEXT /AWS1/CL_GLUQUERYSESSCONTEXT

A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.

RETURNING

oo_output TYPE REF TO /aws1/cl_glugetunfiltedparti03 /AWS1/CL_GLUGETUNFILTEDPARTI03

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->/aws1/if_glu~getunfilteredpartitionsmet(
  io_auditcontext = new /aws1/cl_gluauditcontext(
    it_requestedcolumns = VALUE /aws1/cl_gluaudcolumnnamesls00=>tt_auditcolumnnameslist(
      ( new /aws1/cl_gluaudcolumnnamesls00( |string| ) )
    )
    iv_additionalauditcontext = |string|
    iv_allcolumnsrequested = ABAP_TRUE
  )
  io_querysessioncontext = new /aws1/cl_gluquerysesscontext(
    it_additionalcontext = VALUE /aws1/cl_gluaddlcontextmap_w=>tt_additionalcontextmap(
      (
        VALUE /aws1/cl_gluaddlcontextmap_w=>ts_additionalcontextmap_maprow(
          key = |string|
          value = new /aws1/cl_gluaddlcontextmap_w( |string| )
        )
      )
    )
    iv_clusterid = |string|
    iv_queryauthorizationid = |string|
    iv_queryid = |string|
    iv_querystarttime = '20150101000000.0000000'
  )
  io_segment = new /aws1/cl_glusegment(
    iv_segmentnumber = 123
    iv_totalsegments = 123
  )
  it_supportedpermissiontypes = VALUE /aws1/cl_glupermtypelist_w=>tt_permissiontypelist(
    ( new /aws1/cl_glupermtypelist_w( |string| ) )
  )
  iv_catalogid = |string|
  iv_databasename = |string|
  iv_expression = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_region = |string|
  iv_tablename = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_unfilteredpartitions( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lo_partition = lo_row_1->get_partition( ).
      IF lo_partition IS NOT INITIAL.
        LOOP AT lo_partition->get_values( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_valuestring = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_namestring = lo_partition->get_databasename( ).
        lv_namestring = lo_partition->get_tablename( ).
        lv_timestamp = lo_partition->get_creationtime( ).
        lv_timestamp = lo_partition->get_lastaccesstime( ).
        lo_storagedescriptor = lo_partition->get_storagedescriptor( ).
        IF lo_storagedescriptor IS NOT INITIAL.
          LOOP AT lo_storagedescriptor->get_columns( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              lv_namestring = lo_row_5->get_name( ).
              lv_columntypestring = lo_row_5->get_type( ).
              lv_commentstring = lo_row_5->get_comment( ).
              LOOP AT lo_row_5->get_parameters( ) into ls_row_6.
                lv_key = ls_row_6-key.
                lo_value = ls_row_6-value.
                IF lo_value IS NOT INITIAL.
                  lv_parametersmapvalue = lo_value->get_value( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDLOOP.
          lv_locationstring = lo_storagedescriptor->get_location( ).
          LOOP AT lo_storagedescriptor->get_additionallocations( ) into lo_row_7.
            lo_row_8 = lo_row_7.
            IF lo_row_8 IS NOT INITIAL.
              lv_locationstring = lo_row_8->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_formatstring = lo_storagedescriptor->get_inputformat( ).
          lv_formatstring = lo_storagedescriptor->get_outputformat( ).
          lv_boolean = lo_storagedescriptor->get_compressed( ).
          lv_integer = lo_storagedescriptor->get_numberofbuckets( ).
          lo_serdeinfo = lo_storagedescriptor->get_serdeinfo( ).
          IF lo_serdeinfo IS NOT INITIAL.
            lv_namestring = lo_serdeinfo->get_name( ).
            lv_namestring = lo_serdeinfo->get_serializationlibrary( ).
            LOOP AT lo_serdeinfo->get_parameters( ) into ls_row_6.
              lv_key = ls_row_6-key.
              lo_value = ls_row_6-value.
              IF lo_value IS NOT INITIAL.
                lv_parametersmapvalue = lo_value->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
          LOOP AT lo_storagedescriptor->get_bucketcolumns( ) into lo_row_9.
            lo_row_10 = lo_row_9.
            IF lo_row_10 IS NOT INITIAL.
              lv_namestring = lo_row_10->get_value( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_storagedescriptor->get_sortcolumns( ) into lo_row_11.
            lo_row_12 = lo_row_11.
            IF lo_row_12 IS NOT INITIAL.
              lv_namestring = lo_row_12->get_column( ).
              lv_integerflag = lo_row_12->get_sortorder( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_storagedescriptor->get_parameters( ) into ls_row_6.
            lv_key = ls_row_6-key.
            lo_value = ls_row_6-value.
            IF lo_value IS NOT INITIAL.
              lv_parametersmapvalue = lo_value->get_value( ).
            ENDIF.
          ENDLOOP.
          lo_skewedinfo = lo_storagedescriptor->get_skewedinfo( ).
          IF lo_skewedinfo IS NOT INITIAL.
            LOOP AT lo_skewedinfo->get_skewedcolumnnames( ) into lo_row_9.
              lo_row_10 = lo_row_9.
              IF lo_row_10 IS NOT INITIAL.
                lv_namestring = lo_row_10->get_value( ).
              ENDIF.
            ENDLOOP.
            LOOP AT lo_skewedinfo->get_skewedcolumnvalues( ) into lo_row_13.
              lo_row_14 = lo_row_13.
              IF lo_row_14 IS NOT INITIAL.
                lv_columnvaluesstring = lo_row_14->get_value( ).
              ENDIF.
            ENDLOOP.
            LOOP AT lo_skewedinfo->get_skewedcolumnvaluelocmaps( ) into ls_row_15.
              lv_key_1 = ls_row_15-key.
              lo_value_1 = ls_row_15-value.
              IF lo_value_1 IS NOT INITIAL.
                lv_columnvaluesstring = lo_value_1->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
          lv_boolean = lo_storagedescriptor->get_storedassubdirectories( ).
          lo_schemareference = lo_storagedescriptor->get_schemareference( ).
          IF lo_schemareference IS NOT INITIAL.
            lo_schemaid = lo_schemareference->get_schemaid( ).
            IF lo_schemaid IS NOT INITIAL.
              lv_glueresourcearn = lo_schemaid->get_schemaarn( ).
              lv_schemaregistrynamestrin = lo_schemaid->get_schemaname( ).
              lv_schemaregistrynamestrin = lo_schemaid->get_registryname( ).
            ENDIF.
            lv_schemaversionidstring = lo_schemareference->get_schemaversionid( ).
            lv_versionlongnumber = lo_schemareference->get_schemaversionnumber( ).
          ENDIF.
        ENDIF.
        LOOP AT lo_partition->get_parameters( ) into ls_row_6.
          lv_key = ls_row_6-key.
          lo_value = ls_row_6-value.
          IF lo_value IS NOT INITIAL.
            lv_parametersmapvalue = lo_value->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_timestamp = lo_partition->get_lastanalyzedtime( ).
        lv_catalogidstring = lo_partition->get_catalogid( ).
      ENDIF.
      LOOP AT lo_row_1->get_authorizedcolumns( ) into lo_row_9.
        lo_row_10 = lo_row_9.
        IF lo_row_10 IS NOT INITIAL.
          lv_namestring = lo_row_10->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_boolean = lo_row_1->get_isregedwithlakeformation( ).
    ENDIF.
  ENDLOOP.
  lv_token = lo_result->get_nexttoken( ).
ENDIF.