Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I developed a dashboard using Excel sheets as Source(Excel to QVD, QVD to dashboard). Now as a part of my project , I want to change my data source from Excel to Apache Hbase. But I dont want to change my data model.
But the problem is the column names from HBase as extra 'data:' for each column name.
For Example:
Excel Source | Hbase Source |
---|---|
PRD_TYP_DSC | data:PRD_TYP_DSC |
CD_TYP_DATE | data:CD_TYP_DATE |
TOT_AMT_DUE_IN_GC | data:TOT_AMT_DUE_IN_GC |
Now I want to remove that extra 'data:' from each column. I had some 1200 columns coming from 30 tables. So I want an automated way to use rather than manually using 'as'.
Regards,
Hemanth Dasari.
Refer link How to Rename Fields
HI,
You can rename all the columns in a single shot by using
FieldNameMap;
Mapping Load OldFieldName, NewFieldName From FieldNames ;
Rename Fields using FieldNameMap;
Example:
FieldNameMap
LOAD
*
INLINE [
NewFieldName, OldFieldName
PRD_TYP_DSC, | data:PRD_TYP_DSC |
CD_TYP_DATE, | data:CD_TYP_DATE |
TOT_AMT_DUE_IN_GC, | data:TOT_AMT_DUE_IN_GC |
];
Rename Fields using FieldNameMap;
Hope this helps you.
Regards,
jagan.