You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@manifoldcf.apache.org by SREEJITH va <va...@gmail.com> on 2020/01/02 13:49:18 UTC

performInsert() postgres json

Hi Karl and Team,

I have a situation  where I have to call *performInsert(parameterMap, null)*
on a postgres database table with json column. I am getting below error
during the insert.


*column "XXXXX" is of type json but expression is of type character
varying  Hint: You will need to rewrite or cast the expression.*

Is there any way I can achieve this using Basetable api?


-- 
Regards
-Sreejith

Re: performInsert() postgres json

Posted by SREEJITH va <va...@gmail.com>.
ok. Thanks

On Mon, Jan 13, 2020 at 4:31 PM Karl Wright <da...@gmail.com> wrote:

> If you can just put JSON in a string that would work fine.
>
> Karl
>
>
> On Mon, Jan 13, 2020 at 3:36 AM SREEJITH va <va...@gmail.com> wrote:
>
>> Thanks Karl.
>>
>> I am trying to use WrappedConnection which I am getting through below API
>> and using it for database operations in my connector.
>>
>>
>> *ConnectionFactory.getConnection(jdbcURL, _driver,
>> ManifoldCF.getMasterDatabaseName(),
>> ManifoldCF.getMasterDatabaseUsername(), ManifoldCF.getMasterDatabasePassword(),
>> maxDBConnections, false);*
>>
>> In this way I can run the query directly and overcome the issue with json
>> datatype. Is it ok to proceed with this or I should not directly use
>> wrapper connections ?. Any performance concerns using wrapperconnections
>> manually for connector instead of extending BaseTable.
>>
>>
>> On Thu, Jan 2, 2020 at 7:26 PM Karl Wright <da...@gmail.com> wrote:
>>
>>> The Basetable abstraction doesn't recognize specialty column types like
>>> JSON; it's got a limited set of types it knows about, and that is by design
>>> so multiple implementations can be written for different databases.
>>>
>>> Karl
>>>
>>>
>>> On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va <va...@gmail.com>
>>> wrote:
>>>
>>>> Hi Karl and Team,
>>>>
>>>> I have a situation  where I have to call *performInsert(parameterMap,
>>>> null)*  on a postgres database table with json column. I am getting
>>>> below error during the insert.
>>>>
>>>>
>>>> *column "XXXXX" is of type json but expression is of type character
>>>> varying  Hint: You will need to rewrite or cast the expression.*
>>>>
>>>> Is there any way I can achieve this using Basetable api?
>>>>
>>>>
>>>> --
>>>> Regards
>>>> -Sreejith
>>>>
>>>
>>
>> --
>> Regards
>> -Sreejith
>>
>

-- 
Regards
-Sreejith

Re: performInsert() postgres json

Posted by Karl Wright <da...@gmail.com>.
If you can just put JSON in a string that would work fine.

Karl


On Mon, Jan 13, 2020 at 3:36 AM SREEJITH va <va...@gmail.com> wrote:

> Thanks Karl.
>
> I am trying to use WrappedConnection which I am getting through below API
> and using it for database operations in my connector.
>
>
> *ConnectionFactory.getConnection(jdbcURL, _driver,
> ManifoldCF.getMasterDatabaseName(),
> ManifoldCF.getMasterDatabaseUsername(), ManifoldCF.getMasterDatabasePassword(),
> maxDBConnections, false);*
>
> In this way I can run the query directly and overcome the issue with json
> datatype. Is it ok to proceed with this or I should not directly use
> wrapper connections ?. Any performance concerns using wrapperconnections
> manually for connector instead of extending BaseTable.
>
>
> On Thu, Jan 2, 2020 at 7:26 PM Karl Wright <da...@gmail.com> wrote:
>
>> The Basetable abstraction doesn't recognize specialty column types like
>> JSON; it's got a limited set of types it knows about, and that is by design
>> so multiple implementations can be written for different databases.
>>
>> Karl
>>
>>
>> On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va <va...@gmail.com> wrote:
>>
>>> Hi Karl and Team,
>>>
>>> I have a situation  where I have to call *performInsert(parameterMap,
>>> null)*  on a postgres database table with json column. I am getting
>>> below error during the insert.
>>>
>>>
>>> *column "XXXXX" is of type json but expression is of type character
>>> varying  Hint: You will need to rewrite or cast the expression.*
>>>
>>> Is there any way I can achieve this using Basetable api?
>>>
>>>
>>> --
>>> Regards
>>> -Sreejith
>>>
>>
>
> --
> Regards
> -Sreejith
>

Re: performInsert() postgres json

Posted by SREEJITH va <va...@gmail.com>.
Thanks Karl.

I am trying to use WrappedConnection which I am getting through below API
and using it for database operations in my connector.


*ConnectionFactory.getConnection(jdbcURL, _driver,
ManifoldCF.getMasterDatabaseName(),
ManifoldCF.getMasterDatabaseUsername(), ManifoldCF.getMasterDatabasePassword(),
maxDBConnections, false);*

In this way I can run the query directly and overcome the issue with json
datatype. Is it ok to proceed with this or I should not directly use
wrapper connections ?. Any performance concerns using wrapperconnections
manually for connector instead of extending BaseTable.


On Thu, Jan 2, 2020 at 7:26 PM Karl Wright <da...@gmail.com> wrote:

> The Basetable abstraction doesn't recognize specialty column types like
> JSON; it's got a limited set of types it knows about, and that is by design
> so multiple implementations can be written for different databases.
>
> Karl
>
>
> On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va <va...@gmail.com> wrote:
>
>> Hi Karl and Team,
>>
>> I have a situation  where I have to call *performInsert(parameterMap,
>> null)*  on a postgres database table with json column. I am getting
>> below error during the insert.
>>
>>
>> *column "XXXXX" is of type json but expression is of type character
>> varying  Hint: You will need to rewrite or cast the expression.*
>>
>> Is there any way I can achieve this using Basetable api?
>>
>>
>> --
>> Regards
>> -Sreejith
>>
>

-- 
Regards
-Sreejith

Re: performInsert() postgres json

Posted by Karl Wright <da...@gmail.com>.
The Basetable abstraction doesn't recognize specialty column types like
JSON; it's got a limited set of types it knows about, and that is by design
so multiple implementations can be written for different databases.

Karl


On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va <va...@gmail.com> wrote:

> Hi Karl and Team,
>
> I have a situation  where I have to call *performInsert(parameterMap,
> null)*  on a postgres database table with json column. I am getting below
> error during the insert.
>
>
> *column "XXXXX" is of type json but expression is of type character
> varying  Hint: You will need to rewrite or cast the expression.*
>
> Is there any way I can achieve this using Basetable api?
>
>
> --
> Regards
> -Sreejith
>