{"id":4961,"date":"2022-05-21T15:27:38","date_gmt":"2022-05-21T13:27:38","guid":{"rendered":"https:\/\/smartdatamodels.org\/?page_id=4961"},"modified":"2022-11-22T16:32:16","modified_gmt":"2022-11-22T15:32:16","slug":"create-data-model-from-csv-payload","status":"publish","type":"page","link":"https:\/\/smartdatamodels.org\/index.php\/create-data-model-from-csv-payload\/","title":{"rendered":"Create data model from csv payload"},"content":{"rendered":"\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f4960-o1\" lang=\"en-US\" dir=\"ltr\" data-wpcf7-id=\"4960\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/index.php\/wp-json\/wp\/v2\/pages\/4961#wpcf7-f4960-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" novalidate=\"novalidate\" data-status=\"init\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"4960\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.1.5\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f4960-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/><input type=\"hidden\" name=\"_wpcf7cf_hidden_group_fields\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_hidden_groups\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_visible_groups\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_repeaters\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_steps\" value=\"{}\" \/><input type=\"hidden\" name=\"_wpcf7cf_options\" value=\"{&quot;form_id&quot;:4960,&quot;conditions&quot;:[],&quot;settings&quot;:{&quot;animation&quot;:&quot;yes&quot;,&quot;animation_intime&quot;:&quot;200&quot;,&quot;animation_outtime&quot;:&quot;200&quot;,&quot;conditions_ui&quot;:&quot;normal&quot;,&quot;notice_dismissed&quot;:&quot;true&quot;,&quot;notice_dismissed_rollback-cf7-5.9.4&quot;:true,&quot;notice_dismissed_rollback-cf7-5.9.5&quot;:true,&quot;notice_dismissed_rollback-cf7-6.1.4&quot;:true}}\" \/><input type=\"hidden\" name=\"redirect_nonce\" value=\"95563195da\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_name\" value=\"document-pdf\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_reference\" value=\"9de1b3fc\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_date\" value=\"04282026\" \/><input type=\"hidden\" name=\"_wpcf7_recaptcha_response\" value=\"\" \/>\n<\/fieldset>\n<p><label> Name of the entity\/class<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"entity\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"EntityName\" value=\"\" type=\"text\" name=\"entity\" \/><\/span> <\/label>\n<\/p>\n<p><label> header (name of the fields separated with comma)<br \/>\nid,type,field1,field2<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"header\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text\" aria-invalid=\"false\" placeholder=\"id, type, field1, field2\" value=\"\" type=\"text\" name=\"header\" \/><\/span> <\/label>\n<\/p>\n<p><label> payload (csv values separated with comma)<br \/>\nurn:ngsi-ld:entityName:001, entityName, value1, value2<br \/>\nonly the first line<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"payload\"><textarea cols=\"40\" rows=\"10\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-textarea\" aria-invalid=\"false\" placeholder=\"urn:ngsi-ld:entityName:001, entityName, value1, value2 only the first line\" name=\"payload\"><\/textarea><\/span> <\/label>\n<\/p>\n<p><label> Your email<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"email\"><input size=\"40\" maxlength=\"200\" class=\"wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"yourmail@yourdomain.com\" value=\"\" type=\"email\" name=\"email\" \/><\/span> <\/label>\n<\/p>\n<p><input class=\"wpcf7-form-control wpcf7-submit has-spinner\" type=\"submit\" value=\"Submit\" \/>\n<\/p><p style=\"display: none !important;\" class=\"akismet-fields-container\" data-prefix=\"_wpcf7_ak_\"><label>&#916;<textarea name=\"_wpcf7_ak_hp_textarea\" cols=\"45\" rows=\"8\" maxlength=\"100\"><\/textarea><\/label><input type=\"hidden\" id=\"ak_js_1\" name=\"_wpcf7_ak_js\" value=\"65\"\/><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\ndocument.getElementById( \"ak_js_1\" ).setAttribute( \"value\", ( new Date() ).getTime() );\n\/* ]]> *\/\n<\/script>\n<\/p><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n\n<p><a href=\"https:\/\/github.com\/smart-data-models\/data-models\/blob\/master\/utils\/create_jsonschema_from_csv.py\">source code<\/a> of this service if you want to improve it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>source code of this service if you want to improve it. <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/create-data-model-from-csv-payload\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-4961","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4963,"url":"https:\/\/smartdatamodels.org\/index.php\/template-of-a-csv-payload-for-creating-a-data-model\/","url_meta":{"origin":4961,"position":0},"title":"Template of a csv payload for creating a data model","author":"maestro","date":"21\/05\/2022","format":false,"excerpt":"\"field1\", \"field2\",\"field3\",\"field4\",\"field5\",\"field6\",\"field7\",\"field8\",\"field9\" \"description of the field1\", \"description of the field2\",\"description of the field3\",\"description of the field4\",\"description of the field5\",\"description of the field6\",\"description of the field7\",\"description of the field8\",\"description of the field9\" \"value1\", \"value2\",\"value3\",\"value4\",\"value5\",\"value6\",\"value7\",\"value8\",\"value9\"","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4017,"url":"https:\/\/smartdatamodels.org\/index.php\/create-your-json-schema-from-a-csv-payload\/","url_meta":{"origin":4961,"position":1},"title":"Create your json schema from a csv payload","author":"maestro","date":"30\/03\/2022","format":false,"excerpt":"","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":255,"url":"https:\/\/smartdatamodels.org\/index.php\/how-to-use-data-models\/","url_meta":{"origin":4961,"position":2},"title":"How to use data models","author":"maestro","date":"03\/04\/2020","format":false,"excerpt":"Simple user: Use the csv (comma separated values) like this table, a csv is available in every data model and its specification and explanation in the \/doc\/spec.md that explains the meaning of the fields id type address__addressLocality address__addressCountry atmosphericPressure dataProvider dateObserved location__coordinates precipitation pressureTendency relativeHumidity source stationCode stationName temperature windDirection\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1829,"url":"https:\/\/smartdatamodels.org\/index.php\/generate-a-ngsi-ld-payload-based-on-a-smart-data-model\/","url_meta":{"origin":4961,"position":3},"title":"Generate a NGSI-LD normalized payload based on a Smart Data Model","author":"maestro","date":"02\/03\/2021","format":false,"excerpt":"This is an alpha version (so you can expect errors and not being complete). Use it at your own risk. Please report them at info@smartdatamodels.org Call: https:\/\/smartdatamodels.org\/extra\/ngsi-ld_generator.php Parameters: (Mandatories) schemaUrl: The link to the RAW version of the json schema (see example) email: your email Example: https:\/\/smartdatamodels.org\/extra\/ngsi-ld_generator.php?schemaUrl=https:\/\/raw.githubusercontent.com\/smart-data-models\/dataModel.Streetlighting\/f56f5a7933ab05d7fce1d5adc0847f25a099cdb4\/StreetlightModel\/schema.json&email=alberto.abella@fiware.org Use any data\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2199,"url":"https:\/\/smartdatamodels.org\/index.php\/generate-a-ngsi-ld-keyvalues-payload-compliant-with-a-data-model\/","url_meta":{"origin":4961,"position":4},"title":"Generate a NGSI-LD keyvalues payload compliant with a data model","author":"maestro","date":"28\/04\/2021","format":false,"excerpt":"This is an alpha version (so you can expect errors and not being complete). Use it at your own risk. Please report them at info@smartdatamodels.org Call: https:\/\/smartdatamodels.org\/extra\/ngsi-ld_generator_keyvalues_v0.95.php Parameters: (Mandatories) schemaUrl: The link to the RAW version of the json schema (see example) email: your email Example: https:\/\/smartdatamodels.org\/extra\/ngsi-ld_generator_keyvalues_v0.95.php?schemaUrl=https:\/\/raw.githubusercontent.com\/smart-data-models\/dataModel.Streetlighting\/f56f5a7933ab05d7fce1d5adc0847f25a099cdb4\/StreetlightModel\/schema.json&email=alberto.abella@fiware.org Use any data\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2549,"url":"https:\/\/smartdatamodels.org\/index.php\/generate-a-geojson-feature-format-payload-based-on-a-smart-data-model\/","url_meta":{"origin":4961,"position":5},"title":"Generate a Geojson feature format payload based on a Smart Data Model","author":"maestro","date":"31\/05\/2021","format":false,"excerpt":"This is a beta version (so you can expect errors and not being complete). Use it at your own risk. Please report them at info@smartdatamodels.org Call: https:\/\/smartdatamodels.org\/extra\/geojson_features_generator_v1.0.php Parameters: (Mandatories) schemaUrl: The link to the RAW version of the json schema (see example) email: your email Example: https:\/\/smartdatamodels.org\/extra\/geojson_features_generator_v1.0.php?schemaUrl=https:\/\/raw.githubusercontent.com\/smart-data-models\/dataModel.Streetlighting\/f56f5a7933ab05d7fce1d5adc0847f25a099cdb4\/StreetlightModel\/schema.json&email=alberto.abella@fiware.org Use any data\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/4961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/comments?post=4961"}],"version-history":[{"count":2,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/4961\/revisions"}],"predecessor-version":[{"id":7668,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/4961\/revisions\/7668"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=4961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}