Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix][Connector] Fix When SqlServer executes a job, the table that is generated does not exist. #303

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ default DataType getDataType(String jdbcType) {
}

default String quoteIdentifier(String entity) {
return "`" + entity + "`";
return entity;
}

default String getTableExistsQuery(String table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ public boolean invalidateItemCanOutputToSelf() {
public boolean supportToBeErrorDataStorage() {
return true;
}

@Override
public String quoteIdentifier(String entity) {
return "`" + entity + "`";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ public boolean invalidateItemCanOutputToSelf() {
public boolean supportToBeErrorDataStorage() {
return true;
}

@Override
public String quoteIdentifier(String entity) {
return entity;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ protected List<SourceConfig> 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);
Expand All @@ -90,9 +92,6 @@ protected List<SourceConfig> 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();
Expand Down
Loading