Difference between revisions of "Orange: SQL Table"

From OnnoWiki
Jump to navigation Jump to search
Line 12: Line 12:
 
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.
 
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.
  
../../_images/SQLTable-stamped.png
+
[[File:SQLTable-stamped.png|center|600px|thumb]]
  
 
     Database type (can be either PostgreSQL or MSSQL).
 
     Database type (can be either PostgreSQL or MSSQL).

Revision as of 08:15, 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.

SQLTable-stamped.png
   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.
    1. Installation Instructions
      1. PostgreSQL

Install the backend.

pip install psycopg2

Alternatively, you can follow these instructions for installing the backend.

Install the extensions. [optional]

      1. MSSQL

Install the backend.

pip install pymssql

If you are encountering issues, follow these instructions.

    1. Example

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.

../../_images/SQLTable-Example.png



Referensi

Pranala Menarik