Skip to Content
avatar image
-1
Former Member

Hello All,

We need help in parsing JSON object through BODS.Our source DB is postgres and the query is working fine in it but same query is throwing error in BODS.We are running the below query in SQL transformation in BODS.Attaching the error for the same.Please suggest some solution.

Thanks in Advance

error.jpegselect id, json_object_keys(anupam) ,anupam->json_object_keys(anupam)->'accessright'  accessright, 
anupam->json_object_keys(anupam)->'path' path from ssanalytics.test  
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Jan 11, 2017 at 02:11 PM

    an you please clarify :

    1. source is postgres - are you using ODBC\ DataDirect driver to connect

    2. Where are JSON objects coming from is DB returning it?

    3. can you use query and table reader instead of SQL transform and test

    4. please post msg from error log from job execution

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 12, 2017 at 12:42 PM

    Hi Aasavari,

    Thanks for the reply !!

    Our source DB is postgres and we are using ODBC driver to connect.

    The source DB is returning the JSON object value.Attaching the screenshot for the postgres table which we are trying to pull in BODS.

    Moreover we cant user query and table reader as we need to modify the JSON object in tabular format before pushing it into HANA.

    pstgres-source-table.jpeg.

    Please suggest some solutions.

    Thanks !!

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 12, 2017 at 01:26 PM

    Please do NOT post a question using subject "HELLO ALL"....the subject should summarize your question....like "Any

    help in parsing JSON object through BODS?"

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 12, 2017 at 01:27 PM

    Omkar,

    What is the datatype of the column from Postgre DB table which is returning the JSON object value. There are some datatypes which are not supported by Data Services.

    In the Target HANA Datastore you will have an option Import unsupported data types as VARCHAR of size.make sure that this option is Checked

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 16, 2017 at 09:45 AM
    pstgres-source-table.jpeg,

    Please find the structure of Postgres DB table attached herein.

    When we are importing this table in BODS it is automatically taking it of a Varchar datatype.But in BODS max varchar size is 5000 and the size of the column which we are taking from Postgres exceed this limit.

    pstgres-source-table.jpeg

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2017 at 02:15 PM

    Can you define the column as Long in Data services and load. Long datatype should work.

    Regards

    Arun Sasi

    ,

    You can define the datatype of the column in BODS as long

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2017 at 02:16 PM

    You can define the datatype of the column in BODS as long

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded