Giter Club home page Giter Club logo

ipython-iris-magic's Introduction

ipython-iris-magic

%%iris magic for IPython, can run ObjectScript command in Notebooks.

It can be run in any Notebook and does not require any special setup on IRIS or the Notebook.

Demo

image

As you can see, the first line load the magic, the second line connect to the server, the third line run the ObjectScript command.

All of this demo is in the example/Notebooks/Demo-Iris-Magic.ipynb

To run the demo run the following command in the root of the project:

docker-compose up

Then go to this url: http://127.0.0.1:8888/notebooks/Demo-Iris-Magic.ipynb

Load the magic

%load_ext iris_magic

Connect to the server

%%iris iris://superuser:SYS@localhost:1972/USER

Run the ObjectScript command

%%iris
Set x = 1
Write x

Installation

In order to use this magic, you need to install the ipython-iris-magic package.

pip install ipython-iris-magic

All the dependencies will be installed automatically.

Usage

%load_ext iris_magic
%%iris iris://superuser:SYS@localhost:1972/USER 
set test = "toto"
zw test

Output:

test="toto"

You can also use the magic to run SQL query.

Load the magic

%load_ext sql

/!\ You need to install the sql extension first.

The sql extension is not part of the standard IPython installation. You can install it with the following command:

pip install ipython-sql

Connect to the server

%sql iris://superuser:SYS@localhost:1972/USER

Run the SQL query

%sql SELECT 1

ipython-iris-magic's People

Contributors

grongierisc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.