Skip to content

[FEATURE]: Add "is_partitioned" field to HMS tables crawler output #871

Closed
@randall-gonzalez-dbx

Description

@randall-gonzalez-dbx

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

Special consideration needs to be taken when migrating HMS partitioned tables to UC external table. Currently there is no way to distinguish between HMS partitioned and non-partitioned, based on the output of the assessment.

Proposed Solution

I see two files tables.py and tables.scala, not sure if both need to be modified or just the scala version.
For the Python version, DESCRIBE EXTENDED outputs partition information if applicable, and could be used to derive is_partitioned.
For the Scala version, the attached piece of code seems to do the trick. I decided not to submit a PR because I am weak in Scala and also this involves a separate function call (getTableMetadata - see the attached notebook) . The notebook also includes two other alternative approaches that did not work.
test_partitioned.txt

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmigrate/externalgo/uc/upgrade SYNC EXTERNAL TABLES stepstep/assessmentgo/uc/upgrade - Assessment Step

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions