Home Applications csvgen-python

csvgen-python

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
5
1 reviews
0
Awards
208
Views
15
IPM installs
2
0
Details
Releases (3)
Reviews (1)
Issues
Articles (1)
Embedded python app creates table and loads data from CSV

What's new in this version

Add a proxy option for importing from URL

csvgen in embedded python

import csv in Intersystems IRIS using embedded python
The analog of csvgen but written in embedded python.

It uses Community IRIS SQLAlchemy to make everything work.

Installation ZPM

USER>zpm "install csvgenpy"

API

w ##class(shvarov.csvgenpy.csv).Generate(filename_or_url, dest_table_name, [schema_name], [server=embedded_python_by_default], [append=0])

Parameters in brackets are optional.

Examples

Import from file

USER>do ##class(shvarov.csvgenpy.csv).Generate("/home/irisowner/dev/data/countries.csv","countries")

Import from URL

USER>do ##class(shvarov.csvgenpy.csv).Generate("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv","titanic","data")

Call directly from python:

$ irispython /home/irisowner/dev/app/csvgen.py

or

import csvgen
generate('file.csv','dest_table_name','schema_name')

Run tests

USER>zpm “test csvgenpy”

Collaboration

The repository is ready for collaboration using Docker

Docker installation

Clone/git pull the repo into any local directory

$ git clone https://github.com/intersystems-community/iris-embedded-python-template.git

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d
Made with
Install
zpm install csvgenpy download archive
Version
1.1.216 May, 2023
ObjectScript quality test
Category
Developer Environment
Works with
InterSystems IRISInterSystems IRIS for Health
First published
14 May, 2023
Last edited
16 May, 2023
Last checked by moderator
26 Nov, 2024Works