shaofengshi closed pull request #133: add doc for jdbc data source URL: https://github.com/apache/kylin/pull/133
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/website/_data/docs23.yml b/website/_data/docs23.yml index 66b312192a..5bf1e5943a 100644 --- a/website/_data/docs23.yml +++ b/website/_data/docs23.yml @@ -75,5 +75,6 @@ - howto/howto_install_ranger_kylin_plugin - howto/howto_enable_zookeeper_acl - howto/howto_setup_systemcube + - howto/howto_setup_jdbc_datasource - howto/howto_use_cube_planner - howto/howto_use_dashboard diff --git a/website/_docs23/howto/howto_setup_jdbc_datasource.md b/website/_docs23/howto/howto_setup_jdbc_datasource.md new file mode 100644 index 0000000000..e5012f785d --- /dev/null +++ b/website/_docs23/howto/howto_setup_jdbc_datasource.md @@ -0,0 +1,61 @@ +--- +layout: docs23 +title: Set Up JDBC Data Source +categories: howto +permalink: /docs23/howto/howto_setup_jdbc_datasource.html +--- + +> Available since Apache Kylin v2.3.x + +## Supported JDBC data source + +Since v2.3.0 Apache Kylin has supported JDBC data source. Users can integrate Kylin with MySQL, Microsoft SQL Server and vertica directly. Other relational databases are not offically supported, but could be easily extended. + +## Set Up JDBC data source + +1. Prepare Sqoop + +Kylin uses [Sqoop](http://sqoop.apache.org/) to load data from relational databases to HDFS. Make sure Sqoop is installed in the same node with Kylin. we will use SQOOP_HOME to indicate the installation directory of Sqoop in this guide. + +2. Prepare JDBC driver + + Add appropriate JDBC driver to *$SQOOP_HOME/lib* and *$KYLIN_HOME/lib*. + +3. Set Kylin configuration + +For example: + +``` +kylin.source.default=8 +kylin.source.jdbc.connection-url=jdbc:mysql://localhost:3306/employees +kylin.source.jdbc.driver=com.mysql.jdbc.Driver +kylin.source.jdbc.dialect=mysql +kylin.source.jdbc.user=root +kylin.source.jdbc.pass=my-secret-pw +kylin.source.jdbc.sqoop-home=/usr/hdp/current/sqoop-client/bin +kylin.source.jdbc.filed-delimiter=| +``` + +## Load tables from JDBC data source + +If everything goes smoothly, you are able to load tables from JDBC data source now. Open Kylin and navigate to data source panel. + + + +Click **load table** button and input tables' names. Do not click **Calculate column cardinality** because this feature has not been supported for JDBC data source. + + + +You can see tables and columns when tables are loaded successfully. + + + +And Kylin also provides a convenient way to select tables you want to load. Click **Load Table From Tree** then all tables are shown as a tree. + + + +Choose tables you want to sync with Kylin and unclick **Calculate column cardinality**. + + + +Go ahead and design your models and cubes. \ No newline at end of file diff --git a/website/images/docs/v23/jdbc-datasource/load_table_01.png b/website/images/docs/v23/jdbc-datasource/load_table_01.png new file mode 100644 index 0000000000..c60bb2839f Binary files /dev/null and b/website/images/docs/v23/jdbc-datasource/load_table_01.png differ diff --git a/website/images/docs/v23/jdbc-datasource/load_table_02.png b/website/images/docs/v23/jdbc-datasource/load_table_02.png new file mode 100644 index 0000000000..abe16fa18c Binary files /dev/null and b/website/images/docs/v23/jdbc-datasource/load_table_02.png differ diff --git a/website/images/docs/v23/jdbc-datasource/load_table_03.png b/website/images/docs/v23/jdbc-datasource/load_table_03.png new file mode 100644 index 0000000000..7ed3a77bf3 Binary files /dev/null and b/website/images/docs/v23/jdbc-datasource/load_table_03.png differ diff --git a/website/images/docs/v23/jdbc-datasource/load_tables_tree_01.png b/website/images/docs/v23/jdbc-datasource/load_tables_tree_01.png new file mode 100644 index 0000000000..66ffddd065 Binary files /dev/null and b/website/images/docs/v23/jdbc-datasource/load_tables_tree_01.png differ diff --git a/website/images/docs/v23/jdbc-datasource/load_tables_tree_02.png b/website/images/docs/v23/jdbc-datasource/load_tables_tree_02.png new file mode 100644 index 0000000000..44dcadc469 Binary files /dev/null and b/website/images/docs/v23/jdbc-datasource/load_tables_tree_02.png differ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
