AbsaOSS / AbsaOSS/pramen

Add the ability to have metastore partitioning column as a string, not a date

未关闭
#424 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
DS enhancement Pramen-Scala
主要语言
Scala
星标
31
派生
4
平均合并
1 天 10 分钟
30 天内合并 PR
4

描述

## Background
Currently, information date format and type are ignored when the metastore persistence format is 'delta'.

For example, here the date format will be ignored:
```hocon
pramen.metastore.tables = [
{
name = "table1"
description = "Table 1 description"
format = "delta"
path = ${base.path}/table1

information.date.column = "info_date"
information.date.format = "yyyyMM"
}
]
```

while here it will work:
```hocon
pramen.metastore.tables = [
{
name = "table1"
description = "Table 1 description"
format = "parquet"
path = ${base.path}/table1

information.date.column = "info_date"
information.date.format = "yyyyMM"
}
]
```

(the only difference is the storage format)

## Feature
Add the ability to have metastore partitioning column as a string, not a date.

## Example
--

## Proposed Solution
Pramen writes Parquet partitions directly, it constructs the path. For Delta we rely on the type system. So I guess we need to treat any date format that is not 'yyyy-MM-dd' as having `string` type.

Code to look: https://github.com/AbsaOSS/pramen/blob/f61438dc012f738de9dab5b2eb198b9914922642/pramen/core/src/main/scala/za/co/absa/pramen/core/metastore/peristence/MetastorePersistenceDelta.scala#L35-L35

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。