{"id":18968909,"url":"https://github.com/isc-rsingh/iris-load-data-api","last_synced_at":"2026-01-05T15:47:06.330Z","repository":{"id":177025343,"uuid":"656342917","full_name":"isc-rsingh/iris-load-data-api","owner":"isc-rsingh","description":"REST API for loading data into InterSystems IRIS","archived":false,"fork":false,"pushed_at":"2024-05-24T21:02:52.000Z","size":250,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T14:12:14.866Z","etag":null,"topics":["intersystems-iris"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isc-rsingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-20T18:52:15.000Z","updated_at":"2024-05-24T21:02:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5bf5e0a-6215-4b98-b209-a03b46397ffd","html_url":"https://github.com/isc-rsingh/iris-load-data-api","commit_stats":null,"previous_names":["isc-rsingh/iris-load-data-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isc-rsingh%2Firis-load-data-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isc-rsingh%2Firis-load-data-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isc-rsingh%2Firis-load-data-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isc-rsingh%2Firis-load-data-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isc-rsingh","download_url":"https://codeload.github.com/isc-rsingh/iris-load-data-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245489763,"owners_count":20623789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intersystems-iris"],"created_at":"2024-11-08T14:48:48.898Z","updated_at":"2026-01-05T15:47:06.300Z","avatar_url":"https://github.com/isc-rsingh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IRIS Data Loading app and REST API\n\nThis application facilitates CSV file input into IRIS and IRIS for Health, providing a front-end client to the LOAD DATA SQL command. Takes as input a CSV file, infers data types, and allows the user to edit column names and data types.\n\nThe repository includes an Angular application and a data loading REST API that uses \u003ca href=\"https://github.com/bdeboe/isc-sql-utils\"\u003eIRIS SQL Utilities\u003c/a\u003e for introspecting CSV files.\n\n\u003e **Warning**\n\u003e This only works for CSV files on the same file system as IRIS itself. Uploading the CSV file to a remote server is a desired future feature.\n\n## Application Installation\n\n- Edit `src/environments/environments.ts` to match your install of the \u003ca href=\"https://github.com/isc-rsingh/iris-load-data-api\"\u003edata loading REST API\u003c/a\u003e\n- Execute `ng build` (if needed, \u003ca href=\"https://angular.io/guide/setup-local\"\u003eset up Angular\u003c/a\u003e)\n- If installing in IRIS...\n  - look at `index.html` in the dist/proto folder and make sure base reads as follows:\n  ```\n  \u003cbase href=\"/csp/dataloadapp/\"\u003e\n  ```\n  - in an IRIS session, run `zpm load \u003cpath to this directory\u003e`, or set up a CSP application in IRIS and copy all files in the `dist/proto` directory to that location.\n- If installing in an external web server...\n  - copy all files in the `dist/proto` directory to the web server\n\n## REST endpoints\n\n### POST /columns\n\nReturns a list of column names with data types using  https://github.com/bdeboe/isc-sql-utils to infer the schema.\n\nExample body:\n```json\n{\n    \"from\": {\n        \"file\": {\n            \"path\": \"/Users/rsingh/Downloads/iris.csv\",\n            \"columnseparator\": \"\\t\"\n        }\n    },\n    \"verbose\": 1,\n    \"readlines\": 0\n}\n```\n\n### POST /createtable\n    \nTakes the \u003ccode\u003efields\u003c/code\u003e object of a JSON configuration file into an InterSystems IRIS \u003ccode\u003eCREATE TABLE\u003c/code\u003e statement and executes it.\n\nExample body:\n```json\n{\n  \"tablename\": \"SQLUser.dataexport\",\n  \"fields\": [\n    {\n      \"srcname\": \"care_site_id\",\n      \"type\": \"BIGINT\",\n      \"length\": 0\n    },\n    {\n      \"srcname\": \"care_site_name\",\n      \"type\": \"VARCHAR\",\n      \"length\": \"1\"\n    },\n    {\n      \"srcname\": \"place_of_service_concept_id\",\n      \"type\": \"BIGINT\",\n      \"length\": 0,\n      \"destdatatype\": \"INT\"\n    },\n    {\n      \"srcname\": \"location_id\",\n      \"type\": \"VARCHAR\",\n      \"length\": \"1\"\n    },\n    {\n      \"srcname\": \"care_site_source_value\",\n      \"type\": \"VARCHAR\",\n      \"length\": \"11\"\n    },\n    {\n      \"srcname\": \"place_of_service_source_value\",\n      \"type\": \"VARCHAR\",\n      \"length\": \"48\"\n    }\n  ]\n}\n```\n\n### POST /load\n\nMunges a JSON configuration file into an InterSystems IRIS \n\u003ccode\u003e\u003ca href=\"https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_loaddata\"\u003eLOAD DATA\u003c/a\u003e\u003c/code\u003e statement and executes it.\n\nExample body:\n```json\n{\n  \"from\": {\n    \"file\": {\n      \"header\": true,\n      \"skip\": 0,\n      \"columnseparator\": \",\"\n    },\n    \"filepath\": \"/Users/rsingh/Downloads/dataexport.csv\"\n  },\n  \"tablename\": \"SQLUser.dataexport\",\n  \"verbose\": 0,\n  \"charset\": \"UTF-8\",\n  \"fields\": [\n    {\n      \"srcname\": \"care_site_id\",\n      \"type\": \"BIGINT\",\n      \"length\": 10,\n      \"destname\": \"caresiteid\",\n      \"destdatatype\": \"INT\"\n    }\n  ]\n}\n```\n## Docker\n### Prerequisites\nMake sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed.\n### Installation\nClone/git pull the repo into any local directory\n```\n$ git clone https://github.com/rcemper/DK_iris-load-data-api.git\n```\nTo build and start the container run:\n```\n$ docker compose up -d --build \u0026\u0026 docker compose logs -f\n```\nTo open IRIS Terminal do:\n```\n$ docker-compose exec iris iris session iris\nUSER\u003e\n```\nor using **WebTerminal**\n```\nhttp://localhost:42773/terminal/\n```\nTo access IRIS System Management Portal\n```\nhttp://localhost:42773/csp/sys/UtilHome.csp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisc-rsingh%2Firis-load-data-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisc-rsingh%2Firis-load-data-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisc-rsingh%2Firis-load-data-api/lists"}