We are having a scenario wherein we have a table which has the same name as one of its columns.
The table schema is not possible to be changed as it is consumed by a huge no of downstream users.
What can be a way out to be able to read the data from it successfully in GCP DATABRICKS ?
That’s a solid explanation when two tables share a column name, you can alias them directly using SELECT t1.column AS col, t2.column AS col2 or include the table name in your query to keep things unambiguous. For a similar scenario where users discussed managing table renames and column references using Terraform, check out this helpful thread:
https://www.googlecloudcommunity.com/gc/Data-Analytics/Renaming-table-in-BigQuery-using-terraform/m-...
Using clear aliases or fully qualified names (dataset.table.column) is the safest way to avoid conflicts and maintain readability.
Hi saurabhadhikary,
Welcome to the Google Cloud Community!
In addition to @johncarter12 insight’s, you may want to check this documentation, which provides detailed information on how to set up and use Databricks on Google Cloud to securely connect, read from, and write data to BigQuery tables using notebooks, covering configuration, deployment, and querying steps.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.