Graal Platform Documentation

Graal Platform Documentation

  • Docs
  • Help

›Tutorials

Overview

  • What is Graal Platform?
  • Why use our platform?
  • How Graal Platform works?
  • Concepts
  • Jobs & workflows
  • Security

Quickstart

  • Quickstart

Tutorials

  • Get started with Python
  • Get started with Dask
  • Get started with XGBoost
  • Get started with Apache Spark and Maven
  • Get started with Apache PySpark
  • Get started with Apache Beam and Gradle
  • Use the API
  • Using the command line tool (graalctl)
  • Using secrets
  • Migration from Databricks
  • Get started with Tensorflow
  • Get started with Pytorch
  • Get started with Mxnet
  • Setting up the Hadoop bridge
  • Get started with Apache Flink and Maven
  • Get started with Dbt
  • Get started with Pulsar
  • Get started with Apache Spark Streaming Pulsar
  • Get started with Debezium
  • Get started with the SDK

How-to guides

  • Using Graal Platform with Azure Data Factory
  • Publishing your artefacts with Azure DevOps
  • Using Graal Platform with Apache Airflow
  • Publishing your artefacts with Jenkins
  • Spark
  • Network, VPN, gateway and firewall
  • Logs
  • Pricing

Security

  • Overview
  • Comply with requirements
  • Infrastructures under Graal Systems
  • Responsibilities

Troubleshoot & debug

  • Troubleshooting
  • Common issues
  • Debug jobs

Get started with the SDK

Python

Add the following dependency to your project:

pip install "git+ssh://git@github.com/graalsystems/sdk#subdirectory=python&egg=graalsystems"

Example:

from oauthlib.oauth2 import LegacyApplicationClient
from requests_oauthlib import OAuth2Session

import graalsystems
from graalsystems.api import project_api, tenant_api

tenant = "YOUR TENANT"
username = "YOUR USERNAME"
password = "YOUR PASSWORD"
api_url = "https://api.graal.systems/api/v1"
auth_url = "https://identity.graal.systems/auth"

#--- Get tenant info and realm, then prepare token
configuration = graalsystems.Configuration(
    host = api_url,
    discard_unknown_keys = True
)
with graalsystems.ApiClient(configuration) as api_client:
    tenant_client = tenant_api.TenantApi(api_client)

    try:
        tenant_info = tenant_client.find_realm_by_tenant_id(tenant)
        auth_url += "/realms/" + tenant_info.realm + "/protocol/openid-connect/token"
    except graalsystems.ApiException as e:
        print("Can not get tenant: %s\n" % e)
        raise e
oauth = OAuth2Session(client=LegacyApplicationClient(client_id="graal-ui"))
token = oauth.fetch_token(token_url=auth_url, username=username,
                          password=password, include_client_id=True)
configuration.access_token = token['access_token']
#---

with graalsystems.ApiClient(configuration) as api_client:
    project_client = project_api.ProjectApi(api_client)

    try:
        # Execute an action
        projects = project_client.find_projects(tenant)
        for p in projects:
            print("- " + p.name)
    except graalsystems.ApiException as e:
        print("Can not list projects: %s\n" % e)
← Get started with DebeziumUsing Graal Platform with Azure Data Factory →
Graal Platform Documentation
Overview
What is Graal Platform?
Quickstart
Apache SparkApache FlinkApache BeamPythonTensorflowDaskDistributed XGBoost
Links
HomeConsoleCopyrights
Copyright © 2023 Graal Systems