AbsaOSS / AbsaOSS/enceladus

Right and Left Padding Functionality

未关闭
#193 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Conformance feature Menas priority: undecided request under discussion
主要语言
Scala
星标
33
派生
16
PR 合并指标
30 天内没有已合并 PR

描述

## Background
Some datasets have attributes that need to be padded before they can be concatenated and used in further mapping rules.

The types of attributes that require this functionality have been done through the API rather than the UI but we have gotten more requests for this to be a functionality in the UI.

## Problem
#### 1. Simple Problem
There are attributes that need leading 0's appended to them as business users expect to see the values with leading 0's.
##### Example:
See attached

#### 2. Complex Problem
We have an attribute that has two parts - an alpha of length 7 and a numeric of length 3.
In a dataset, these two parts are saved across two columns ie. Alpha part of attribute in one column and numeric part in another column.
We need to be able to pad the data in those two columns to be able to concatenate them as a new attribute.

##### Example:
Alpha: GHTYF
Numeric: 54

Expected Outcome: GHTYF 054
*ie. Alpha's were right padded with spaces and the numerics were padded with 0's before concatenating*
See more in the attached

## Proposed Solution
Functionality to be able to do this in Menas:
1. rpad(col("attributeX"), 13, 0)
2. rpad(col("alpha"), 7, " ") and lpad(col("numeric", 3, 0)

[Xml Example](https://app.zenhub.com/files/154513089/46ab8114-799f-4cc1-b3ea-25a22055b54b/download)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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