xarzu
New Member
- Joined
- Apr 1, 2013
- Messages
- 15
When working with the functionality of reading data from a cvs file into a dataflow, it is required, I believe, to use a schema. It seems to me that this schema has to be designed to accommodate the end of a line in the data. What is the proper way to do this?
First of all, It seems that all schemas start like this:
After this, the schema lists the individual columns. Let's say that in our case, we only have three columns, "Name", "Profession" and "Profession-2". In order to recognize that we have reached the end of the line as we read data, the \r character should be used. I assume this is how it should be done:
Finally, there is the "required" block.
What are your thoughts? Did I get this right? Is there some sort of documented explanations somewhere outlining the proper use of the /r character?
First of all, It seems that all schemas start like this:
JSON:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": [
"string",
"null"
]
},
After this, the schema lists the individual columns. Let's say that in our case, we only have three columns, "Name", "Profession" and "Profession-2". In order to recognize that we have reached the end of the line as we read data, the \r character should be used. I assume this is how it should be done:
JSON:"Name": { "type": [ "string", "null" ] }, "Profession": { "type": [ "string", "null" ] }, "Profession-2\r": { "type": [ "string", "null" ] }
Finally, there is the "required" block.
JSON:
"required": [
"Name",
"Profession",
"Profession-2\r",
]
What are your thoughts? Did I get this right? Is there some sort of documented explanations somewhere outlining the proper use of the /r character?