I am trying to transfer data from an on premises postgres db into big query via a data transfer. This works great for dbs with a standard naming convention or with underscores _ in the name however I have a number of dbs with hyphens - in the name which it won't accept and I can't seem to escape the db name with "" or any other characters. Short of renaming all my databases it there anything else that can be done?
Hi @sbrowninventore,
Welcome to Google Cloud Community!
Based on the BigQuery dataset naming guidelines, BigQuery doesn’t allow hyphens in dataset names because they can interfere with SQL parsing. To work around this, you could either rename your databases to use underscores instead of hyphens, or you may try to automate the naming process using a custom script or the BigQuery API to handle the transfer without needing to rename everything manually. Just keep in mind that dataset names must start with a letter and only contain letters, numbers, and underscores, so sticking to those conventions will help ensure smooth transfers.
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.