{"id":25187698,"url":"https://github.com/ginokent/bqschema-gen-go","last_synced_at":"2025-05-07T14:31:26.320Z","repository":{"id":39802191,"uuid":"311721202","full_name":"ginokent/bqschema-gen-go","owner":"ginokent","description":"BigQuery table schema Go struct generator","archived":false,"fork":false,"pushed_at":"2025-03-17T09:51:48.000Z","size":72,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T11:01:38.615Z","etag":null,"topics":["bigquery","bigquery-schema","gcp","gcp-bigquery","go","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/ginokent/bqschema-gen-go","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ginokent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-10T16:35:57.000Z","updated_at":"2025-03-17T09:46:05.000Z","dependencies_parsed_at":"2022-08-30T04:52:54.834Z","dependency_job_id":null,"html_url":"https://github.com/ginokent/bqschema-gen-go","commit_stats":null,"previous_names":["djeeno/bqtableschema","djeeno/bqschema-gen-go","djeeno/bq-schema-gen-go","newtstat/bqschema-gen-go"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginokent%2Fbqschema-gen-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginokent%2Fbqschema-gen-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginokent%2Fbqschema-gen-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginokent%2Fbqschema-gen-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ginokent","download_url":"https://codeload.github.com/ginokent/bqschema-gen-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895472,"owners_count":21821167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","bigquery-schema","gcp","gcp-bigquery","go","golang"],"created_at":"2025-02-09T19:49:32.163Z","updated_at":"2025-05-07T14:31:26.298Z","avatar_url":"https://github.com/ginokent.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bqschema-gen-go\n\nBigQuery table schema Go struct generator\n\n[![main](https://github.com/ginokent/bqschema-gen-go/workflows/main/badge.svg)](https://github.com/ginokent/bqschema-gen-go/tree/main)\n[![codecov](https://codecov.io/gh/ginokent/bqschema-gen-go/branch/main/graph/badge.svg)](https://codecov.io/gh/ginokent/bqschema-gen-go)\n\n## generate\n\n#### How to generate\n\n```bash\ncd /path/to/your/golang-project-repository\n\n# Create a directory where bqschema-gen-go will generate the code.\nmkdir -p bqschema\ncd bqschema\n\n# Set GCP Project ID ref. https://console.cloud.google.com/bigquery?p=bigquery-public-data\u0026page=project\nexport GCLOUD_PROJECT_ID=bigquery-public-data\n# Set BigQuery Dataset name ref. https://console.cloud.google.com/bigquery?p=bigquery-public-data\u0026d=hacker_news\u0026page=dataset\nexport BIGQUERY_DATASET=hacker_news\n# Set output file\nexport OUTPUT_FILE=bqschema.generated.go\n# (Option) Set the required environment variables.\nexport GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount/keyfile.json\n\n# generate\ngo run github.com/ginokent/bqschema-gen-go\n```\n\nExample generated file content:  \n\n```go\n// Code generated by go run github.com/ginokent/bqschema-gen-go; DO NOT EDIT.\n\n//go:generate go run github.com/ginokent/bqschema-gen-go\n\npackage bqschema\n\nimport \"time\"\n\n// Comments is BigQuery Table `bigquery-public-data:hacker_news.comments` schema struct.\n// Description:\ntype Comments struct {\n\tId      int64     `bigquery:\"id\"`\n\tBy      string    `bigquery:\"by\"`\n\tAuthor  string    `bigquery:\"author\"`\n\tTime    int64     `bigquery:\"time\"`\n\tTime_ts time.Time `bigquery:\"time_ts\"`\n\tText    string    `bigquery:\"text\"`\n\tParent  int64     `bigquery:\"parent\"`\n\tDeleted bool      `bigquery:\"deleted\"`\n\tDead    bool      `bigquery:\"dead\"`\n\tRanking int64     `bigquery:\"ranking\"`\n}\n\n// Full is BigQuery Table `bigquery-public-data:hacker_news.full` schema struct.\n// Description: A full daily update of all the stories and comments in Hacker News.\ntype Full struct {\n\tTitle       string    `bigquery:\"title\"`\n\tUrl         string    `bigquery:\"url\"`\n\tText        string    `bigquery:\"text\"`\n\tDead        bool      `bigquery:\"dead\"`\n\tBy          string    `bigquery:\"by\"`\n\tScore       int64     `bigquery:\"score\"`\n\tTime        int64     `bigquery:\"time\"`\n\tTimestamp   time.Time `bigquery:\"timestamp\"`\n\tType        string    `bigquery:\"type\"`\n\tId          int64     `bigquery:\"id\"`\n\tParent      int64     `bigquery:\"parent\"`\n\tDescendants int64     `bigquery:\"descendants\"`\n\tRanking     int64     `bigquery:\"ranking\"`\n\tDeleted     bool      `bigquery:\"deleted\"`\n}\n\n// Full_201510 is BigQuery Table `bigquery-public-data:hacker_news.full_201510` schema struct.\n// Description:\ntype Full_201510 struct {\n\tBy          string `bigquery:\"by\"`\n\tScore       int64  `bigquery:\"score\"`\n\tTime        int64  `bigquery:\"time\"`\n\tTitle       string `bigquery:\"title\"`\n\tType        string `bigquery:\"type\"`\n\tUrl         string `bigquery:\"url\"`\n\tText        string `bigquery:\"text\"`\n\tParent      int64  `bigquery:\"parent\"`\n\tDeleted     bool   `bigquery:\"deleted\"`\n\tDead        bool   `bigquery:\"dead\"`\n\tDescendants int64  `bigquery:\"descendants\"`\n\tId          int64  `bigquery:\"id\"`\n\tRanking     int64  `bigquery:\"ranking\"`\n}\n\n// Stories is BigQuery Table `bigquery-public-data:hacker_news.stories` schema struct.\n// Description:\ntype Stories struct {\n\tId          int64     `bigquery:\"id\"`\n\tBy          string    `bigquery:\"by\"`\n\tScore       int64     `bigquery:\"score\"`\n\tTime        int64     `bigquery:\"time\"`\n\tTime_ts     time.Time `bigquery:\"time_ts\"`\n\tTitle       string    `bigquery:\"title\"`\n\tUrl         string    `bigquery:\"url\"`\n\tText        string    `bigquery:\"text\"`\n\tDeleted     bool      `bigquery:\"deleted\"`\n\tDead        bool      `bigquery:\"dead\"`\n\tDescendants int64     `bigquery:\"descendants\"`\n\tAuthor      string    `bigquery:\"author\"`\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginokent%2Fbqschema-gen-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fginokent%2Fbqschema-gen-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginokent%2Fbqschema-gen-go/lists"}