Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigquery database dialect #196

Open
System-Glitch opened this issue Jun 11, 2024 · 7 comments
Open

Bigquery database dialect #196

System-Glitch opened this issue Jun 11, 2024 · 7 comments
Assignees
Labels
feature request Request for new feature implementation good first issue Good for newcomers

Comments

@System-Glitch
Copy link
Member

Create a new database dialect to support Gorm's official Bigquery driver.

@System-Glitch System-Glitch added good first issue Good for newcomers feature request Request for new feature implementation labels Jun 11, 2024
@pn03
Copy link

pn03 commented Dec 15, 2024

Hey @System-Glitch I have recently started working with Go Web Frameworks.

I am interested in working on this issue.

Let me know if it's still open and not assigned to anyone internally.

Thanks

@System-Glitch
Copy link
Member Author

Hello @pn03 and thanks for your interest! This issue is still open, you can start working on it if you want.

Feel free to contact me if you need any help or guidance.

@pn03
Copy link

pn03 commented Dec 15, 2024

Hey @System-Glitch thanks for the quick response.
I have started working on it. I am perusing code right now, I'll contact you if I am stuck anywhere

@pn03
Copy link

pn03 commented Dec 16, 2024

Hey @System-Glitch I have looked into the code of bigquery driver via link present in the issue.

I have written below template string for the bigquery resource.

func init() {
	database.RegisterDialect("bigquery", "bigquery://{projectID}/{location}/{dataSet}?{options}", bigquery.Open)
}

The {options} here corresponds to many options that BigQuery provides such as disable_auth, credentials_json, endpoint etc. For example

bigquery://projectID/location/dataset?endpoint=value1&disable_auth=false&credential_file=/etc/certs/private.key&credential_json=base64EncodedJSONString

configuration values of projectID, location etc need to provided in config/config.json of goyave project, right?

Need your inputs on my trajectory here

@System-Glitch
Copy link
Member Author

System-Glitch commented Dec 16, 2024

The naming and connection string is indeed very different from the other drivers so far. We could use:

  • {host} for the project ID and location
  • {name} for the dataset

But I'm not entirely satisfied by the host part, since "projectID/location" isn't really a host.

Alternatively, we could do just like sqlite and just use the {name} placeholder. It would make more sense to me.

Finally, we could add new placeholders and their associated configuration entries but I'm not a fan of this solution neither.

@pn03
Copy link

pn03 commented Dec 25, 2024

Hey @System-Glitch sorry, I have been a little busy at my work place. I'll work on this next week and get back to you.

Wish you Happy Christmas and a Happy New Year !!

@System-Glitch
Copy link
Member Author

Hey @System-Glitch sorry, I have been a little busy at my work place. I'll work on this next week and get back to you.

Wish you Happy Christmas and a Happy New Year !!

Of course no problem! Have a wonderful end of the year!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new feature implementation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants