AbsaOSS / AbsaOSS/enceladus

Right and Left Padding Functionality

Aperta
#193 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Conformance feature Menas priority: undecided request under discussion
Lingua principale
Scala
Stelle
33
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.