{"id":27627230,"url":"https://github.com/treasure-data/td-client-go","last_synced_at":"2025-08-03T16:38:13.617Z","repository":{"id":19692551,"uuid":"22947098","full_name":"treasure-data/td-client-go","owner":"treasure-data","description":"Go Client Library for Treasure Data","archived":false,"fork":false,"pushed_at":"2024-07-12T01:15:15.000Z","size":138,"stargazers_count":11,"open_issues_count":2,"forks_count":17,"subscribers_count":88,"default_branch":"master","last_synced_at":"2024-07-12T02:44:51.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.treasuredata.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treasure-data.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-14T08:41:41.000Z","updated_at":"2024-07-12T01:15:19.000Z","dependencies_parsed_at":"2024-06-19T00:08:57.280Z","dependency_job_id":"e4799cca-117a-4f41-b171-95071bb1ce44","html_url":"https://github.com/treasure-data/td-client-go","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treasure-data","download_url":"https://codeload.github.com/treasure-data/td-client-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250444244,"owners_count":21431612,"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":[],"created_at":"2025-04-23T13:53:42.938Z","updated_at":"2025-08-03T16:38:13.599Z","avatar_url":"https://github.com/treasure-data.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Treasure Data API client for Go\n===============================\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/treasure-data/td-client-go.svg)](https://pkg.go.dev/github.com/treasure-data/td-client-go)\n[![Build Status](https://github.com/treasure-data/td-client-go/actions/workflows/golang.yml/badge.svg)](https://github.com/treasure-data/td-client-go/actions/workflows/golang.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/treasure-data/td-client-go)](https://goreportcard.com/report/github.com/treasure-data/td-client-go)\n\nBuild\n-----\n* make\n  * To build code and run all the tests\n* make test-verbose\n  * To run tests verbosely\n* make help\n  * To describe targets\n* make clean\n  * To cleanup locally\n\nSynopsis\n--------\n\n```go\npackage main\n\nimport (\n\ttd_client \"github.com/treasure-data/td-client-go\"\n)\n\nfunc main() {\n\tclient, err := td_client.NewTDClient(td_client.Settings {\n\t\tApiKey: \"YOUR-API-KEY-HERE\",\n\t})\n\tif err != nil { ... }\n\tjobId, err := client.SubmitQuery(\"mydatabase\", td_client.Query {\n\t\tType: \"hive\",\n\t\tQuery: \"SELECT * FROM mytable WHERE value \u003e= 500\",\n\t})\n\tif err != nil { ... }\n\tfor {\n\t\tstatus, err := client.JobStatus(jobId)\n\t\tif err != nil { ... }\n\t\tif status != \"queued\" \u0026\u0026 status != \"running\" { break }\n\t\ttime.Sleep(1000000000)\n\t}\n\terr = client.JobResultEach(jobId, func(v interface{}) error {\n\t\tfmt.Printf(\"Result:%v\\n\", v)\n\t\treturn nil\n\t})\n\tif err != nil { ... }\n}\n```\n\nLicense\n-------\n\nCopyright (C) 2014 Treasure Data, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreasure-data%2Ftd-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-client-go/lists"}