Using the Jupyter Client

To start the Jupyter notebook:

jupyter notebook

To activate the RAW magic in a given notebook, type the following in a cell:

[1]: %load_ext raw_magic

List of Jupyter Magics

Queries

query

Executes a query, displays the result as a table.

Type: line and cell magic

Syntax:

%query <single line expression>

or

%%query
<multi line expression>

Examples:

%query select * from ["hello", "world"]
%%query
select * from [(a:1, b:[(c:"hello1", d: "world"),
                        (c:"hello2", d: "world")])]

query_validate

Validates a query.

Type: line and cell magic

Syntax:

%query_validate <single line expression>

or

%%query_validate
<multi line expression>

Examples:

%query_validate select * from ["hello", "world"]
%%query_validate
select * from [(a:1, b:[(c:"hello1", d: "world"),
                        (c:"hello2", d: "world")])]

Views

view

Creates a view.

Type: line and cell magic

Syntax:

%view <view name>, <single line expression>

or

%%view <view name>
<multi line expression>

Examples:

%view hello, select * from ["hello", "world"]
%%view hello2
select * from [(a:1, b:[(c:"hello1", d: "world"),
                        (c:"hello2", d: "world")])]

views_drop

Deletes a view.

Type: line magic

Syntax:

%views_drop <view name>

Example:

%views_drop hello

views_list

List all views.

Type: line magic

Syntax:

%views_list

views_show

Shows information about a view.

Type: line magic

Syntax:

%views_show <view name>

Example:

%view_show hello

materialized_view

Creates a materialized view.

Type: line and cell magic

Syntax:

%materialized_view <view name>, <single line expression>

or

%%materialized_view <view name>
<multi line expression>

materialized_views_drop

Deletes a materialized view.

Type: line magic

Syntax:

%materialized_view_drop <view name>

materialized_views_list

List all materialized views.

Type: line magic

Syntax:

%materialized_views_list

materialized_views_show

Shows information about a materialized view.

Type: line magic

Syntax:

%materialized_views_show <view name>

Example:

%materialized_view_show hello

Packages

package

Creates a package.

Type: line and cell magic

Syntax:

%package <package name>, <single line expression>

or

%%package <package name>
<multi line expression>

Examples:

%package hello, foo(a: int) := a +1;
%%package hello
foo(a: int) := a +1;
bar (a: int, b: double) := {
    a + b
};

data := select * from [(a:1, b:[(c:"hello1", d: "world"),
                        (c:"hello2", d: "world")])];

packages_drop

Deletes a package.

Type: line magic

Syntax:

%packages_drop <package name>

Example:

%package_delete hello

packages_list

List all packages.

Type: line magic

Syntax:

%packages_list

packages_show

Shows information about a package.

Type: line magic

Syntax:

%package_show <package name>

Example:

%package_show hello

Tables

table

Creates a table.

Type: cell magic

Syntax:

%%table <name>
type: <type>
[location: <location>]
[indexes: <indexes>]

Examples:

%%table test_tbl1
type: 'collection(record(a: int, b: string))'
%%table test_tbl2
type: 'collection(record(a: int, b: string))'
location: s3://raw-tutorial/ipython-demos/predictive-maintenance/maint.parquet
indexes:
    - a
    - a,b

tables_list

List all tables.

Type: line magic

Syntax:

%tables_list

tables_drop

drops a tables.

Type: line magic

Syntax:

%tables_drop <name>

tables_show

Shows information about a table.

Type: line magic

Syntax:

%tables_show <name>

tables_list_indexes

Lists indexes of a table

Type: line magic

Syntax:

%table_list_indexes <name>

tables_create_index

Create an index on a table

Type: cell magic

Syntax:

%table_create_index <name>
<index>

Example:

%table_create_index table1
field1, field2

tables_drop_index

drops one index of a table

Type: cell magic

Syntax:

%table_drop_index <name>
<index>

Example:

%table_drop_index table1
field1, field2

Buckets

buckets_list

List registered S3 buckets.

Type: line magic

Syntax:

%bucket_list

buckets_show

Shows information about a registered S3 bucket, displays the result as a json string.

Type: line magic

Syntax:

%buckets_show <bucket name>

Example:

%bucket_show some-bucket

buckets_register

Registers a S3 bucket.

Type: line magic

Syntax:

%bucket_register <bucket name> [<region> [<access_key> <secret_key>]]

Example:

%bucket_register public-bucket eu-west-1
%bucket_register private-bucket eu-west-1 my_access_key my_secret_key

buckets_unregister

Unregisters a S3 bucket.

Type: line magic

Syntax:

%buckets_unregister <bucket name>

Example:

%buckets_unregister some-bucket

Relational Databases Servers

rdbms_list

List registered RDBMS servers.

Type: line magic

Syntax:

%rdbms_list

rdbms_show

Shows information about a registered RDBMS server.

Type: line magic

Syntax:

%rdbms_show <server name>

Example:

%rdbms_show some-database-server

rdbms_register

Registers a RDBMS server.

Type: line magic

Syntax:

%rdbms_register <name> <vendor> <host> <database> [<port> [<user_name> <password>]]

Example:

%rdbms_register my_server postgres www.server.com 5432 my_user my_password

rdbms_unregister

Unregisters an RDBMS server.

Type: line magic

Syntax:

%rdbms_unregister <name>

Example:

%rdbms_unregister my_server

HTTP Credentials

http_auth_list

List registered HTTP credentials.

Type: line magic

Syntax:

%http_auth_list

http_auth_show

Shows information about a registered HTTP auth credentials.

Type: line magic

Syntax:

%http_auth_show <http url>

Example:

%http_auth_show https://www.somewhere.com

Status Information

health

Shows health information about the raw-server.

Type: line magic

Syntax:

%health

creds_health

Shows health information about the credentials-server.

Type: line magic

Syntax:

%creds_health

raw_version

Shows the version of the raw server.

Syntax:

%raw_version