Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4210

Support the custom year, month, and day field name partition for the fact table

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: v3.0.0-alpha
    • Fix Version/s: None
    • Component/s: Job Engine
    • Labels:
      None

      Description

      YearMonthDayPartitionConditionBuilder supports partitions named year, month, day, but can not supportl other names like Y, M, D.
      Because there are user using fact table partitioned by Y、 M、 D, so add CustomYearMonthDayFieldPartitionConditionBuilder, support custom year, month, day partition name.

      Partition metadata in model.json like:
      {
        "uuid" : "459d48c1-a8a6-cdf5-6ea7-e2ae48b248e9",
        "last_modified" : 1571652918478,
        "version" : "2.6.0.20500",
        "name" : "kylin_sales_ymd",
        "owner" : "admin",
        "is_draft" : false,
        "description" : "",
        "fact_table" : "BIGDATA_KYLIN.KYLIN_SALES_YMD",
        "lookups" : [ ],
        "dimensions" : [

      {     "table" : "KYLIN_SALES_YMD",     "columns" : [ "LEAF_CATEG_ID", "TRANS_ID", "SLR_SEGMENT_CD", "SELLER_ID", "BUYER_ID", "OPS_USER_ID", "OPS_REGION", "Y", "M", "D" ]   }

      ],
        "metrics" : [ "KYLIN_SALES_YMD.PRICE", "KYLIN_SALES_YMD.ITEM_COUNT" ],
        "filter_condition" : "",
        "partition_desc" :

      {     "partition_date_column" : "KYLIN_SALES_YMD.Y, KYLIN_SALES_YMD.M, KYLIN_SALES_YMD.D",     "partition_time_column" : null,     "partition_date_start" : 0,     "partition_date_format" : "yyyy-MM-dd",     "partition_time_format" : "HH:mm:ss",     "partition_type" : "APPEND",     "partition_condition_builder" : "org.apache.kylin.metadata.model.PartitionDesc$CustomYearMonthDayFieldPartitionConditionBuilder"   }

      ,
        "capacity" : "MEDIUM"
      }

      Partition_date_column is the year, month, and day partition field split by ','. Partition_condition_builder is org.apache.kylin.metadata.model.PartitionDesc$CustomYearMonthDayFieldPartitionConditionBuilder

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                xiaoge chuxiao
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: