课程: Intermediate SQL for Data Scientists

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Solution: Query a JSON column

Solution: Query a JSON column

(upbeat instrumental music) - [Instructor] Okay, here's the solution. I'm creating a select statement, and I'm returning the primary key as well. But the JSON structure is in a column called response. So, I want a particular attribute within that JSON structure. So, I need to specify a path to it, which in this case is data. And then within the data substructure, I want to get the metadata structure within there. And then from there, I want to get source, and I want an alias that results as source. So, if I just run that, we'll see that I get the source. And the source is user_api. So, that's an example of how we can query the source attribute from a table using JSON.

内容