Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Add conversion of hyphen into underscore before setting STAGING_DATAS… #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private[bigquery] class BigQueryClient(conf: Configuration) {
private def stagingDataset(location: String): DatasetReference = {
// Create staging dataset if it does not already exist
val prefix = conf.get(STAGING_DATASET_PREFIX, STAGING_DATASET_PREFIX_DEFAULT)
conf.setIfUnset(STAGING_DATASET_ID, prefix + location.toLowerCase)
conf.setIfUnset(STAGING_DATASET_ID, prefix + location.toLowerCase.replaceAll("-", "_"))
val datasetId = conf.get(STAGING_DATASET_ID)
try {
bigquery.datasets().get(projectId, datasetId).execute()
Expand Down