课程: Intermediate SQL for Data Scientists

今天就学习课程吧!

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

Querying JSON data

Querying JSON data

- [Instructor] Okay, so now let's query our JSON data. So what I'm going to do is I'm going to select the ID and the response from API responses in the data side schema where the ID equals one. So let's run that. And as we expect, we get only ID one, which is the only column in the table, and then we have the JSON structure here. Now, let's say we want to get the person's name. Well, the name is within data and which is within user and then we have name. Well, we can do this by essentially building up a path that we use to walk through the JSON structure to get to the values that we're looking for. While we do that, using a notation where we have response and then a single dash and an arrow sign, and then as a string, the name of the embedded JSON structure, the substructure, in this case it's data. So let's see what happens when we return response data. Let's run that. Now this is a little bit different. We don't have like the success status or the 200 HTTP code. We just have the…

内容