diff --git a/datavines-connector/datavines-connector-api/src/main/java/io/datavines/connector/api/Dialect.java b/datavines-connector/datavines-connector-api/src/main/java/io/datavines/connector/api/Dialect.java index de59d65b0..ae5d449b5 100644 --- a/datavines-connector/datavines-connector-api/src/main/java/io/datavines/connector/api/Dialect.java +++ b/datavines-connector/datavines-connector-api/src/main/java/io/datavines/connector/api/Dialect.java @@ -89,7 +89,7 @@ default DataType getDataType(String jdbcType) { } default String quoteIdentifier(String entity) { - return "`" + entity + "`"; + return entity; } default String getTableExistsQuery(String table) { diff --git a/datavines-connector/datavines-connector-plugins/datavines-connector-mysql/src/main/java/io/datavines/connector/plugin/MysqlDialect.java b/datavines-connector/datavines-connector-plugins/datavines-connector-mysql/src/main/java/io/datavines/connector/plugin/MysqlDialect.java index 7af11d29c..2d1150f2b 100644 --- a/datavines-connector/datavines-connector-plugins/datavines-connector-mysql/src/main/java/io/datavines/connector/plugin/MysqlDialect.java +++ b/datavines-connector/datavines-connector-plugins/datavines-connector-mysql/src/main/java/io/datavines/connector/plugin/MysqlDialect.java @@ -43,4 +43,9 @@ public boolean invalidateItemCanOutputToSelf() { public boolean supportToBeErrorDataStorage() { return true; } + + @Override + public String quoteIdentifier(String entity) { + return "`" + entity + "`"; + } } diff --git a/datavines-connector/datavines-connector-plugins/datavines-connector-sqlserver/src/main/java/io/datavines/connector/plugin/SqlServerDialect.java b/datavines-connector/datavines-connector-plugins/datavines-connector-sqlserver/src/main/java/io/datavines/connector/plugin/SqlServerDialect.java index fe0b9f216..588de037d 100644 --- a/datavines-connector/datavines-connector-plugins/datavines-connector-sqlserver/src/main/java/io/datavines/connector/plugin/SqlServerDialect.java +++ b/datavines-connector/datavines-connector-plugins/datavines-connector-sqlserver/src/main/java/io/datavines/connector/plugin/SqlServerDialect.java @@ -47,4 +47,9 @@ public boolean invalidateItemCanOutputToSelf() { public boolean supportToBeErrorDataStorage() { return true; } + + @Override + public String quoteIdentifier(String entity) { + return entity; + } } diff --git a/datavines-engine/datavines-engine-plugins/datavines-engine-local/datavines-engine-local-config/src/main/java/io/datavines/engine/local/config/BaseLocalConfigurationBuilder.java b/datavines-engine/datavines-engine-plugins/datavines-engine-local/datavines-engine-local-config/src/main/java/io/datavines/engine/local/config/BaseLocalConfigurationBuilder.java index 85bc02cd2..876011d62 100644 --- a/datavines-engine/datavines-engine-plugins/datavines-engine-local/datavines-engine-local-config/src/main/java/io/datavines/engine/local/config/BaseLocalConfigurationBuilder.java +++ b/datavines-engine/datavines-engine-plugins/datavines-engine-local/datavines-engine-local-config/src/main/java/io/datavines/engine/local/config/BaseLocalConfigurationBuilder.java @@ -73,7 +73,9 @@ protected List getSourceConfigs() throws DataVinesException { metricInputParameter.put(DATABASE_NAME,metricInputParameter.get(DATABASE)); metricInputParameter.put(TABLE_NAME,metricInputParameter.get(TABLE)); metricInputParameter.put(COLUMN_NAME,metricInputParameter.get(COLUMN)); - + if (connectorParameter.getParameters().get(SCHEMA) != null) { + metricInputParameter.put(SCHEMA, (String)connectorParameter.getParameters().get(SCHEMA)); + } String table = connectorFactory.getDialect() .getFullQualifiedTableName(metricInputParameter.get(DATABASE),metricInputParameter.get(SCHEMA),metricInputParameter.get(TABLE)); connectorParameterMap.put(TABLE, table); @@ -90,9 +92,6 @@ protected List getSourceConfigs() throws DataVinesException { metricInputParameter.putAll(connectorFactory.getDialect().getDialectKeyMap()); metricInputParameter.put(SRC_CONNECTOR_TYPE, connectorParameter.getType()); metricInputParameter.put(TABLE, table); - if (connectorParameter.getParameters().get(SCHEMA) != null) { - metricInputParameter.put(SCHEMA, (String)connectorParameter.getParameters().get(SCHEMA)); - } boolean invalidateItemCanOutput = Boolean.parseBoolean(metricInputParameter.get(INVALIDATE_ITEM_CAN_OUTPUT)); invalidateItemCanOutput &= connectorFactory.getDialect().invalidateItemCanOutput();