Skip to main content

Airflow package provider to perform action into Qlik Sense On-Promise (reload apps, tasks ...).

Project description

qlik

Airflow: Qlik Sense Client Managed Provider

Qlik Sense Client Managed Provider to reload application, tasks from Airflow.


This repository provides basic qlik sense client managed hooks and operators to trigger reloads of applications, tasks available in a Qlik Sense Client Managed Site.

Requirements

The package has been tested with Python 3.9.

Package Version
apache-airflow >=2.10

News

Be careful

  • Airflow QlikSense Client Managed 0.0.3 is compatible with Airflow Version 3.0
  • Airflow QlikSense Client Managed 0.0.2 is still compatible with Airflow Version below 3.0

How to install it ?

By using Pypi,

pip install airflow-provider-qlik-sense-client-managed

In Local,

To install it, download and unzip source and launch the following pip install command:

pip install .

You can also use

python setup.py install

How to use it ?


On this provider, you can use three way to let Airflow connecting to your Qlik Sense Client Managed Site.

• NTLM Authentification: Authentification with a username and password used in Qlik in everyday life. Warning: Airflow will have the same rights of the user you provide.

• JWT Authentification: Authentification with a jwt token that you provide to Airflow. Warning: A JWT virtual proxy will have to be create on your Qlik Sense Site. To do this you can following the step of the section Appendix: How to create a JWT Virtual Proxy in Qlik or this article from Qlik Community: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-How-to-set-up-JWT-authentication/ta-p/1716226

• Certificates Authentification: Authentification with Certificates. Warning: In this case, you'll have to take client certificate generated by your Qlik Sense site during installation. The port 4242 MUST be open on your Qlik Sense Site from Airflow Server. With this type of authentifcation, Airflow will use sa_api user to trigger tasks, or application reloading.

1. NTLM Authentification Example


Prerequisites:

• A login account with password • URL of your Qlik Sense Site (with the virtual proxy using NTLM auth)

Step 1: Login in your Airflow Server.

Step 2: Go into Admin > Connections > Add A New Record.

Step 3: Select [NTLM] Qlik Sense Client Managed.

Step 4 Provide following informations:

       • Connection Id of your choise
       • Qlik Sense Url using the NTLM Virtual Proxy
       • Qlik Username (DOMAIN\USERNAME)
       • Qlik Password

Step 5 Save and your connection to Qlik Client Managed using NTLM auth is ready to use !

2. JWT Authentification Example


Prerequisites:

• A JWT token of the user that you want to trigger action with • URL of your Qlik Sense Site (with the virtual proxy using JWT auth). If you don't have any JWT virtual proxy on your Qlik Sense Site, please follow: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-How-to-set-up-JWT-authentication/ta-p/1716226

Step 1: Login in your Airflow Server.

Step 2: Go into Admin > Connections > Add A New Record.

Step 3: Select [JWT] Qlik Sense Client Managed.

Step 4 Provide following informations:

       • Connection Id of your choise
       • Qlik Sense Url using the JWT Virtual Proxy
       • Qlik JWT Token

Step 5 Save and your connection to Qlik Client Managed using NTLM auth is ready to use !

3. Certificate Authentifcation Example


Builing the section. No available yet.

4. Example: Creating a DAG with Qlik Sense Operator to reload App

You can now use the operators in your dags to trigger a reload of an app in Qlik Sense from Airflow

Example:

from airflow.providers.qlik_sense.operators.reload_app_operator import QlikSenseReloadAppOperator
from airflow import DAG

import pendulum

from datetime import date
from datetime import timedelta

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'email': ['airflow@example.com'],
    'email_on_failure': False,
    'email_on_retry': False,
    'schedule_interval':'@daily',
    'retries': 1,
    'retry_delay': timedelta(minutes=5)
}

idApp="" #Fill the id of your application you want to reload
connId="" #Fill the connection id you gave when creating the connection in airflow

with DAG(
    'QlikSenseReloadAppExample',
    default_args=default_args,
    description='A simple tutorial DAG reloading Qlik Sense App',
    start_date=pendulum.datetime(2021, 1, 1, 10, 40, 0, tz="Europe/Paris"),
    tags=['Qlik', 'Example'],
) as dag:

    op = QlikSenseReloadAppOperator(app_id=idApp, conn_id=connId, task_id="QlikReloadTask")

    op

6. (Appendix) Configuration of JWT Virtual Proxy

Building Section not available yet

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file airflow_provider_qlik_sense_client_managed-0.0.4.tar.gz.

File metadata

File hashes

Hashes for airflow_provider_qlik_sense_client_managed-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bc673bff1d122921fbaefffce959920ea7d0f92ea68c691b12d8389ab43276ff
MD5 f17a866208f242b2bbd27d8c79885ce3
BLAKE2b-256 f36c40837b6e0deabd6e83e377f61034d7b43059aa0612cd65037fb43f8b4c53

See more details on using hashes here.

File details

Details for the file airflow_provider_qlik_sense_client_managed-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_provider_qlik_sense_client_managed-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76691f3d0ff9297e016e3027039d4289d2337c4c077b54bff82a7927471dd1cc
MD5 f7c36baee30d94d18860e9b20a94a351
BLAKE2b-256 0cd1341084bb3238be9da40806351dea9afba9e00a6efabc93be2999505a8cec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page