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

limit is not support in oracle #2177

Closed
gflp123 opened this issue Jun 3, 2019 · 5 comments
Closed

limit is not support in oracle #2177

gflp123 opened this issue Jun 3, 2019 · 5 comments
Assignees
Labels
bug Something isn't working @dataprep Component Name : Data preparation
Milestone

Comments

@gflp123
Copy link

gflp123 commented Jun 3, 2019

Describe the bug
DB connection with oracle,But execute dataset collect error. For detail
ORA-00933: SQL command not properly ended
image

limit is not support in oracle

String pattern = ".limit\p{Space}+[0-9]+\p{Space}$";
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(queryStmt.toLowerCase());
if(true==m.matches()) {
sql = queryStmt;
} else {
sql = queryStmt + " LIMIT " + size;
}
} else {
sql = "SELECT * FROM " + tblName + " LIMIT " + size;
}

Desktop (please complete the following information):

OS: [linux]
Browser [chrome]
Version [3.2.3]
Additional context

@i1befree i1befree added the bug Something isn't working label Jun 3, 2019
@alchan-lee
Copy link
Contributor

Hi, @gflp123
It seems to be your query statements in the extension module are not compatible with Oracle, it's not related 'limit' statement.

I will check your query with my mates and will reply soon.

Thanks.

@ufoscw ufoscw self-assigned this Jun 4, 2019
@ufoscw ufoscw added this to the 3.3.0 milestone Jun 4, 2019
ufoscw added a commit that referenced this issue Jun 4, 2019
@ufoscw
Copy link
Contributor

ufoscw commented Jun 4, 2019

@gflp123
We have the oracle jdbc extension source that we created.
In the meantime, I was not pushing the source for distribution license issues, but I'm going to push this time.
I'll show you the branch with the source.
To build it, see the maven repository guide.

https://github.com/metatron-app/metatron-discovery/tree/f%232177-add_oracle_extension/discovery-extensions/oracle-connection

Let me know if you have any questions.

@ufoscw ufoscw mentioned this issue Jun 4, 2019
7 tasks
@gflp123
Copy link
Author

gflp123 commented Jun 4, 2019

oracle-connection-1.0.0-7.3.0.zip

Thanks reply,The bug is not solve.
Debug in my environment,It error in PrepDatasetDatabaseService_getPreviewLinesFromJdbcForDataFrame.
I am use oracle 11g,limit is not support.

http://localhost:8180/api/preparationdatasets/cb18af76-8b37-4ef3-b205-8211e995b835

image

Oracle version 11g



com.oracle
ojdbc6
11.2.0

@ufoscw
Copy link
Contributor

ufoscw commented Jun 5, 2019

@gflp123
I thought you were a question about the workbench, but that was a question related to Preparation.
I think it 's a bug.
I'll send it to the person in charge and fix it.

@ufoscw ufoscw assigned joohokim1 and unassigned ufoscw Jun 5, 2019
@ufoscw ufoscw added the @dataprep Component Name : Data preparation label Jun 5, 2019
@ufoscw ufoscw removed this from the 3.3.0 milestone Jun 5, 2019
@joohokim1
Copy link
Contributor

@gflp123 @ufoscw @alchan-lee Yes. It's a bug. I'll fix it as soon as possible.
Besides, if the query for dataset already contains "limit n", then it fails too. I'll fix this too.

@joohokim1 joohokim1 added this to the 3.3.0 milestone Jun 5, 2019
ufoscw added a commit that referenced this issue Jun 7, 2019
* #2177 add oracle extension

* #1539 fix typos

* #2177 change profile name (include-all -> extensions-all)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @dataprep Component Name : Data preparation
Projects
None yet
Development

No branches or pull requests

5 participants