Skip to content

Commit b2ffb5d

Browse files
committed
Try parsing the gharchive jsons
1 parent 55c5ca7 commit b2ffb5d

File tree

8 files changed

+898
-16
lines changed

8 files changed

+898
-16
lines changed

meltano.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,33 @@ environments:
88
send_anonymous_usage_stats: false
99
plugins:
1010
extractors:
11-
- name: tap-github
12-
variant: meltanolabs
13-
pip_url: git+https://github.com/MeltanoLabs/tap-github.git
11+
- name: tap-gharchive
12+
namespace: tap_gharchive
13+
pip_url: -e .
14+
executable: tap-gharchive
1415
config:
16+
api_url: https://data.gharchive.org
17+
streams:
18+
- name: github_events
19+
path: /2023-10-01-0.json.gz
20+
primary_keys:
21+
- id
22+
schema:
23+
properties:
24+
type:
25+
type: string
26+
actor:
27+
type: object
28+
repo:
29+
type: object
30+
created_at:
31+
type: string
32+
org:
33+
type: object
34+
payload:
35+
type: object
1536
start_date: '2023-10-01'
16-
organizations:
17-
- nf-core
18-
select:
19-
- commits.* # For commit history
20-
- pull_requests.* # For PR activity
21-
- releases.* # For pipeline releases
22-
- contributors.* # For contributor list
23-
- stargazers.* # Optional: for tracking community growth
2437
loaders:
2538
- name: target-jsonl
2639
variant: andyh1203
2740
pip_url: target-jsonl
28-
- name: target-duckdb
29-
variant: jwills
30-
pip_url: target-duckdb~=0.6
31-
config:
32-
path: md:nf_core_dev
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"plugin_type": "extractors",
3+
"name": "tap-bigquery",
4+
"namespace": "tap_bigquery",
5+
"variant": "anelendata",
6+
"label": "BigQuery",
7+
"docs": "https://hub.meltano.com/extractors/tap-bigquery--anelendata",
8+
"repo": "https://github.com/anelendata/tap-bigquery",
9+
"pip_url": "tap-bigquery",
10+
"description": "BigQuery data warehouse extractor",
11+
"logo_url": "https://hub.meltano.com/assets/logos/extractors/bigquery.png",
12+
"capabilities": [
13+
"catalog",
14+
"discover",
15+
"state"
16+
],
17+
"settings_group_validation": [
18+
[
19+
"streams",
20+
"start_datetime",
21+
"credentials_path"
22+
]
23+
],
24+
"settings": [
25+
{
26+
"name": "streams",
27+
"kind": "array",
28+
"label": "Streams",
29+
"description": "Array of objects with `name`, `table`, `columns`, `datetime_key`, and `filters` keys:\n\n- `name`: The entity name, used by most loaders as the name of the table to be created.\n- `table`: Fully qualified table name in BigQuery, with format `` `<project>.<dataset>.<table>` ``. Since backticks have special meaning in YAML, values in `meltano.yml` should be wrapped in double quotes.\n- `columns`: Array of column names to select. Using `[\"*\"]` is not recommended as it can become very expensive for a table with a large number of columns.\n- `datetime_key`: Name of datetime column to use as [replication key](https://docs.meltano.com/guide/integration#replication-key).\n- `filters`: Optional array of `WHERE` clauses to filter extracted data, e.g. `\"column='value'\"`.\n"
30+
},
31+
{
32+
"name": "credentials_path",
33+
"env": "GOOGLE_APPLICATION_CREDENTIALS",
34+
"value": "$MELTANO_PROJECT_ROOT/client_secrets.json",
35+
"label": "Credentials Path",
36+
"description": "Fully qualified path to `client_secrets.json` for your service account.\n\nSee the [\"Activate the Google BigQuery API\" section of the repository's README](https://github.com/anelendata/tap-bigquery#step-1-activate-the-google-bigquery-api) and <https://cloud.google.com/docs/authentication/production>.\n\nBy default, this file is expected to be at the root of your project directory.\n"
37+
},
38+
{
39+
"name": "start_datetime",
40+
"kind": "date_iso8601",
41+
"label": "Start Datetime",
42+
"description": "Determines how much historical data will be extracted. Please be aware that the larger the time period and amount of data, the longer the initial extraction can be expected to take."
43+
},
44+
{
45+
"name": "end_datetime",
46+
"kind": "date_iso8601",
47+
"label": "End Datetime",
48+
"description": "Date up to when historical data will be extracted."
49+
},
50+
{
51+
"name": "limit",
52+
"kind": "integer",
53+
"label": "Limit",
54+
"description": "Limits the number of records returned in each stream, applied as a limit in the query."
55+
},
56+
{
57+
"name": "start_always_inclusive",
58+
"kind": "boolean",
59+
"value": true,
60+
"label": "Start Always Inclusive",
61+
"description": "When replicating incrementally, disable to only select records whose `datetime_key` is greater than the maximum value replicated in the last run, by excluding records whose timestamps match exactly. This could cause records to be missed that were created after the last run finished, but during the same second and with the same timestamp."
62+
}
63+
]
64+
}
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
{
2+
"plugin_type": "extractors",
3+
"name": "tap-github",
4+
"namespace": "tap_github",
5+
"variant": "meltanolabs",
6+
"label": "GitHub",
7+
"docs": "https://hub.meltano.com/extractors/tap-github--meltanolabs",
8+
"repo": "https://github.com/MeltanoLabs/tap-github",
9+
"pip_url": "meltanolabs-tap-github",
10+
"description": "Code hosting platform",
11+
"logo_url": "https://hub.meltano.com/assets/logos/extractors/github.png",
12+
"capabilities": [
13+
"about",
14+
"batch",
15+
"catalog",
16+
"discover",
17+
"schema-flattening",
18+
"state",
19+
"stream-maps"
20+
],
21+
"settings_group_validation": [
22+
[
23+
"repositories"
24+
],
25+
[
26+
"organizations"
27+
],
28+
[
29+
"searches"
30+
],
31+
[
32+
"user_usernames"
33+
],
34+
[
35+
"user_ids"
36+
]
37+
],
38+
"settings": [
39+
{
40+
"name": "additional_auth_tokens",
41+
"kind": "array",
42+
"label": "Additional Auth Tokens",
43+
"description": "List of GitHub tokens to authenticate with. Streams will loop through them when hitting rate limits."
44+
},
45+
{
46+
"name": "auth_app_keys",
47+
"kind": "array",
48+
"label": "Auth App Keys",
49+
"description": "List of GitHub App credentials to authenticate with. Each credential can be constructed by combining an App ID and App private key into the format `:app_id:;;-----BEGIN RSA PRIVATE KEY----- _YOUR_P_KEY_ -----END RSA PRIVATE KEY-----`."
50+
},
51+
{
52+
"name": "auth_token",
53+
"kind": "string",
54+
"label": "Auth Token",
55+
"description": "GitHub token to authenticate with.",
56+
"sensitive": true
57+
},
58+
{
59+
"name": "batch_config.encoding.compression",
60+
"kind": "options",
61+
"label": "Batch Compression Format",
62+
"description": "Compression format to use for batch files.",
63+
"options": [
64+
{
65+
"label": "GZIP",
66+
"value": "gzip"
67+
},
68+
{
69+
"label": "None",
70+
"value": "none"
71+
}
72+
]
73+
},
74+
{
75+
"name": "batch_config.encoding.format",
76+
"kind": "options",
77+
"label": "Batch Encoding Format",
78+
"description": "Format to use for batch files.",
79+
"options": [
80+
{
81+
"label": "JSONL",
82+
"value": "jsonl"
83+
},
84+
{
85+
"label": "Parquet",
86+
"value": "parquet"
87+
}
88+
]
89+
},
90+
{
91+
"name": "batch_config.storage.prefix",
92+
"kind": "string",
93+
"label": "Batch Storage Prefix",
94+
"description": "Prefix to use when writing batch files."
95+
},
96+
{
97+
"name": "batch_config.storage.root",
98+
"kind": "string",
99+
"label": "Batch Storage Root",
100+
"description": "Root path to use when writing batch files."
101+
},
102+
{
103+
"name": "expiry_time_buffer",
104+
"kind": "integer",
105+
"label": "Expiry Time Buffer"
106+
},
107+
{
108+
"name": "faker_config.locale",
109+
"kind": "array",
110+
"label": "Faker Locale",
111+
"description": "One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization"
112+
},
113+
{
114+
"name": "faker_config.seed",
115+
"kind": "string",
116+
"label": "Faker Seed",
117+
"description": "Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator"
118+
},
119+
{
120+
"name": "flattening_enabled",
121+
"kind": "boolean",
122+
"label": "Enable Schema Flattening",
123+
"description": "'True' to enable schema flattening and automatically expand nested properties."
124+
},
125+
{
126+
"name": "flattening_max_depth",
127+
"kind": "integer",
128+
"label": "Max Flattening Depth",
129+
"description": "The max depth to flatten schemas."
130+
},
131+
{
132+
"name": "metrics_log_level",
133+
"kind": "string",
134+
"label": "Metrics Log Level",
135+
"description": "The log level of the API response metrics."
136+
},
137+
{
138+
"name": "organizations",
139+
"kind": "array",
140+
"label": "Organizations",
141+
"description": "An array of strings containing the github organizations to be included"
142+
},
143+
{
144+
"name": "rate_limit_buffer",
145+
"kind": "integer",
146+
"label": "Rate Limit Buffer",
147+
"description": "Add a buffer to avoid consuming all query points for the token at hand. Defaults to 1000."
148+
},
149+
{
150+
"name": "repositories",
151+
"kind": "array",
152+
"label": "Repositories",
153+
"description": "An array of strings containing the github repos to be included"
154+
},
155+
{
156+
"name": "searches",
157+
"kind": "array",
158+
"label": "Searches",
159+
"description": "An array of search descriptor objects with the following properties. \"name\" - a human readable name for the search query. \"query\" - a github search string (generally the same as would come after ?q= in the URL)"
160+
},
161+
{
162+
"name": "skip_parent_streams",
163+
"kind": "boolean",
164+
"label": "Skip Parent Streams",
165+
"description": "Set to true to skip API calls for the parent streams (such as repositories) if it is not selected but children are"
166+
},
167+
{
168+
"name": "start_date",
169+
"kind": "date_iso8601",
170+
"label": "Start Date"
171+
},
172+
{
173+
"name": "stream_map_config",
174+
"kind": "object",
175+
"label": "Stream Map Config"
176+
},
177+
{
178+
"name": "stream_maps",
179+
"kind": "object",
180+
"label": "Stream Maps"
181+
},
182+
{
183+
"name": "stream_options.milestones.state",
184+
"kind": "options",
185+
"value": "open",
186+
"label": "Stream Options Milestones State",
187+
"description": "Configures which states are of interest. Must be one of [open, closed, all], defaults to open.",
188+
"options": [
189+
{
190+
"label": "Open",
191+
"value": "open"
192+
},
193+
{
194+
"label": "Closed",
195+
"value": "closed"
196+
},
197+
{
198+
"label": "All",
199+
"value": "all"
200+
}
201+
]
202+
},
203+
{
204+
"name": "user_agent",
205+
"kind": "string",
206+
"label": "User Agent"
207+
},
208+
{
209+
"name": "user_ids",
210+
"kind": "array",
211+
"label": "User IDs",
212+
"description": "A list of GitHub user ids."
213+
},
214+
{
215+
"name": "user_usernames",
216+
"kind": "array",
217+
"label": "User Usernames",
218+
"description": "A list of GithHub usernames."
219+
}
220+
],
221+
"select": [
222+
"*.*",
223+
"!traffic_*.*"
224+
]
225+
}

0 commit comments

Comments
 (0)