Giter VIP home page Giter VIP logo

sqlsheet's People

sqlsheet's Issues

Spreadsheet of size 20MB generate java.lang.OutOfMemoryError exception

https://groups.google.com/forum/?fromgroups#!topic/scriptella/wr_dkDaQsKQ

When I try to load a spreadsheet that is only 20MB, it uses a massive amount of 
memory and eventually I get a java.lang.OutOfMemoryError exception thrown. I 
went into the scriptella bin and added -Xmx1536m to try and get scriptella to 
use more memory but even with 1.5GB of memory, it stills throws this exception 
on only a 20MB spreadsheet. 

Apr 26, 2012 11:33:18 AM <SEVERE> Script scripts/integration/npcDrop.etl.xml 
execution failed.
Java heap space
Apr 26, 2012 11:33:18 AM <SEVERE> Scriptella bug report. Submit to issue 
tracker.
Scriptella version: 1.1-SNAPSHOT
Exception: 
scriptella.execution.EtlExecutorException: Java heap space
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:190)
    at scriptella.tools.launcher.EtlLauncher.execute(EtlLauncher.java:276)
    at scriptella.tools.launcher.EtlLauncher.launch(EtlLauncher.java:193)
    at scriptella.tools.launcher.EtlLauncher.main(EtlLauncher.java:321)
Caused by: java.lang.OutOfMemoryError: Java heap space

Original issue reported on code.google.com by vasilievip on 30 Apr 2012 at 9:45

java.lang.ArrayIndexOutOfBoundsException: -1 at XlsStreamResultSet.getString(String)

What steps will reproduce the problem?
1. Set up a connection to an excel sheet
2. create a prepared statement like "SELECT * FROM ..."
3. call XlsStreamResultSet.getString("[FIRST_COLUMN_NAME]") where 
[FIRST_COLUMN_NAME] is the name of the first column in the excel sheet.

What is the expected output? What do you see instead?
I expect to get the string value from the first column in the current row but I 
get java.lang.ArrayIndexOutOfBoundsException: -1. For other columns the 
received value will be from the column right before.

What version of the product are you using? On what operating system?
6.3

Please provide any additional information below.
The problematic source can be found at XlsStreamResultSet:83
Remove the -1 and it will work.

If you give me commit rights, then I can provide a patch.

Original issue reported on code.google.com by [email protected] on 24 Apr 2013 at 7:01

Empty cell will be skipped

What steps will reproduce the problem?
1. Open a streaming connection to a .xlsx
The table has the following content

PARENT CHILD MIN MAX
[]     FOO   1   1           (where [] is an empty cell)

2. create a PreparedStatement "SELECT * FROM ..." and execute it
3. read the values with: resultSet.getString("PARENT"), 
resultSet.getString("CHILD"), resultSet.getString("MIN") and 
resultSet.getString("MAX")

What is the expected output? What do you see instead?
The expected results are
resultSet.getString("PARENT") > null
resultSet.getString("CHILD")  > "FOO"
resultSet.getString("MIN")    > "1"
resultSet.getString("MAX")    > "1"

but was
resultSet.getString("PARENT") > "FOO"
resultSet.getString("CHILD")  > "1"
resultSet.getString("MIN")    > "1"
resultSet.getString("MAX")    > null

Is there some "skip-empty-cells" mechanism in Sqlsheet?

What version of the product are you using? On what operating system?
6.3 and 6.5-SNAPSHOT

Original issue reported on code.google.com by [email protected] on 25 Apr 2013 at 11:27

It looks like if the cell is null/empty, then it ends up returning the wrong data

<connection id="xlsx" 
url="jdbc:xls:file:${quest.reward.filename}?readStreaming=true"/>
...
<query connection-id="xlsx">
    SELECT * FROM Quests;
    <script connection-id="log">
        ${etl.getParameter('Quest ID')} $EXP
    </script>
</query>

The data in the spreadsheet looks like this...

Zone ID Level   Quest ID    GUID    Quest Name  EXP Gold    Bag Type    Item ID Item 
Rarity  Item Name   Quantity    Class

9   30  902 QUEST-9-902 Sic Semper 
Proditores  144000  -   class   15722   Uncommon    Infiltrator's Gauntlets 1   lancer
9   30  902 QUEST-9-902 



15722   Uncommon    Infiltrator's Gauntlets 1   berserker
9   30  902 QUEST-9-902 



15725   Uncommon    Infiltrator's Grips 1   warrior

And I get this for the output..

902 144000
902 Uncommon
902 Uncommon

So when that EXP column is empty/null, for some reason it returns data from the 
Item Rarity column


Original issue reported on code.google.com by vasilievip on 19 May 2012 at 7:57

Attachments:

ResultSet.getDate nyi

I am not sure if this should be categorized as issue or an additional feature.
If you have a date formatted cell, the ResultSet.getString method returns the 
representation value of String and not the date value in standard format.

Consider a date "22. Dezember 1963" - a german localized date then you get 
exact string. When it should return the date which can be used directly to 
store in Database. 

Now there is another method getTimeStamp to return date from resultset but it 
throws null pointer exception if the cell is empty. This should be null value 
instead.

Original issue reported on code.google.com by [email protected] on 6 Aug 2013 at 2:53

ResultRset get<Number> throws NullPointerException if the cell is empty

Any empty cell  withResultSet.get<Number> methods (e.g. getInt(), getFloat(), 
...).

In JDBC with real database return zero value not throwing NullPointerException 
or return null value.

It seems it can be fixed by simplely check "cell.doubleValue == null" in 
get<Number> methods like this:

return (<type>) ((cell == null) ? 0.0D : cell.doubleValue.doubleValue());
  --> 
return (<type>) ((cell == null || cell.doubleValue == null) ? 0.0D : 
cell.doubleValue.doubleValue());

Original issue reported on code.google.com by [email protected] on 23 Jul 2014 at 11:26

Add option to switch column name detection

Right now first row must always contain names of the column. If I don't have 
such row I'll have issues with driver. 
So the switch can be as following:
- Column names will be taken from first row
- Column names will be taken from EXCEL file(A,B,C.. etc)


Original issue reported on code.google.com by vasilievip on 3 Jun 2012 at 2:30

com.googlecode.sqlsheet.stream.XlsStreamResultSet.getString() <-> net.pcal.sqlsheet.XlsResultSet.getString()

What steps will reproduce the problem? Do you have sample xls(x) file?
1. create connection to .xlsx
2. create some statement and execute it
3. depending on the value of "readStreaming" in the connection string you get a 
com.googlecode.sqlsheet.stream.XlsStreamResultSet (true) or a 
net.pcal.sqlsheet.XlsResultSet (false)
4. perform getString() where the undelying cell has numeric value

What is the expected output? What do you see instead?
Both implementations act different. c.g.s.s.XlsStreamResult.getString() results 
in some string representation of the number.
n.p.s.XlsResultSet.getString() thorws a SQLException (type mismatch)


Found that while fixing Issue 7. Now with commit rights should I check in test 
cases that show the problem but breakt the build?

Original issue reported on code.google.com by [email protected] on 27 Apr 2013 at 5:54

How to get column datatype with sqlsheet 5+

What steps will reproduce the problem?
    Class.forName("net.pcal.sqlsheet.XlsDriver");
        Connection excelConnection = DriverManager.getConnection("jdbc:xls:file:///C:\\Test.xlsx");
        Statement xlsStatement = excelConnection.createStatement();
        ResultSet resultSet = null;
        resultSet = xlsStatement.executeQuery("select * from Test");
        ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
        int iNumCols = resultSetMetaData.getColumnCount();
        for (int i = 1; i <= iNumCols; i++) {
            System.out.println(resultSetMetaData.getColumnLabel(i)
                    + "  " +
                    resultSetMetaData.getColumnTypeName(i));
        }

What is the expected output? What do you see instead?
column datatype is null

What version of the product are you using? On what operating system?

sqlsheet 5
Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 20 Mar 2013 at 10:12

Closing connection causes file corruption

https://groups.google.com/forum/?fromgroups#!topic/scriptella/wr_dkDaQsKQ

Sometimes after reading a spreadsheet, after all of the statements have been 
executed and it attempts to close the connection on the xls driver, it seems 
like it rewrites the entire xls file? I have noticed at times the file size 
will shrink which I assume is due to a difference in compression in how the 
sheet is being saved as; but the big issue here is that if anything happens 
during this period, or if there is an exception during the processing phase, 
the context is not closed properly and the xls file is basically truncated and 
you're left with a spreadsheet that has 0 bytes. Is the only way to avoid this 
making all of the source files read-only?

Original issue reported on code.google.com by vasilievip on 30 Apr 2012 at 9:49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.