Difference between revisions of "Orange: SQL Table"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 22: | Line 22: | ||
Auto-discover categorical variables will cast INT and CHAR columns with less than 20 distinct values as categorical variables (finding all distinct values can be slow on large tables). When not selected, INT will be treated as numeric and CHAR as text. Download to local memory downloads the selected table to your local machine. | Auto-discover categorical variables will cast INT and CHAR columns with less than 20 distinct values as categorical variables (finding all distinct values can be slow on large tables). When not selected, INT will be treated as numeric and CHAR as text. Download to local memory downloads the selected table to your local machine. | ||
− | + | ==Instalasi Pendukung== | |
− | + | ===PostgreSQL=== | |
− | Install | + | Install |
pip install psycopg2 | pip install psycopg2 | ||
Line 34: | Line 34: | ||
Install the extensions. [optional] | Install the extensions. [optional] | ||
− | + | ===MSSQL=== | |
− | Install | + | Install |
pip install pymssql | pip install pymssql |
Revision as of 08:18, 10 January 2020
Sumber: https://docs.biolab.si//3/visual-programming/widgets/data/sqltable.html
Membaca data dari SQL database.
Output
Data: dataset from the database
Widget SQL mengakses data yang disimpan dalam database SQL. Widget SQL dapat terhubung ke PostgreSQL (memerlukan modul psycopg2) atau SQL Server (memerlukan modul pymssql).
Untuk menangani basis data besar, Orange mencoba untuk mengeksekusi bagian dari perhitungan di dalam basis data itu sendiri tanpa mengunduh data. Ini hanya berfungsi dengan database PostgreSQL dan membutuhkan ekstensi quantile dan tsm_system_time yang diinstal di server. Jika ekstensi ini tidak diinstal, data akan diunduh secara lokal.
Database type (can be either PostgreSQL or MSSQL). Host name. Database name. Username. Password. Press the blue button to connect to the database. Then select the table in the dropdown. Auto-discover categorical variables will cast INT and CHAR columns with less than 20 distinct values as categorical variables (finding all distinct values can be slow on large tables). When not selected, INT will be treated as numeric and CHAR as text. Download to local memory downloads the selected table to your local machine.
Instalasi Pendukung
PostgreSQL
Install
pip install psycopg2
Alternatively, you can follow these instructions for installing the backend.
Install the extensions. [optional]
MSSQL
Install
pip install pymssql
If you are encountering issues, follow these instructions.
Contoh
Here is a simple example on how to use the SQL Table widget. Place the widget on the canvas, enter your database credentials and connect to your database. Then select the table you wish to analyse.
Connect SQL Table to Data Table widget to inspect the output. If the table is populated, your data has transferred correctly. Now, you can use the SQL Table widget in the same way as the File widget.