Akshay Sakunde
Akshay Sakunde

Reputation: 55

How to store result set or jobid of sql query on cloud?

I am pushing data from a SQL query on cloud to db2 on cloud, when I am querying data and storing it in my s3 bucket it is saving jobid of that particular query result.

But when I am pushing data into db2 it is not saving any jobid, in fact data has been inserted. I am checking by going again on db2.

But how do I came to know on SQL query that my query has succeeded or not? I want to confirm it when I am running the SQL query on cloud.

My query:

select 
    a.col, a.col2, explode (a.col3) company_list
from 
    cos://us-east/akshay-test-bucket1/Receive-2020-03-11/CP-2020-03-11/ STORED AS PARQUET c
into 
    crn:v1:bluemix:public:dashdb-for-transactions:eu-gb:a/2c36cd86085f442b915f0fba63138e0c:61f353e4-6640-4599-b1dd-48ee52ee008d::/schema_name.table_name

enter image description here

Here I am storing data into db2 and SQL query is saying "A preview is only possible for results stored in Cloud Object Storage" as you can see in above screenshot and see my query.

Upvotes: 0

Views: 92

Answers (0)

Related Questions