Hello everybody,
Is there a work-around to format letters as bold in the BigQuery? I want to bold format the sentence "Share of transactions" within the following query. Been never able to do it... Tried "format" and "concat" operators mostly and they never worked in BQ. Any help would be really appreciated.
totals_YTD as (
select "Share of transactions" as KPI, t1.number_of_transactions_YTD/t2.total_number_of_transactions_YTD as YTD
from Main_YTD as t1
cross join tot_sales_info_CYTD as t2
There are two ways to bold in BigQuery:
**
symbol before and after the text you want to bold.FORMAT
function to format text with a specific font style.For example, to bold the text "Hello, world!", you could use either of the following queries:
SELECT **Hello, world!**
SELECT FORMAT(Hello, world!, 'bold')
The first query would return the text "Hello, world!" in bold, while the second query would return the text "Hello, world!" with a bold font style.
Neither of these work in BQ!! Is there any quotation mark missing or something?
The concept of "bold" is a function of where you are going to display the query results. For example in HTML it would be:
<b>Some Text</b>
while in Markdown it would be
**Some Text**
Where are the results of the query ending up that would show them boldened?
I just want to show the results of a query in BigQuery in bold, with a simple SELECT. Like
SELECT "Hello"
printing Hello.
I'm probably going to do a head slap when I see the final answer ... but here's whats going through my head. When we execute a SQL query, what we get back is a piece of data ... whether it is a single string or a collection of fields. What we do with that data is up to the caller of the SQL request. I am imagining an application performing the equivalent of
String response = SELECT "Hello" FROM "MYTABLE";
What we end up with is the data. Now comes the core question ... where are we running this query? Are we running it in the Cloud Console, in an application, as the back-end of a web page request? How we format the response from the query will be a function of where the response is going to be shown. Can you post back where you are running the query?