Skip to content

Add Partition Setting in UI for Profiler #8624

Closed

Description

@TeddyCr

Context

#8623 introduce the possibility to profile/test tables based on partition configuration. We need to allow user to set up this config from the frontend.

Proposed solution

We'll need to send the below payload to configure partitioning to the following endpoint http://localhost:8585/api/v1/tables/{id}/tableProfilerConfig

{
    "partitioning": {
        "enablePartitioning": true,
        "partitionColumnName": "order_date",
        "partitionIntervalType": "TIME-UNIT",
        "partitionInterval": 5,
        "partitionIntervalUnit": "YEAR"
    }
}

All fields are required. Below is the JSON Schema definition and their accepted values for each key. Disregard partitionValues for now, this is for support in future releases.

    "partitionProfilerConfig": {
       "description": "This schema defines the partition configuration used by profiler.",
       "type": "object",
       "javaType": "org.openmetadata.schema.type.PartitionProfilerConfig",
       "properties": {
         "enablePartitioning": {
           "description": "whether to use partition",
           "type": "boolean",
           "default": false
         },
         "partitionColumnName": {
           "description": "name of the column to use for the partition",
           "type": "string"
         },
         "partitionIntervalType": {
           "description": "type of partition interval",
           "type": "string",
           "enum": ["TIME-UNIT", "INGESTION-TIME"]
         },
         "partitionInterval": {
           "description": "The interval to use for the partitioning",
           "type": "integer"
         },
         "partitionIntervalUnit": {
           "description": "unit used for the partition interval",
           "type": "string",
           "enum": ["YEAR", "MONTH", "DAY", "HOUR"]
         },
         "partitionValues": {
           "description": "unit used for the partition interval",
           "type": "array"
         }
       }
     }

A few elements to note:

  1. This setting should be placed under the "Enable Column Profile", we should have "Enable Partitioning" section with the keys of the config ("enablePartitioning", "partitionColumnName", "partitionIntervalType", "partitionInterval", "partitionIntervalUnit")
  2. "partitionColumnName" should be a list of column with one of the following data type "DATE", "DATETIME", "TIMESTAMP", "TIMESTAMPZ". The user should be able to only choose ONE. If no column with this type is present partitioning config should be disabled.
    Screenshot 2022-11-09 at 5 43 15 PM

Activity

  1. added
    UI
    on Nov 9, 2022
  2. moved this from 🆕 New to 🏗 In progress in Release 0.13.0on Nov 10, 2022
  3. moved this from 🏗 In progress to 👀 In review in Release 0.13.0on Nov 11, 2022
  4. Repository owner moved this from 👀 In review to 🔖 Ready in Release 0.13.0on Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

UI

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions