GoogleCloudPlatform / data-science-on-gcp

Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017
Apache License 2.0
1.32k stars 712 forks source link

I cannot make the table definition for the federated source in chapter 4 #157

Closed TirendazAcademy closed 1 year ago

TirendazAcademy commented 2 years ago

Hi! I want to make the table definition as follows:

bq mk --external_table_definition= \
./airport_schema.json@CSV=gs://data-science-on-gcp/edition2/raw/airports.csv \
dsongcp.airports_gcs

But I am getting an error like this:

Error decoding external_table_definition. external_table_definition should either be the name of a JSON file or the text representation of an external table definition.

How I can solve this problem?

lakshmanok commented 2 years ago

The schema needs to be a JSON file. Use:

04_streaming/design/airport_schema.json

thanks, Lak

On Wed, Oct 5, 2022, 5:28 AM Tirendaz Academy @.***> wrote:

Hi! I want to make the table definition as follows:

bq mk --external_table_definition= \ .@.***=gs://data-science-on-gcp/edition2/raw/airports.csv \ dsongcp.airports_gcs

But I am getting an error like this:

Error decoding external_table_definition. external_table_definition should either be the name of a JSON file or the text representation of an external table definition.

How I can solve this problem?

— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/data-science-on-gcp/issues/157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJPZ62U2RBSIBSBYFVRUDWBVC2ZANCNFSM6AAAAAAQ5MW5DY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TirendazAcademy commented 2 years ago

Thank you for your feedback. I'll try this to solve my problem. Kind regards, Tirendaz