# Tutorials

### Overview

Zeblok Datalake is a high-performance data-store, compatible with the S3 protocol, intended for secure high speed data transfer. As an object store, Zeblok Datalake allows users to read and write large amounts of unstructured data such as photos, videos, log files, spreadsheets, CSV files, etc. Datalake is cloud native and supports GPU-optimized queries through the addition of BlazingDB.

With a robust and simple online interface, API CRUD access, in-built Zeblok CLI magic commands, and Python integrations, users can instantly run complex AI related queries for a variety of datasets, visualize the results, and share/revoke reports with clients.

### Zeblok CLI

#### Get the Latest Version Zeblok CLI using Below Command

{% tabs %}
{% tab title="Code" %}

```
npm i -g  zbl-cli
```

{% endtab %}

{% tab title="Output" %}

```
ERROR! Session/line number was not unique in database. History logging moved to new session 6
/opt/conda/bin/zeblok -> /opt/conda/lib/node_modules/zbl-cli/index.jserial remove 10yan/.npm/_lock
+ zbl-cli@1.1.9
updated 1 package in 4.359s
```

{% endtab %}
{% endtabs %}

**Configure the Zeblok CLI**

![Figure: CLI Configure](https://1436101617-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MecgpHyRD3Y801omxL9%2F-MkalQi9QJZZK0RYN2SQ%2F-Mkanv76DhZhBkwk_srU%2Fimage.png?alt=media\&token=84bb43b8-fc52-4fb6-b65b-c2afbe555f1d)

#### Set DatalakeUrl

```
zeblok setUrl http://18.189.16.253:9000
```

#### Login using Zeblok CLI

To login using Zeblok CLI open terminal from Jupyterlab environment and type the below command.

{% hint style="info" %}
**Note:**

SecretKey and Username are avaialable on Zeblok Computational Dashboard "Manage your Zeblok Accounts" Page
{% endhint %}

{% tabs %}
{% tab title="Code" %}

```
zeblok login <username> <secret key>
```

{% endtab %}

{% tab title="Output" %}

```
  _____         _       _           _        ____            _             _           _           
 |__  /   ___  | |__   | |   ___   | | __   |  _ \    __ _  | |_    __ _  | |   __ _  | | __   ___ 
   / /   / _ \ | '_ \  | |  / _ \  | |/ /   | | | |  / _` | | __|  / _` | | |  / _` | | |/ /  / _ \
  / /_  |  __/ | |_) | | | | (_) | |   <    | |_| | | (_| | | |_  | (_| | | | | (_| | |   <  |  __/
 /____|  \___| |_.__/  |_|  \___/  |_|\_\   |____/   \__,_|  \__|  \__,_| |_|  \__,_| |_|\_\  \___|
                                                                                                   


Added `zb` successfully.
```

{% endtab %}
{% endtabs %}

#### List all the Files and Directory on Datalake

{% tabs %}
{% tab title="Code" %}

```
zbl tree -f zb/datalake/<username>/
```

{% endtab %}

{% tab title="Output" %}

```
zb/datalake/akash/
├─ FL_insurance_sample.csv
├─ ZeblokReadme.ipynb
├─ algebra.log
├─ main.go
├─ sales.csv
├─ sample_taxi.csv
└─ docs
   ├─ MAINTAINERS.md
   ├─ minio-admin-complete-guide.md
   ├─ minio-client-complete-guide.md
   ├─ minio-client-configuration-files.md
   └─ zh_CN
      ├─ CONTRIBUTING.md
      ├─ minio-client-complete-guide.md
      └─ minio-client-configuration-files.md
```

{% endtab %}
{% endtabs %}

#### Copy file from DataLake to local Notebook Directory

```
zbl cp zb/datalake/<username>/<filepathOnDatalake> <filepathOnNotebookStorage>
```

Example is given below:

{% tabs %}
{% tab title="Code" %}

```
zbl cp zb/datalake/akash/main.go main.go
```

{% endtab %}

{% tab title="Output" %}

```
...h/main.go:  979 B / 979 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 29.49 KiB/s 0s
```

{% endtab %}
{% endtabs %}

#### Copy file from Local Notebook Directory to Datalake

```
zbl cp <localfilePath> zb/datalake/<username>/<datalakeFilePath>
```

Example:

{% tabs %}
{% tab title="Code" %}

```
zbl cp ZeblokReadme.ipynb zb/datalake/akash/
```

{% endtab %}

{% tab title="Output" %}

```
...dme.ipynb:  54.33 KiB / 54.33 KiB ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 1.29 MiB/s 0s
```

{% endtab %}
{% endtabs %}
