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

Add repositories option to the snowtype configuration/flags #1075

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/collecting-data/code-generation/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Adds new Data Structures and Event Specifications in the `snowtype.config.json`
- `-p, --dataProductIds` Data Product ID/s.
- `-d, --dataStructures` Data structure schema URI/s.
- `-i, --igluCentralSchemas` Iglu central schema URI/s.
- `-r, --repositories` Local Data Structure repositories generated from the [snowplow-cli](/docs/understanding-tracking-design/managing-your-data-structures/cli/).


### `snowtype help`

Expand Down
8 changes: 8 additions & 0 deletions docs/collecting-data/code-generation/snowtype-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ The Snowtype CLI configuration can be saved in a `.json`, `.js`, or `.ts` file a

The schema tracking URLs for schemas available in [Iglu Central](http://iglucentral.com/).

### `repositories`

Local Data Structure repositories generated from the [snowplow-cli](/docs/understanding-tracking-design/managing-your-data-structures/cli/).

### `dataStructures`

The schema tracking URLs for Data Structures published in the Console.
Expand Down Expand Up @@ -89,6 +93,7 @@ _Keep in mind that CLI flags take precedence over configuration file options._
```json
{
"igluCentralSchemas": ["iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0"],
"repositories": ["../data-structures"],
"dataStructures": ["iglu:com.myorg/custom_web_page/jsonschema/1-1-0"],
"eventSpecificationIds": [
"a123456b-c222-11d1-e123-1f123456789g"
Expand All @@ -109,6 +114,7 @@ _Keep in mind that CLI flags take precedence over configuration file options._
```javascript
const config = {
"igluCentralSchemas": ["iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0"],
"repositories": ["../data-structures"],
"dataStructures": ["iglu:com.myorg/custom_web_page/jsonschema/1-1-0"],
"eventSpecificationIds": [
"a123456b-c222-11d1-e123-1f123456789g"
Expand Down Expand Up @@ -143,6 +149,7 @@ type SnowtypeConfig = {
outpath: string;
organizationId?: string;
igluCentralSchemas?: string[];
repositories?: string[];
dataStructures?: string[];
eventSpecificationIds?: string[];
dataProductIds?: string[];
Expand All @@ -168,6 +175,7 @@ type SnowtypeConfig = {

const config: SnowtypeConfig = {
"igluCentralSchemas": ["iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0"],
"repositories": ["../data-structures"],
"dataStructures": ["iglu:com.myorg/custom_web_page/jsonschema/1-1-0"],
"eventSpecificationIds": [
"a123456b-c222-11d1-e123-1f123456789g"
Expand Down
6 changes: 6 additions & 0 deletions docs/collecting-data/code-generation/using-the-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ To add a Data Structure to the code generation, either manually or through the `

Then you should add this Schema tracking URL to your configuration file `igluCentralSchemas` array.

### Local Data Structure Repositories

To add a local Data Structure repository to the code generation, either manually or through the `snowtype patch` command, you would only need the path/s to the repository/ies you have generated schemas using the [snowplow-cli](/docs/understanding-tracking-design/managing-your-data-structures/cli/).

Then you should add the path/s to your configuration file `repositories` array.

## Generating event specification instructions

When generating code for event specifications, you have the option of delivering the implementation instructions and triggers for each specification right on the developer's environment.
Expand Down