简体   繁体   中英

how to merge rows in google dataprep

I am really struggling with google data prep as there is no much information about this.

lets say i have data:

{"name":"john","age":21,"dob":"1988-01-01","tags":["a","b"],"address":{"postcode":3122,"state":"vic"},"lineItems":[{"itemID":"item001","unitPrice":1000},{"itemID":"item002","unitPrice":2000}]}
{"name":"aom","age":21,"dob":"1988-02-01","tags":["c","d"],"address":{"postcode":3000,"state":"Vic"},"lineItems":[{"itemID":"item003","unitPrice":3000},{"itemID":"item004","unitPrice":4000}]}

then my next step was to flatten the array into rows in order to clean the data. In this case, it will create 4 rows in total.

Now, I don't know how to merge rows based on name for example.

The function of merge is only to merge columns.

A (workaround) solution that I was able to come up with is to introduce a constant column using "derive" and then to pivot.

枢轴详细信息

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM