完成目标
把散乱的字段结合起来,形成银行账户的代码
现有数据(输入)
操作要求
-
Input the data
导入数据(.csv),默认文本格式,导入时选择“connection”-“Text file”
!!勿更改此处的源数据格式为.xlsx,否则展示时可能会有数据格式出错!! -
In the Transactions table, there is a Sort Code field which contains
dashes(破折号). We need to remove these so just have a 6 digit string (hint)
如图操作所示,remove punctuations(移除标点符号) -
Use the SWIFT Bank Code lookup table to bring in additional
information about the SWIFT code and Check Digits of the receiving
bank account (hint)
结合两个表格,有相同的Bank,通过Join把它们结合起来,即把SWIFT Bank Code look up table(查找表)的银行信息(SWIFT code, Check Digits)加入到Transactions table(主表)当中 -
Add a field for the Country Code (hint)
- Hint: all these transactions take place in the UK so the Country Code should be GB
此处增加变量(Country Code)的方法:通过calculation,“create calculation field",赋值为"GB",不用再写等式,直接把值填进去就行
!!额外增加变量或数据的方法:https://www.preppindata.com/howto/how-to-create-additional-data
- Hint: all these transactions take place in the UK so the Country Code should be GB
-
Create the IBAN as above (hint)
- Hint: watch out for trying to combine sting fields with numeric
fields - check data types
将数字形式的field改变为字符串形式后,根据IBAN的结构用"+"连接各个值,最终形成新的变量IBAN
- Hint: watch out for trying to combine sting fields with numeric
-
Remove unnecessary fields (hint)
增加一步clean step,只留下Transaction ID和IBAN,其余变量均剔除(选中多余变量,右键”remove“即可) -
Output the data