by CData Software | September 5, 2023

Python is Now Fully Integrated into CData Virtuality’s Code Editor!

cdata virtuality

Why settle for less? Go beyond just ‘Connection’ with native integration!

While many platforms offer mere Python connections—which still force you to switch between different environments—CData Virtuality takes it a step further. We provide native Python integration, allowing you to say goodbye to the hassle of environment-hopping.

The power of Python, all in one place

With CData Virtuality‘s native integration, eliminate the tedious process of switching between your Python environment and your data management tool. Focus more on coding and less on logistical headaches.

Run Python 3 scripts directly from SQL in our Code Editor – no separate Python environment required. Boost your productivity by seamlessly managing your data workflows in a single, unified platform.

Check out some examples below:

This script evaluates an expression and obtains the results by using Python’s functions:

SELECT * 
FROM (
    ObjectTable (
        language 'python'
'import math
a = math.exp(3)'
        COLUMNS "a" integer 'a')
        AS x);;

This script evaluates multiple columns with multiple return:

SELECT *
FROM ( ObjectTable (
           language 'python'
'a = 1 + 1
b = a + 1
c = b * 2'
        COLUMNS "a" integer 'a',
        "b" integer 'b',
        "c" integer 'c')
        AS x);;

This more complex script with the PASSING keyword uses multiple user-defined variables. Results are returned for each row mentioned in the COLUMNS field:

SELECT *
FROM ( ObjectTable (
           language 'python'
'a = 1 + two
b = 2 + three
c = 3 + four
d = teststring
e = f
g = charhere'
        PASSING '2' as two,
        '3' as three,
        '4' as four,
        '''hello''' as teststring,
        '25.0' as f,
        '''s''' as charhere
        COLUMNS "a" integer 'a',
        "b" integer 'b',
        "c" integer 'c',
        "d" string 'd',
        "e" double 'e',
        "g" char 'g')
        AS x);;

Unlock infinite possibilities with Python libraries

Go beyond the basics! With native Python integration, you get access to an extensive array of Python libraries. Dive into data visualization, machine learning, statistical analysis, and much more. The sky’s the limit!

For more information and examples, check out our documentation at CData Virtuality Documentation.

Get started now!

Don’t miss the opportunity to streamline your data workflows like never before. Start your free 30-day trial today – no credit card required, and signing up is a breeze.