Skip to content

bring-your-own-gdc-assets does not work when there are Athena views in the glue catalog #18

@spock-yh

Description

@spock-yh

When a user has defined an Athena view (via DDL in the athena console, for exampel), that view shows up as a table in the glue data catalog, without a location.

When the bring-your-own-gdc-assets script is executed, it retrieves all tables from the glue catalog and attempts to register their S3 location in Lake Formation. This fails with an exception for views because the S3 location is empty:

  File ".../Unified-Studio-for-Amazon-Sagemaker/migration/bring-your-own-gdc-assets/bring_your_own_gdc_assets.py", line 238, in _check_and_register_location
    s3_subpaths = _get_s3_subpaths(s3_location)
  File ".../Unified-Studio-for-Amazon-Sagemaker/migration/bring-your-own-gdc-assets/bring_your_own_gdc_assets.py", line 189, in _get_s3_subpaths
    current = parts[0] + '//' + parts[2]  # s3://bucket
IndexError: list index out of range

I'm assuming that these tables should be skipped (BTW, the lake formation console itself does show these views under the "Views" section of the menu even though they are listed as tables in Glue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions