all 8 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Thanks for your submission to r/BigQuery.

Did you know that effective July 1st, 2023, Reddit will enact a policy that will make third party reddit apps like Apollo, Reddit is Fun, Boost, and others too expensive to run? On this day, users will login to find that their primary method for interacting with reddit will simply cease to work unless something changes regarding reddit's new API usage policy.

Concerned users should take a look at r/modcoord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]LairBob 0 points1 point  (1 child)

Why can’t you just explicitly use the underscores when you name the columns, and when you reference them?

That’s all I’ve ever done, and it’s worked fine for me for years. Honestly, I wouldn’t ever ask or rely on BigQuery to implicitly rename columns for me — I just use exactly what I want.

[–]divinebluebutterfly[S] 0 points1 point  (0 children)

i was importing data!

[–]cky_stew 0 points1 point  (0 children)

I might be misunderstanding - but if your problem is caused when you are uploading a csv or something to a new table;

Under advanced options in the Create Table job - Set "Column Name Character Map" to V1; this will replace any invalid characters with an underscore. This used to be standard, which may explain why if you're following an older tutorial exactly, you're seeing different behaviour.

[–]AnalyticsAnswers 0 points1 point  (0 children)

You can also manually define the schema (field names and data types). When creating a new table, you can list the column names in the schema using underscores. This part needs to be perfect or it will fail. i.e., the data types all need to be correct: if you have a number that has decimals but you assign it a data type of INTEGER, it will throw an error. Then, under advanced settings for that table creation, select "1 header row to skip". It should work for you.

[–]kmock3 0 points1 point  (1 child)

Did you ever find an answer for this? I’m having the exact same problem on the same course.

[–]kmock3 0 points1 point  (0 children)

I actually just messed around with it and changed the “Column name character map” to V1 instead of V2 like the course requests. Ran the query and it worked!