CData Python Connector for DataRobot

Build 21.0.7930

Tables and Views

The connector possesses system tables that are used to discover the tables and views available in the data model. Of these system tables, "sys_tables" and "sys_views" are used to fetch information about the available tables and views respectively:

Tables


import cdata.datarobot as mod
conn = mod.connect("User=CData;Password=CData;DataRobotKey=123-abc-456-def;PredictionInstance=myinstance.orm.datarobot.com;DataFile=PATH\\TO\\input_file.csv;")
cur = conn.cursor()
cmd = "SELECT * FROM sys_tables"
cur.execute(cmd)
rs = cur.fetchall()
for row in rs:
	print(row)

Views


import cdata.datarobot as mod
conn = mod.connect("User=CData;Password=CData;DataRobotKey=123-abc-456-def;PredictionInstance=myinstance.orm.datarobot.com;DataFile=PATH\\TO\\input_file.csv;")
cur = conn.cursor()
cmd = "SELECT * FROM sys_views"
cur.execute(cmd, params)
rs = cur.fetchall()
for row in rs:
	print(row)

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930