Jump to content

Help - Table to be reshaped


DumbuBabloo

Recommended Posts

I have a  Hive table in which one column format is array of struct

below is the 1 row object  of that particular column

"[{""name:""item_nbr"",""value"":""550418509""},{""name"":""vendor_nbr"",""value"":""332510""},{""name"":""whse_nbr"",""value"":""6071""},{""name"":{""name"":""oos_date"",""value"":""2017-11-17""},{""name"":""store_cnt"",""value"":""74""},{""name"":""oos_delivery_gap"",""value"":""9""},{""name"":""dayss_out"",""value"":""0""},{""name"":""dos_oh_oo"",""value"":""0""}]"

 

I have to pull this column and put into another table , i did that and i got table as

name                   value

item nbr              550418509

vendor_nbr         332510

whse_nbr            6071

.

.

item nbr .          55466577

vendor_nbr         5889990

whse_nbr .         788999009

.

.

.

.

Now i want to reshape this table  as 

item nbr    vendor_nbr     whse_nbr   as columns and values as rows . How to do that ? 

The whole table is in Hive 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...