-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getColumnMetadata function #39
Comments
I'm sorry - what is your question? I don't understand. |
Actually, columnMetadata.name and columnMetadata.label both are returning the same values but name suppose to return e.g MATNR and label should return "Material Number". |
I see what you mean. The way it works is that you can pass label info in the header query parameter. See parseHeader in the querybuilder.xsjslib. The header parameter is parsed as JSON, and can be an array of strings, or an array of object literals. If an array of strings, then these strings will be used as aliases for the SQL columns. If an array of objects,then the label propery of each object is used as label. What it does not currently do is grab label metadata from the database. You'll have to push it from the client side. It would be cool to have an automatic label defaults in case the caller does not provide them. I will happily accept a pull request for that. |
Thanks Roland, |
@shambhuhyd I'm willing to look into the feature but it would help if you could tell me the expected behavior in the cases you're interested in. If you could do the research and tell me where to fetch the labels from in the SAP HANA data dictionary, that would be really cool. Thanks in advance, Roland, |
Hi Roland, HeaderLabel.txt Thanks, |
Hi @shambhuhyd , thanks man! This looks really promising, it's a nice step towards a solution. I think that for ODXL it would be best to wrap it inside a xsjs script - a table function will need authorization and I'd like to avoid that as it will make it more difficult to use ODXL. What are your thoughts concerning how to control the label generation? What it he caller wants to specify some labels themselves, but have others be automatically supplied? I mean, how do you think the interface should look? |
Hi Roland, |
I know you can use it in calculation views, my concern is they need authorization to install the table function.
I know this is what we can do, my question is more: how does the caller command what they want? How can odxl notice what the user wants to happen for each field? For the ones they provide a value for, it is easy - they'll want the specified label. But it is not self-evident that they'll want to generated label for the ones they do not specify anything for. It seems intuitive that if the user does not specify anything in particular, nothing in particular should happen, i.e. the label will be equal to the field name. Makes sense? |
In getColumnMetadata function, I'm getting same value:
columnMetadata = columnsMetadata[i];
columnName = columnMetadata.name;
columnLabel = columnMetadata.label;
body += columnName + "\t";
The text was updated successfully, but these errors were encountered: