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

ERROR 0: Error calling process() in User Function UDParser at [ODBCLoader.cpp:376], error code: 0, message: Error parsing Numeric: '15600249032015053115' (unrecognized syntax from remote database) #40

Open
mayankgupta18 opened this issue May 19, 2015 · 3 comments

Comments

@mayankgupta18
Copy link

Hello

We are getting error while using ODBCLoader , specially in case if the length of data in source reached to its maximum based on datatype defined for that column

dbadmin=> \d t_d1

                                List of Fields by Tables

Schema | Table | Column | Type | Size | Default | Not Null | Primary Key | Foreign Key
--------+-------+--------+---------------+------+---------+----------+-------------+-------------
public | t_d1 | a | numeric(20,0) | 16 | | f | f |
(1 row)

Sample data:
15600249032015053115

COPY t_d1 WITH SOURCE ODBCSource() PARSER ODBCLoader(CONNECT = 'DSN=DEVVertica;UID=dbadmin;PWD=password;', QUERY = 'SELECT * from t_d1;');

ERROR 0: Error calling process() in User Function UDParser at [ODBCLoader.cpp:376], error code: 0, message: Error parsing Numeric: '15600249032015053115' (unrecognized syntax from remote database)

Please advice on how to fix this ODBCLoader.cpp , your directions are highly appreciated .

@aseering
Copy link
Contributor

Hm... I'm not immediately sure what's going wrong here.

My first guess is that one of the arguments to parseNumeric() (currently on line 360) is incorrect. What are the values that you're seeing for the four arguments other than the Numeric to be written? ("data.buf", "data.len", "i", and "getVerticaTypeOfCol(i)".)

@mayankgupta18
Copy link
Author

Hello Adam,

In source tables there is just one column with value 15600249032015053115.
We are using COPY command to load in target table which has column with data type Numeric(20,0) .

COPY t_d1 WITH SOURCE ODBCSource() PARSER ODBCLoader(CONNECT = 'DSN=DEVVertica;UID=dbadmin;PWD=password;', QUERY = 'SELECT * from t_d1;');

And it gives error
ERROR 0: Error calling process() in User Function UDParser at [ODBCLoader.cpp:376], error code: 0, message: Error parsing Numeric: '15600249032015053115' (unrecognized syntax from remote database)

But if we are trying to load the same data in target table using INSERT query and directly passing the value , it works .

Seems like some issue occurs if ODBCLoader is being used .

Please advise.

@aseering
Copy link
Contributor

Hi Mayank,

What are the values that you're seeing for the four arguments for the function-call above, other than the Numeric to be written? ("data.buf", "data.len", "i", and "getVerticaTypeOfCol(i)".) You could play around with that; try to make a patch based on what you find. Or feel free to ask here; we might be able to help.

It sounds like you might be expecting some sort of professional support for this software? This is an open-source community-driven project. The goal is to help you, as a developer, contribute a patch to the community that solves your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants