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

Draft: State artifact specification #23

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

edgarrmondragon
Copy link
Member

@edgarrmondragon edgarrmondragon commented Oct 25, 2021

As described in #6, this describes Singer State artifacts which can be split between its constituent streams and combined again.

@edgarrmondragon edgarrmondragon changed the title Composable state artifacts SIP x: Composable state artifacts Oct 25, 2021
@edgarrmondragon edgarrmondragon changed the title SIP x: Composable state artifacts SIPXX - Composable state artifacts Oct 25, 2021
@edgarrmondragon edgarrmondragon self-assigned this Oct 25, 2021
@aaronsteers aaronsteers changed the title SIPXX - Composable state artifacts Draft: Composable state artifacts Oct 25, 2021
@edgarrmondragon edgarrmondragon marked this pull request as ready for review January 27, 2022 01:19
Comment on lines +31 to +65
{
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Singer State",
"description": "State payload format for Singer taps",
"type": "object",
"properties": {
"bookmarks": {
"title": "Stream Bookmarks",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^\\w+(\\/\\w+\\=[A-Za-z0-9_-]+)*$": {
"type": "object",
"additionalProperties": true,
"properties": {
"replication_key": {
"type": "string"
},
"replication_key_value": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
}
}
}
},
"additionalProperties": false
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronsteers I've added a JSON schema for a flat state where partitions follow the Spark/Hive pattern <table>/<key_1>=<value_1>/.../<key_n>=<value_n>

@edgarrmondragon edgarrmondragon changed the title Draft: Composable state artifacts Draft: State artifact specification Jan 27, 2022
@edgarrmondragon
Copy link
Member Author

https://www.jsonschemavalidator.net/ is nice to test the proposed schema against various state formats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant