\n","children":[{"type":"text","text":""}]},{"type":"p","children":[{"type":"text","text":"We are continuously working on improving and enhancing our data loading functionalities. Over the last weeks, several new features have been released."}]},{"type":"h2","children":[{"type":"text","text":"Loading JSON Data within Rel"}],"id":"loading-json-data-within-rel"},{"type":"p","children":[{"type":"text","text":"Most notably, JSON data can now be loaded into your database within Rel as easy as"}]},{"type":"code_block","lang":"rel","value":"def config[:path] = \"my_data.json\"\ndef json = load_json[config]","children":[{"type":"text","text":""}]},{"type":"p","children":[{"type":"text","text":"and without the need of using an SDK. For more details, please check out our "},{"type":"a","url":"https://docs.relational.ai/rel/how-to/json-import-export","title":null,"children":[{"type":"text","text":"JSON Import and Export"}]},{"type":"text","text":" tutorial."}]},{"type":"h2","children":[{"type":"text","text":"Special Characters in CSV Columns Names"}],"id":"special-characters-in-csv-columns-names"},{"type":"p","children":[{"type":"text","text":"We are happy to announce that we support now spaces and many other non-alphanumeric characters in CSV column names. For instance, the file"}]},{"type":"code_block","lang":"rel","value":"abbrev.,state name\nAL,Alabama\nWY,Wyoming","children":[{"type":"text","text":""}]},{"type":"p","children":[{"type":"text","text":"loads now into Rel as any other CSV file."}]},{"type":"code_block","lang":"rel","value":"def mydata = load_csv[\"/path/to/my/data.csv\"]\ndef output = mydata\n(DelveTypes.FilePos(19), :abbrev., \"AL\")\n(DelveTypes.FilePos(30), :abbrev., \"WY\")\n(DelveTypes.FilePos(19), :state name, \"Alabama\")\n(DelveTypes.FilePos(30), :state name, \"Wyoming\")","children":[{"type":"text","text":""}]},{"type":"p","children":[{"type":"text","text":"To access your CSV column in Rel, use the new stdlib functionality "},{"type":"text","text":"relname_string","code":true},{"type":"text","text":"."}]},{"type":"code_block","lang":"rel","value":"def output = mydata[_, (col: relname_string(col, \"state name\"))]\n\"Alabama\"\n\"Wyoming\"","children":[{"type":"text","text":""}]},{"type":"h2","children":[{"type":"text","text":"Index CSV data by Row Number"}],"id":"index-csv-data-by-row-number"},{"type":"p","children":[{"type":"text","text":"You can now easily index your CSV data with the row number by applying "},{"type":"text","text":"lined_csv","code":true},{"type":"text","text":" on your loaded CSV data."}]},{"type":"code_block","lang":"rel","value":"def mydata = lined_csv[load_csv[\"/path/to/my/data.csv\"]]\ndef output = mydata\n(1, :abbrev., \"AL\")\n(2, :abbrev., \"WY\")\n(1, :state name, \"Alabama\")\n(2, :state name, \"Wyoming\")","children":[{"type":"text","text":""}]},{"type":"p","children":[{"type":"text","text":"This replaces the standard "},{"type":"text","text":"FilePos","code":true},{"type":"text","text":" data type with and the data row number of the CSV file."}]}],"_content_source":{"queryId":"src/content/resources/several-enhancements-around-loading-csv-and-json-data.mdx","path":["resource","body"]}},"_content_source":{"queryId":"src/content/resources/several-enhancements-around-loading-csv-and-json-data.mdx","path":["resource"]}}},"errors":null,"query":"\n query resource($relativePath: String!) {\n resource(relativePath: $relativePath) {\n ... on Document {\n _sys {\n filename\n basename\n breadcrumbs\n path\n relativePath\n extension\n }\n id\n }\n ...ResourceParts\n }\n}\n \n fragment ResourceParts on Resource {\n __typename\n title\n description\n date\n image\n categories\n authors {\n __typename\n name\n link\n }\n seo {\n __typename\n keywords\n description\n image\n image_alt\n canonical_url\n author\n published\n modified\n language\n robots\n site_name\n content_type\n }\n body\n}\n ","variables":{"relativePath":"several-enhancements-around-loading-csv-and-json-data.mdx"}},"src/content/meta/meta.md":{"data":{"meta":{"_sys":{"filename":"meta","basename":"meta.md","breadcrumbs":["meta"],"path":"src/content/meta/meta.md","relativePath":"meta.md","extension":".md"},"id":"src/content/meta/meta.md","__typename":"Meta","banner":{"__typename":"MetaBanner","enabled":true,"content":{"type":"root","children":[{"type":"p","children":[{"type":"text","text":"Check out "},{"type":"a","url":"/resources/highlights-of-relationalai-at-snowflake-data-cloud-summit-2024","title":"SF summit highlights","children":[{"type":"text","text":"highlights"}]},{"type":"text","text":" of RelationalAI at "},{"type":"text","text":"Snowflake's Data Cloud Summit 2024!","bold":true}]}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","banner","content"]}},"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","banner"]}},"header":{"__typename":"MetaHeader","links":[{"__typename":"MetaHeaderLinks","text":"Product","url":"/product","style":"default","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header","links",0]}},{"__typename":"MetaHeaderLinks","text":"Company","url":"/company","style":"default","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header","links",1]}},{"__typename":"MetaHeaderLinks","text":"Docs","url":"/docs/getting_started","style":"default","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header","links",2]}},{"__typename":"MetaHeaderLinks","text":"Resources","url":"/resources/all/1","style":"default","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header","links",3]}},{"__typename":"MetaHeaderLinks","text":"get-started","url":"/get-started","style":"cta","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header","links",4]}}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","header"]}},"footer":{"__typename":"MetaFooter","sections":[{"__typename":"MetaFooterSections","name":"Product","links":[{"__typename":"MetaFooterSectionsLinks","text":"Overview","url":"/product","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",0,"links",0]}},{"__typename":"MetaFooterSectionsLinks","text":"Use Cases","url":"/product#for-problems-that-matter","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",0,"links",1]}},{"__typename":"MetaFooterSectionsLinks","text":"Capabilities","url":"/product#a-new-toolset","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",0,"links",2]}}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",0]}},{"__typename":"MetaFooterSections","name":"Resources","links":[{"__typename":"MetaFooterSectionsLinks","text":"Documentation","url":"/docs/getting_started","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1,"links",0]}},{"__typename":"MetaFooterSectionsLinks","text":"Blog","url":"/resources/all/1","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1,"links",1]}},{"__typename":"MetaFooterSectionsLinks","text":"News","url":"/resources/news/1","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1,"links",2]}},{"__typename":"MetaFooterSectionsLinks","text":"Research","url":"/resources/research/1","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1,"links",3]}},{"__typename":"MetaFooterSectionsLinks","text":"Releases","url":"/resources/releases/1","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1,"links",4]}}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",1]}},{"__typename":"MetaFooterSections","name":"About Us","links":[{"__typename":"MetaFooterSectionsLinks","text":"Our Company","url":"/company","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2,"links",0]}},{"__typename":"MetaFooterSectionsLinks","text":"Contact Us","url":"/get-started","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2,"links",1]}},{"__typename":"MetaFooterSectionsLinks","text":"Careers","url":"/careers","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2,"links",2]}},{"__typename":"MetaFooterSectionsLinks","text":"Legal","url":"/legal","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2,"links",3]}},{"__typename":"MetaFooterSectionsLinks","text":"Security & Trust","url":"https://trust.relational.ai/","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2,"links",4]}}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","sections",2]}}],"socials":[{"__typename":"MetaFooterSocials","text":"GitHub","url":"https://github.com/RelationalAI","icon":"https://assets.tina.io/91d76337-e55d-4722-acb5-3106adb895b6/img/logos/github.png","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","socials",0]}},{"__typename":"MetaFooterSocials","text":"LinkedIn","url":"https://www.linkedin.com/company/relationalai/about","icon":"https://assets.tina.io/91d76337-e55d-4722-acb5-3106adb895b6/img/logos/linkedin.png","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","socials",1]}},{"__typename":"MetaFooterSocials","text":"Twitter","url":"https://twitter.com/relationalai","icon":"https://assets.tina.io/91d76337-e55d-4722-acb5-3106adb895b6/img/logos/twitter.png","_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer","socials",2]}}],"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta","footer"]}},"_content_source":{"queryId":"src/content/meta/meta.md","path":["meta"]}}},"errors":null,"query":"\n query meta($relativePath: String!) {\n meta(relativePath: $relativePath) {\n ... on Document {\n _sys {\n filename\n basename\n breadcrumbs\n path\n relativePath\n extension\n }\n id\n }\n ...MetaParts\n }\n}\n \n fragment MetaParts on Meta {\n __typename\n banner {\n __typename\n enabled\n content\n }\n header {\n __typename\n links {\n __typename\n text\n url\n style\n }\n }\n footer {\n __typename\n sections {\n __typename\n name\n links {\n __typename\n text\n url\n }\n }\n socials {\n __typename\n text\n url\n icon\n }\n }\n}\n ","variables":{"relativePath":"./meta.md"}}};
globalThis.tina_info = tina;
})();
Several Enhancements Around Loading CSV and JSON Data · RelationalAI
Check out highlights of RelationalAI at Snowflake's Data Cloud Summit 2024!