Alexander Shabunevich
09/11/2024, 1:41 PMschema = th.PropertiesList(
        th.Property(
            "id",
            th.IntegerType,
            required=True,
            nullable=False,
            description="The post's ID",
        ),
        th.Property(
            "title",
            th.StringType,
            required=True,
            nullable=True,
            description="The post's title",
        ),
        th.Property(
            "created_at",
            th.DateTimeType,
            required=True,
            nullable=False,
            description="The post's creation date",
        ),
    ).to_dict()config:
    stream_maps:     
        posts:
          __alias__: posts_v2
          __filter__: record['id'] != 3
          id_hashed: md5(str(record['id']))
          author: f'{fake.first_name()} {fake.last_name()}'
          title: __NULL__
          title_new: "' '.join([c.upper() for c in record['title'].replace(' ', '')])"
          year: int(datetime.datetime.strptime(record['created_at'], '%Y-%m-%dT%H:%M:%SZ').year)
          month: int(datetime.datetime.strptime(record['created_at'], '%Y-%m-%dT%H:%M:%SZ').month)
          day: int(datetime.datetime.strptime(record['created_at'], '%Y-%m-%dT%H:%M:%SZ').day){
  "type": "SCHEMA",
  "stream": "posts_v2",
  "schema": {
    "properties": {
      "id": {
        "description": "The post's ID",
        "type": [
          "integer"
        ]
      },
      "created_at": {
        "description": "The post's creation date",
        "format": "date-time",
        "type": [
          "string"
        ]
      },
      "id_hashed": {
        "type": [
          "string",
          "null"
        ]
      },
      "author": {
        "type": [
          "string",
          "null"
        ]
      },
      "title_new": {
        "type": [
          "string",
          "null"
        ]
      },
      "year": {
        "type": [
          "integer",
          "null"
        ]
      },
      "month": {
        "type": [
          "integer",
          "null"
        ]
      },
      "day": {
        "type": [
          "integer",
          "null"
        ]
      }
    },
    "type": "object",
    "required": [
      "id",
      "title",
      "created_at"
    ]
  },
  "key_properties": [
    "id"
  ],
  "bookmark_properties": [
    "id"
  ]
}visch
09/11/2024, 1:47 PMAlexander Shabunevich
09/11/2024, 1:50 PMAlexander Shabunevich
09/11/2024, 1:50 PMvisch
09/11/2024, 1:53 PMvisch
09/11/2024, 1:54 PMAlexander Shabunevich
09/11/2024, 1:57 PMAlexander Shabunevich
09/11/2024, 2:12 PM- name: tap-...
    inherit_from: ...
    schema:
      posts_v2:
        id:
          type: ["integer"]
        id_hashed:
          type: ["string"]
        title_new:
          type: ["string"]
        author:
          type: ["string"]
        created_at:
          type: ["string"]
          format: date-timehaleemur_ali
09/11/2024, 2:23 PMschema:
      posts_v2:
        title:
          type: ["string", "null"]
          required: falseAlexander Shabunevich
09/11/2024, 2:30 PMAlexander Shabunevich
09/11/2024, 2:31 PMAlexander Shabunevich
09/11/2024, 2:33 PM{
  "type": "SCHEMA",
  "stream": "posts_v2",
  "schema": {
    "properties": {
      "id": {
        "description": "The post's ID",
        "type": [
          "integer"
        ]
      },
      "created_at": {
        "description": "The post's creation date",
        "format": "date-time",
        "type": [
          "string"
        ]
      },
      "id_hashed": {
        "type": [
          "string",
          "null"
        ]
      },
      "author": {
        "type": [
          "string",
          "null"
        ]
      },
      "title_new": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "type": "object",
    "required": [
      "id",
      "title",
      "created_at"
    ]
  },
  "key_properties": [
    "id"
  ],
  "bookmark_properties": [
    "id"
  ]
}haleemur_ali
09/11/2024, 2:40 PMschemarequiredfalsetypeselect:
  - !posts_v2.typehaleemur_ali
09/11/2024, 2:42 PMAlexander Shabunevich
09/11/2024, 2:50 PMAlexander Shabunevich
09/11/2024, 2:50 PMhaleemur_ali
09/11/2024, 2:51 PM!posts.typeEdgar Ramírez (Arch.dev)
09/11/2024, 3:20 PMrequired=Truerequired{"properties": {"id": {"type": "integer"}, ...}, "required": ["id"]}Edgar Ramírez (Arch.dev)
09/11/2024, 3:20 PMEdgar Ramírez (Arch.dev)
09/11/2024, 3:34 PM