{"action":"created","comment":{"url":"https://api.github.com/repos/apache/apex-malhar/pulls/comments/86495058","pull_request_review_id":7151498,"id":86495058,"diff_hunk":"@@ -0,0 +1,107 @@\n+Csv Parser Operator\n+=============\n+\n+## Operator Objective\n+This operator is designed to parse delimited records and construct a map or concrete java class also known as [\"POJO\"](https://en.wikipedia.org/wiki/Plain_Old_Java_Object) out of it. User need to provide the schema to describe the delimited data. Based on schema definition the operator will parse the incoming record to object map and POJO.  User can also provide constraints if any, in the schema. The supported constraints are listed in [constraints table](#constraints). The incoming record will be validated against those constraints. Valid records will be emitted as POJO / map while invalid ones are emitted on error port with error message.\n+\n+**Note**: field names of POJO must match field names in schema and in the same order as it appears in the incoming data.\n+\n+## Overview\n+The operator is **stateless**, **idempotent**, **fault-tolerant** and **partitionable**.\n+\n+\n+## <a name=\"props\"></a>Properties of Csv Parser\n+User need to set the schema which describes delimited data as well as specifies constraints on values if any.\n+e.g.\n+\n+```xml\n+{\n+  \"separator\":\",\",\n+  \"quoteChar\":\"\\\"\",\n+  \"fields\":[\n+    {\n+      \"name\":\"adId\",\n+      \"type\":\"Integer\",\n+      \"constraints\":{\n+         \"required\":\"true\"\n+      }\n+    },\n+    {\n+      \"name\":\"adName\",\n+      \"type\":\"String\",\n+      \"constraints\":{\n+         \"required\":\"true\",\n+         \"pattern\":\"[a-z].*[a-z]$\",\n+         \"maxLength\":\"10\"\n+      }\n+    },\n+    {\n+      \"name\":\"bidPrice\",\n+      \"type\":\"Double\",\n+      \"constraints\":{\n+         \"required\":\"true\",\n+         \"minValue\":\"0.1\",\n+         \"maxValue\":\"3.2\"\n+      }\n+    },\n+    {\n+      \"name\":\"startDate\",\n+      \"type\":\"Date\",\n+      \"constraints\":{\n+         \"format\":\"yyyy-MM-dd HH:mm:ss\"\n+      }\n+    }\n+  ]\n+}\n+```\n+\n+| **Property** | **Description** | **Type** | **Mandatory** | **Default Value** |\n+| -------- | ----------- | ---- | ------------------ | ------------- |\n+| *schema* | [Schema](https://github.com/apache/apex-malhar/blob/master/contrib/src/main/java/com/datatorrent/contrib/parser/DelimitedSchema.java)  describing delimited data | String | YES | N/A |\n+ \n+## Platform Attributes that influences operator behavior\n+\n+| **Attribute** | **Description** | **Type** | **Mandatory** |\n+| -------- | ----------- | ---- | ------------------ |\n+| *out.TUPLE_CLASS* | TUPLE_CLASS attribute on output port which tells operator the class of POJO which need to be emitted | Class| Yes |\n+ \n+## <a name=\"dataTypes\"></a>Supported DataTypes in Schema\n+  * Integer\n+  * Long integer\n+  * Double integer\n+  * Character\n+  * String\n+  * Boolean\n+  * Date\n+\n+## <a name=\"constraints\"></a>Schema Constraints \n+|**DataType**| **Constraints** | **Description** |\n+| -------- | -------- | -------- |\n+| *All data Types* | required | If mentioned, indicates that the data type constraints that follow are required. It cannot be blank/null. It may or may not satisfy other constraints ( like equals/minVal/maxVal etc ) |\n+| *All data Types* | equals | If mentioned, indicates that the data string or value declared in the data type constraints must be an exact match with the specified value. `Note: This constraints is not applicable for data type boolean and date` |\n+| *String* | Length | The string must be of the length that is specified. |\n+| *String* | minLength | The string is at least the length specified as minLength value. |\n+| *String* | maxLength | The string can be at the most the length specified as maxLength value. |\n+| *String* | pattern | The string must match the specified regular expression. |\n+| *Long* | maxValue | The numeric can be at the most the value specified as maxValue. |\n+| *Long* | minValue | The numeric is at least the value specified as minValue. |\n+| *Double* | maxValue | The numeric can be at the most the value specified as maxValue. |\n+| *Double* | minValue | The numeric is at least the value specified as minValue. |\n+| *Integer* | maxValue | The numeric can be at the most the value specified as maxValue. |\n+| *Integer* | minValue | The numeric is at least the value specified as minValue. |\n+| *Date* | format | A simple date format as specified in the SimpleDateFormat class: http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html?is-external=true |\n+| *Boolean* | trueValue | String for which boolean value is true. The default values are: true, 1, y, and t. `Note: If you specify trueValue, you must also specify falseValue.` |\n+| *Boolean* | falseValue | String for which boolean value is false. The default values are: false, 0, n, and f. `Note: If you specify falseValue, you must also specify trueValue.` |\n+\n+ \n+## Ports\n+\n+| **Port** | **Description** | **Type** | **Mandatory** |\n+| -------- | ----------- | ---- | ------------------ |\n+| *out* | Valid Tuples that are emitted as pojo | Object (POJO) | Yes |","path":"docs/operators/csvParserOperator.md","position":101,"original_position":101,"commit_id":"31230db47451beba3acf55f6c85ca22449612689","original_commit_id":"31230db47451beba3acf55f6c85ca22449612689","user":{"login":"shubham-pathak22","id":3529753,"avatar_url":"https://avatars.githubusercontent.com/u/3529753?v=3","gravatar_id":"","url":"https://api.github.com/users/shubham-pathak22","html_url":"https://github.com/shubham-pathak22","followers_url":"https://api.github.com/users/shubham-pathak22/followers","following_url":"https://api.github.com/users/shubham-pathak22/following{/other_user}","gists_url":"https://api.github.com/users/shubham-pathak22/gists{/gist_id}","starred_url":"https://api.github.com/users/shubham-pathak22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubham-pathak22/subscriptions","organizations_url":"https://api.github.com/users/shubham-pathak22/orgs","repos_url":"https://api.github.com/users/shubham-pathak22/repos","events_url":"https://api.github.com/users/shubham-pathak22/events{/privacy}","received_events_url":"https://api.github.com/users/shubham-pathak22/received_events","type":"User","site_admin":false},"body":"out port is not marked as mandatory in the operator. ","created_at":"2016-11-04T06:41:17Z","updated_at":"2016-11-04T06:41:17Z","html_url":"https://github.com/apache/apex-malhar/pull/406#discussion_r86495058","pull_request_url":"https://api.github.com/repos/apache/apex-malhar/pulls/406","_links":{"self":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/comments/86495058"},"html":{"href":"https://github.com/apache/apex-malhar/pull/406#discussion_r86495058"},"pull_request":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/406"}}},"pull_request":{"url":"https://api.github.com/repos/apache/apex-malhar/pulls/406","id":84631471,"html_url":"https://github.com/apache/apex-malhar/pull/406","diff_url":"https://github.com/apache/apex-malhar/pull/406.diff","patch_url":"https://github.com/apache/apex-malhar/pull/406.patch","issue_url":"https://api.github.com/repos/apache/apex-malhar/issues/406","number":406,"state":"open","locked":false,"title":"APEXMALHAR-2232: Add documentation for csv parser","user":{"login":"DT-Priyanka","id":8776018,"avatar_url":"https://avatars.githubusercontent.com/u/8776018?v=3","gravatar_id":"","url":"https://api.github.com/users/DT-Priyanka","html_url":"https://github.com/DT-Priyanka","followers_url":"https://api.github.com/users/DT-Priyanka/followers","following_url":"https://api.github.com/users/DT-Priyanka/following{/other_user}","gists_url":"https://api.github.com/users/DT-Priyanka/gists{/gist_id}","starred_url":"https://api.github.com/users/DT-Priyanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DT-Priyanka/subscriptions","organizations_url":"https://api.github.com/users/DT-Priyanka/orgs","repos_url":"https://api.github.com/users/DT-Priyanka/repos","events_url":"https://api.github.com/users/DT-Priyanka/events{/privacy}","received_events_url":"https://api.github.com/users/DT-Priyanka/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-09T10:55:18Z","updated_at":"2016-11-04T06:41:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc020e44ea9beec94f63554f5ffc450171841d06","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/apex-malhar/pulls/406/commits","review_comments_url":"https://api.github.com/repos/apache/apex-malhar/pulls/406/comments","review_comment_url":"https://api.github.com/repos/apache/apex-malhar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/apex-malhar/issues/406/comments","statuses_url":"https://api.github.com/repos/apache/apex-malhar/statuses/31230db47451beba3acf55f6c85ca22449612689","head":{"label":"DT-Priyanka:APEXMALHAR-2232-csv-parser-doc","ref":"APEXMALHAR-2232-csv-parser-doc","sha":"31230db47451beba3acf55f6c85ca22449612689","user":{"login":"DT-Priyanka","id":8776018,"avatar_url":"https://avatars.githubusercontent.com/u/8776018?v=3","gravatar_id":"","url":"https://api.github.com/users/DT-Priyanka","html_url":"https://github.com/DT-Priyanka","followers_url":"https://api.github.com/users/DT-Priyanka/followers","following_url":"https://api.github.com/users/DT-Priyanka/following{/other_user}","gists_url":"https://api.github.com/users/DT-Priyanka/gists{/gist_id}","starred_url":"https://api.github.com/users/DT-Priyanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DT-Priyanka/subscriptions","organizations_url":"https://api.github.com/users/DT-Priyanka/orgs","repos_url":"https://api.github.com/users/DT-Priyanka/repos","events_url":"https://api.github.com/users/DT-Priyanka/events{/privacy}","received_events_url":"https://api.github.com/users/DT-Priyanka/received_events","type":"User","site_admin":false},"repo":{"id":42163020,"name":"incubator-apex-malhar","full_name":"DT-Priyanka/incubator-apex-malhar","owner":{"login":"DT-Priyanka","id":8776018,"avatar_url":"https://avatars.githubusercontent.com/u/8776018?v=3","gravatar_id":"","url":"https://api.github.com/users/DT-Priyanka","html_url":"https://github.com/DT-Priyanka","followers_url":"https://api.github.com/users/DT-Priyanka/followers","following_url":"https://api.github.com/users/DT-Priyanka/following{/other_user}","gists_url":"https://api.github.com/users/DT-Priyanka/gists{/gist_id}","starred_url":"https://api.github.com/users/DT-Priyanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DT-Priyanka/subscriptions","organizations_url":"https://api.github.com/users/DT-Priyanka/orgs","repos_url":"https://api.github.com/users/DT-Priyanka/repos","events_url":"https://api.github.com/users/DT-Priyanka/events{/privacy}","received_events_url":"https://api.github.com/users/DT-Priyanka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DT-Priyanka/incubator-apex-malhar","description":"Mirror of Apache Apex malhar (Incubating)","fork":true,"url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar","forks_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/forks","keys_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/teams","hooks_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/events","assignees_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/tags","blobs_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/languages","stargazers_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/subscription","commits_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/merges","archive_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/downloads","issues_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/DT-Priyanka/incubator-apex-malhar/deployments","created_at":"2015-09-09T07:27:31Z","updated_at":"2015-09-09T07:27:35Z","pushed_at":"2016-10-13T08:16:10Z","git_url":"git://github.com/DT-Priyanka/incubator-apex-malhar.git","ssh_url":"git@github.com:DT-Priyanka/incubator-apex-malhar.git","clone_url":"https://github.com/DT-Priyanka/incubator-apex-malhar.git","svn_url":"https://github.com/DT-Priyanka/incubator-apex-malhar","homepage":null,"size":87400,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"6ddefd02ac72168b17c3dedb47af7d91c23c3574","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":41348334,"name":"apex-malhar","full_name":"apache/apex-malhar","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/apex-malhar","description":"Mirror of Apache Apex malhar","fork":false,"url":"https://api.github.com/repos/apache/apex-malhar","forks_url":"https://api.github.com/repos/apache/apex-malhar/forks","keys_url":"https://api.github.com/repos/apache/apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/apex-malhar/teams","hooks_url":"https://api.github.com/repos/apache/apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/apache/apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/apache/apex-malhar/events","assignees_url":"https://api.github.com/repos/apache/apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/apache/apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/apache/apex-malhar/tags","blobs_url":"https://api.github.com/repos/apache/apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/apex-malhar/languages","stargazers_url":"https://api.github.com/repos/apache/apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/apache/apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/apache/apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/apache/apex-malhar/subscription","commits_url":"https://api.github.com/repos/apache/apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/apache/apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/apex-malhar/merges","archive_url":"https://api.github.com/repos/apache/apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/apex-malhar/downloads","issues_url":"https://api.github.com/repos/apache/apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/apache/apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/apache/apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/apache/apex-malhar/deployments","created_at":"2015-08-25T07:00:05Z","updated_at":"2016-11-01T10:48:51Z","pushed_at":"2016-11-03T22:41:15Z","git_url":"git://github.com/apache/apex-malhar.git","ssh_url":"git@github.com:apache/apex-malhar.git","clone_url":"https://github.com/apache/apex-malhar.git","svn_url":"https://github.com/apache/apex-malhar","homepage":"","size":99380,"stargazers_count":66,"watchers_count":66,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":104,"mirror_url":"git://git.apache.org/incubator-apex-malhar.git","open_issues_count":32,"forks":104,"open_issues":32,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/406"},"html":{"href":"https://github.com/apache/apex-malhar/pull/406"},"issue":{"href":"https://api.github.com/repos/apache/apex-malhar/issues/406"},"comments":{"href":"https://api.github.com/repos/apache/apex-malhar/issues/406/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/406/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/406/commits"},"statuses":{"href":"https://api.github.com/repos/apache/apex-malhar/statuses/31230db47451beba3acf55f6c85ca22449612689"}}}}
{"actor":{"display_login":"shubham-pathak22"}}