tusharpatil20 commented on a change in pull request #561: [Griffin-315] Adding 
JDBC based data connector
URL: https://github.com/apache/griffin/pull/561#discussion_r361962594
 
 

 ##########
 File path: 
measure/src/main/scala/org/apache/griffin/measure/datasource/connector/batch/JDBCBasedDataConnector.scala
 ##########
 @@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.griffin.measure.datasource.connector.batch
+
+import org.apache.spark.sql.{DataFrame, SparkSession}
+
+import org.apache.griffin.measure.Loggable
+import org.apache.griffin.measure.configuration.dqdefinition.DataConnectorParam
+import org.apache.griffin.measure.context.TimeRange
+import org.apache.griffin.measure.datasource.TimestampStorage
+import org.apache.griffin.measure.utils.ParamUtil._
+
+/**
+ * A batch data connector for file based sources which allows support various
 
 Review comment:
   Hi @wankunde 
   Please find my inline comments,
   
   - This pr is similar to
   
measure/src/main/scala/org/apache/griffin/measure/datasource/connector/batch/MySqlDataConnector.scala,
 so could you change MySqlDataConnector to a subclass of 
JDBCBasedDataConnector.scala. 
   **If a user wants to use MySql based data source to read data then there is 
no direct mapping to use it. The user has to use this connector using 
CustomDataconnector. Using JDBCBaedData connector users can use any RDBMS which 
has a JDBC connector by providing driver class, adding a jar to classpath and 
connection details. Added default config for MySql database.** 
   - Instead of adding a new dependency jar, i suggest using profile to add 
some other database support, like MariaDB and postgresql
   **With this implementation Griffin can read data from any source which has 
JDBC connector by adding JDBC connector JAR to the classpath and providing 
connection details in a config file. I have added H2 database dependency to 
check the JDBC connector functionality**

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to