You can download your Google searches and they come in the form of several JSON files. I'm trying to parse them into the columns [TimeStamp] and [Query Text] with the SQL function OPENJSON
DECLARE @json as nvarchar(max)
SET @json = N'{"event":[{"query":{"id":[{"timestamp_usec":"1329003091748889"}],"query_text":"download google searches"}}]}'
SELECT * FROM OPENJSON(@json, N'$.event')
WITH (
[TimeStamp] nvarchar(max) N'$.query.timestamp_usec' ,
[QueryText] nvarchar(max) N'$.query.query_text'
)
Query text returns the result, but the timestamp simply reads NULL. What am I doing wrong?