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.woocommerce as mod conn = mod.connect(" Url=http://localhost/woocommerce/;ConsumerKey=ck_ec52c76185c088ecaa3145287c8acba55a6f59ad;ConsumerSecret=cs_9fde14bf57126156701a7563fc87575713c355e5;") cur = conn.cursor() cmd = "SELECT * FROM sys_tables" cur.execute(cmd) rs = cur.fetchall() for row in rs: print(row)
Views
import cdata.woocommerce as mod conn = mod.connect(" Url=http://localhost/woocommerce/;ConsumerKey=ck_ec52c76185c088ecaa3145287c8acba55a6f59ad;ConsumerSecret=cs_9fde14bf57126156701a7563fc87575713c355e5;") cur = conn.cursor() cmd = "SELECT * FROM sys_views" cur.execute(cmd, params) rs = cur.fetchall() for row in rs: print(row)