We have updated WebDataRocks EULA, effective as of April 18, 2024. Learn more about what's changed.

How to specify the data type for particular column?

Answered

If I want to specify a data type ‘number’ for a column named as ‘Amount’ or data type ‘string’ for column ‘Name’ then how should I do that?

2 answers

WebDataRocks Team WebDataRocks April 1, 2020

Hello,
 
Thank you for reaching out to us.
 
Specific types for hierarchies can be defined using the meta-object of the JSON or CSV data source. Such an object is represented as the first element of an array for JSON or the first row for CSV.
 
In case your data source is JSON, it is also possible to use the meta-object in order to create multi-level hierarchies and defining specific captions of the hierarchies.
 
We would like to kindly draw your attention to the following code snippets demonstrating the type definition:
JSON:

[{
"Category": {
type: "string"
},
"Item": {
type: "string"
},
"Serving Size": {
type: "string"
},
"Calories": {
type: "number"
},
"Calories from Fat": {
type: "number"
}
},
{
"Category": "meat",
"Item": "steak",
"Serving Size": "300g",
"Calories": 1300,
"Calories from Fat": 750
}
...
]

 
CSV:

Invoice Number, D+Invoice Date, -Quantity, -Unit Price, +Country, w+Week Day
43111, 2018-05-15, 3, 329, France, Tuesday
43112, 2018-05-16, 4, 139, Italy, Wednesday

 
More information about the meta-object and data types in our documentation:

We hope it helps.
 
Best regards,
WebDataRocks Team

Om Dhanwant April 6, 2020

Thanks for answering.. It was helpful.