Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
As a part of my project, I developed a dashboard using Excel as a source(Excel to QVD, QVD to Dasboard). Now I want my source to be Apache HBase.
And also I don't want to change my datamodel. So, what I want to do is load all tables from Apache HBase to QVD files and use the same dashboard.
But the problem is the column names for Hbase are different from Excel.
For example:
Excel Column | Hbase Column |
---|---|
ACT_DSC | data:ACT_DSC |
CD_TYP_DSC | data:CD_TYP_DSC |
Similarly every column name is appended by the word 'data:'. I have nearly 1200 columns coming from 30 tables. Is there any automated way to rename all these column names.
I want a way to remove 'data:' from every column.
Regards,
Hemanth Dasari.
KeepChar(FieldName,Act_DSC) lik dat
or
=purgechar(yourfield, ' .data:')
hi,
PFA
sample
I dont think so it would be possible if Field from Excel and Hbase are different.
If field are different then you have to do seperate data modelling for same
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.
You could use the Alias keyword before the load, "As', or Rename Using mapping after the load to rename the fields to remove the prefix
I suggest that you use Alias - you could create the list for the Alias in Excel and using Alias means that only the LOAD statements need to be changed from Excel to HBase. Your data model will be unaffected and your front end will need no changes.
Build a statement like this in Excel, and export to your script or to an include file (which may be easier to maintain).
Alias
[data:ACT_DSC] As ACT_DSC,
[data:CD_TYP_DSC] As CD_TYP_DSC,
...
;
This should be executed before the HBase loads.
Check this,
using Friendly
you can easily rename all fields in excel,
to rename, apply command on 1 field and apply on all fields and than paste renamed fields in your qv script.