We need to create descriptive aliases for fields. Ideally we would like to create views with alias with a space. Is this possible? How can we do this?
Example: SELECT word, word_count "Word Count" FROM [publicdata:samples.shakespeare] LIMIT 1000
Google BigQuery is not case sensitive, so all names default to lowercase.
If no character is specified, whitespaces are removed by default. LTRIM (value1[, value2]): LTRIM Function removes the character specified from the left i.e it only removes the leading characters that match value2. Similar to the TRIM Function if a character is not specified, it removes the whitespaces by default.
No, the rules for field names (and aliases) in BigQuery are quite simple, and I quote:
Fields must contain only letters, numbers, and underscores, start with a letter or underscore, and be at most 128 characters long.
As you see, spaces, quote characters, and other punctuation, are not allowed. Feel free to open a feature request at https://code.google.com/p/google-bigquery/ (explaining your use case, esp. why using underscores in lieu of spaces is not acceptable) -- or star an existing FR at https://code.google.com/p/google-bigquery/issues/list if it coincides with your requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With