AbsaOSS / AbsaOSS/enceladus

Right and Left Padding Functionality

Đang mở
#193 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Conformance feature Menas priority: undecided request under discussion
Ngôn ngữ chính
Scala
Star
33
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.