cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Introduction
With the Python script below and the Window Scheduler, you can automate the download of csv files based on queries of the SQL API to the elasticube. This type of process comes in handy when a user needs to download information regularly to be consumed by other processes.
The script takes takes care of the authentication process and keeps the definition of the cube, query, and response file.
Prerequisites
1. install python 3.4 (download here)
2. python c++ compiler (download here)
3. python dependencies
  • jwt (pip module PyJWT)
  • parse (pip module parse)
  • requests (pip module requests)
  • django (pip module django)
All python dependencies can be downloaded with pip. In the command line, type the following for downloading PyJWT for instance:
pip install PyJWT
Script
The sql_to_csv.py script is attached. Note the Settings section in the script to setup server location, name of the cube, query, user email and password, REST API token, and response file.
Windows Scheduler
See here how to schedule a task in Windows. You can read this stack overflow post about scheduling the task every hour.
The command that you need to set in the Scheduler is the following:
python sql_to_csv.py
 
Comments
SC123
7 - Data Storage
7 - Data Storage

Hiya,

the drive link is inaccessible, are you able to share this again orr just personally?

-Steve

Version history
Last update:
‎02-16-2024 10:23 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: