{"id":17119157,"url":"https://github.com/regadas/scio-contextual","last_synced_at":"2025-07-09T17:05:40.877Z","repository":{"id":39851481,"uuid":"253102088","full_name":"regadas/scio-contextual","owner":"regadas","description":"Collection of additional string interpolators to use in your scio pipeline","archived":false,"fork":false,"pushed_at":"2024-08-19T19:19:14.000Z","size":98,"stargazers_count":2,"open_issues_count":12,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T21:37:24.624Z","etag":null,"topics":["gcp","scala","scio"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/regadas.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-04-04T21:28:37.000Z","updated_at":"2022-08-05T13:37:45.000Z","dependencies_parsed_at":"2023-02-15T13:16:16.801Z","dependency_job_id":null,"html_url":"https://github.com/regadas/scio-contextual","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regadas%2Fscio-contextual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regadas%2Fscio-contextual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regadas%2Fscio-contextual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regadas%2Fscio-contextual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regadas","download_url":"https://codeload.github.com/regadas/scio-contextual/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665609,"owners_count":21142121,"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":["gcp","scala","scio"],"created_at":"2024-10-14T17:56:25.953Z","updated_at":"2025-04-13T04:36:51.832Z","avatar_url":"https://github.com/regadas.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scio-contextual\n\n![build](https://github.com/regadas/scio-contextual/workflows/main/badge.svg)\n[![GitHub license](https://img.shields.io/github/license/regadas/scio-contextual.svg)](./LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/io.regadas/scio-contextual_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/io.regadas/scio-contextual_2.12)\n\nSmall library that adds some potencially useful string interpolators to use in your [scio](https://github.com/spotify/scio) pipeline when you need to have things interpreted at compile-time.\n\n```scala\nlibraryDependencies ++= Seq(\n  \"io.regadas\" %% \"scio-contextual\" % \"\u003cversion\u003e\"\n)\n```\n\n## Compatibility table\n\n| scio-contextual | scio  |\n|-----------------|-------|\n| 0.1.1           | 0.8.3 |\n| 0.1.0           | 0.8.3 |\n\n\n## Google BigQuery\n\n```scala\nimport io.regadas.scio.contextual.bigquery._\n```\n\n### Valid\n\n```scala\nspec\"projectid:datasetid.tableid\"\n// res0: com.spotify.scio.bigquery.Table.Spec = Spec(\n//   \"projectid:datasetid.tableid\"\n// )\n\nref\"\"\"\n{\n  \"datasetId\": \"dataset\",\n  \"projectId\":  \"project\",\n  \"tableId\": \"table\"  \n}\n\"\"\"\n// res1: com.spotify.scio.bigquery.Table.Ref = Ref(\n//   {\"datasetId\":\"dataset\",\"projectId\":\"project\",\"tableId\":\"table\"}\n// )\n```\n\n### Invalid\n\n```scala\n// project id needs to be at least 6 chars\nspec\"proj:datasetid.tableid\"\n// error: Table reference is not in [project_id]:[dataset_id].[table_id] format: proj:datasetid.tableid\n// spec\"proj:datasetid.tableid\"\n//      ^^^^^^^^^^^^^^^^^^^^^^^\n```\n\n## Google Cloud Pub/Sub\n\n```scala\nimport io.regadas.scio.contextual.pubsub._\n```\n\n### Valid\n\n```scala\nsubscription\"projects/project-id/subscriptions/subName\"\n// res3: String = \"projects/project-id/subscriptions/subName\"\n\ntopic\"projects/project-id/topics/name\"\n// res4: String = \"projects/project-id/topics/name\"\n```\n\n### Invalid\n\n```scala\n// invalid project id\n\nsubscription\"projects/proj/subscriptions/subName\"\n\ntopic\"projects/proj/topics/name\"\n// error: Illegal project name: needs to be [a-z][-a-z0-9:.]{4,61}[a-z0-9]\n// subscription\"projects/proj/subscriptions/subName\"\n//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n// error: Illegal project name: needs to be [a-z][-a-z0-9:.]{4,61}[a-z0-9]\n// topic\"projects/proj/topics/name\"\n//       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n```\n\n## Google Cloud Storage\n\n```scala\nimport io.regadas.scio.contextual.gcs._\n```\n\n### Valid\n\n```scala\ngcs\"gs://bucket/scio-contextual\"\n// res6: String = \"gs://bucket/scio-contextual\"\n```\n\n### Invalid\n\n```scala\n// invalid bucket\ngcs\"gs://bucket_/scio-contextual\"\n\ngcs\"gs://bu/scio-contextual\"\n\n// wrong schema\ngcs\"gcs://bucket/scio-contextual\"\n// error: invalid uri format: gs://[a-z0-9][-_a-z0-9.]+[a-z0-9](/.*)?\n// gcs\"gs://bucket_/scio-contextual\"\n//     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n// error: invalid uri format: gs://[a-z0-9][-_a-z0-9.]+[a-z0-9](/.*)?\n// gcs\"gs://bu/scio-contextual\"\n//     ^^^^^^^^^^^^^^^^^^^^^^^^\n// error: invalid uri format: gs://[a-z0-9][-_a-z0-9.]+[a-z0-9](/.*)?\n// gcs\"gcs://bucket/scio-contextual\"\n//     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregadas%2Fscio-contextual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregadas%2Fscio-contextual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregadas%2Fscio-contextual/lists"}