/AWS1/CL_GLU=>GETDATABASES()
¶
About GetDatabases¶
Retrieves all databases defined in a given Data Catalog.
Method Signature¶
IMPORTING¶
Optional arguments:¶
iv_catalogid
TYPE /AWS1/GLUCATALOGIDSTRING
/AWS1/GLUCATALOGIDSTRING
¶
The ID of the Data Catalog from which to retrieve
Databases
. If none is provided, the Amazon Web Services account ID is used by default.
iv_nexttoken
TYPE /AWS1/GLUTOKEN
/AWS1/GLUTOKEN
¶
A continuation token, if this is a continuation call.
iv_maxresults
TYPE /AWS1/GLUCATALOGGETTERPAGESIZE
/AWS1/GLUCATALOGGETTERPAGESIZE
¶
The maximum number of databases to return in one response.
iv_resourcesharetype
TYPE /AWS1/GLURESOURCESHARETYPE
/AWS1/GLURESOURCESHARETYPE
¶
Allows you to specify that you want to list the databases shared with your account. The allowable values are
FEDERATED
,FOREIGN
orALL
.
If set to
FEDERATED
, will list the federated databases (referencing an external entity) shared with your account.If set to
FOREIGN
, will list the databases shared with your account.If set to
ALL
, will list the databases shared with your account, as well as the databases in yor local account.
it_attributestoget
TYPE /AWS1/CL_GLUDATABASEATTRSLST_W=>TT_DATABASEATTRIBUTESLIST
TT_DATABASEATTRIBUTESLIST
¶
Specifies the database fields returned by the
GetDatabases
call. This parameter doesn’t accept an empty list. The request must include theNAME
.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_glugetdatabasesrsp
/AWS1/CL_GLUGETDATABASESRSP
¶
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~getdatabases(
it_attributestoget = VALUE /aws1/cl_gludatabaseattrslst_w=>tt_databaseattributeslist(
( new /aws1/cl_gludatabaseattrslst_w( |string| ) )
)
iv_catalogid = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_resourcesharetype = |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_databaselist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_namestring = lo_row_1->get_name( ).
lv_descriptionstring = lo_row_1->get_description( ).
lv_uri = lo_row_1->get_locationuri( ).
LOOP AT lo_row_1->get_parameters( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_row_1->get_createtime( ).
LOOP AT lo_row_1->get_createtabledefaultperms( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lo_datalakeprincipal = lo_row_4->get_principal( ).
IF lo_datalakeprincipal IS NOT INITIAL.
lv_datalakeprincipalstring = lo_datalakeprincipal->get_datalakeprincipalid( ).
ENDIF.
LOOP AT lo_row_4->get_permissions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_permission = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lo_databaseidentifier = lo_row_1->get_targetdatabase( ).
IF lo_databaseidentifier IS NOT INITIAL.
lv_catalogidstring = lo_databaseidentifier->get_catalogid( ).
lv_namestring = lo_databaseidentifier->get_databasename( ).
lv_namestring = lo_databaseidentifier->get_region( ).
ENDIF.
lv_catalogidstring = lo_row_1->get_catalogid( ).
lo_federateddatabase = lo_row_1->get_federateddatabase( ).
IF lo_federateddatabase IS NOT INITIAL.
lv_federationidentifier = lo_federateddatabase->get_identifier( ).
lv_namestring = lo_federateddatabase->get_connectionname( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_token = lo_result->get_nexttoken( ).
ENDIF.