'Not sure about the diagnostic but here is the bug:
Using this lib : cloud.google.com/go/bigquery, I'm inserting some events with a bigquery.Inserter.
The field is marked as a JsonField in the schema but when I'm using bq to query the emulator and check the json data here is what's going on.
$> bq --api http://0.0.0.0:9050 query --project_id=test "SELECT data FROM test_dataset.test_table"
+-----------------------------------------------------------------------------------+
| data |
+-----------------------------------------------------------------------------------+
| "{\"name\": \"Alice\",\"address\": {\"street\": \"A Ave\",\"city\": \"Aville\"}}" |
+-----------------------------------------------------------------------------------+
$> bq --api http://0.0.0.0:9050 query --project_id=test "SELECT data.lol.name FROM test_dataset.test_table"
+----------+
| name |
+----------+
| "Alice" |
+----------+
I could use any other value than lol and it would work.
The exact same code works ok on a real big query instance.
'Not sure about the diagnostic but here is the bug:
Using this lib : cloud.google.com/go/bigquery, I'm inserting some events with a bigquery.Inserter.
The field is marked as a JsonField in the schema but when I'm using bq to query the emulator and check the json data here is what's going on.
I could use any other value than lol and it would work.
The exact same code works ok on a real big query instance.