Skip to content

Commit

Permalink
chore: Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 9, 2024
1 parent 1129197 commit 7068e19
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions samples/sample_mapper/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class StreamTransform(InlineMapper):
),
),
required=True,
title="Stream Maps",
description="Stream maps",
),
).to_dict()
Expand Down
1 change: 1 addition & 0 deletions samples/sample_tap_bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class TapBigQuery(SQLTap):
"project_id",
th.StringType,
required=True,
title="Project ID",
description="GCP Project",
),
).to_dict()
Expand Down
5 changes: 5 additions & 0 deletions samples/sample_tap_csv/sample_tap_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,35 @@ class SampleTapCSV(FolderTap):
"delimiter",
th.StringType,
default=",",
title="Delimiter",
description="Field delimiter character.",
),
th.Property(
"quotechar",
th.StringType,
default='"',
title="Quote Character",
description="Quote character.",
),
th.Property(
"escapechar",
th.StringType,
default=None,
title="Escape Character",
description="Escape character.",
),
th.Property(
"doublequote",
th.BooleanType,
default=True,
title="Double Quote",
description="Whether quotechar inside a field should be doubled.",
),
th.Property(
"lineterminator",
th.StringType,
default="\r\n",
title="Line Terminator",
description="Line terminator character.",
),
).to_dict()
4 changes: 4 additions & 0 deletions samples/sample_tap_dummy_json/tap_dummyjson/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@ class TapDummyJSON(Tap):
"username",
th.StringType,
required=True,
title="DummyJSON Username",
description="Username for the API service",
),
th.Property(
"password",
th.StringType,
required=True,
secret=True, # Flag config as protected.
title="DummyJSON Password",
description="Password for the API service",
),
th.Property(
"start_date",
th.DateTimeType,
title="Start Date",
description="The earliest record date to sync",
),
th.Property(
"api_url",
th.StringType,
title="API URL",
default="https://dummyjson.com",
description="The base url for the API service",
),
Expand Down
12 changes: 8 additions & 4 deletions samples/sample_tap_gitlab/gitlab_tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ class SampleTapGitlab(Tap):

name: str = "sample-tap-gitlab"
config_jsonschema = PropertiesList(
Property("auth_token", StringType, required=True, secret=True),
Property("project_ids", ArrayType(StringType), required=True),
Property("group_ids", ArrayType(StringType), required=True),
Property("start_date", DateTimeType, required=True),
Property(
"auth_token", StringType, required=True, secret=True, title="Auth Token"
),
Property(
"project_ids", ArrayType(StringType), required=True, title="Project IDs"
),
Property("group_ids", ArrayType(StringType), required=True, title="Group IDs"),
Property("start_date", DateTimeType, required=True, title="Start Date"),
).to_dict()

def discover_streams(self) -> list[Stream]:
Expand Down
1 change: 1 addition & 0 deletions samples/sample_tap_sqlite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class SQLiteTap(SQLTap):
th.Property(
DB_PATH_CONFIG,
th.StringType,
title="Database Path",
description="The path to your SQLite database file(s).",
required=True,
examples=["./path/to/my.db", "/absolute/path/to/my.db"],
Expand Down
6 changes: 4 additions & 2 deletions samples/sample_target_csv/csv_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class SampleTargetCSV(Target):

name = "target-csv"
config_jsonschema = th.PropertiesList(
th.Property("target_folder", th.StringType, required=True),
th.Property("file_naming_scheme", th.StringType),
th.Property(
"target_folder", th.StringType, required=True, title="Target Folder"
),
th.Property("file_naming_scheme", th.StringType, title="File Naming Scheme"),
).to_dict()
default_sink_class = SampleCSVTargetSink
4 changes: 2 additions & 2 deletions samples/sample_target_parquet/parquet_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class SampleTargetParquet(Target):

name = "sample-target-parquet"
config_jsonschema = th.PropertiesList(
th.Property("filepath", th.StringType),
th.Property("file_naming_scheme", th.StringType),
th.Property("filepath", th.StringType, title="Output File Path"),
th.Property("file_naming_scheme", th.StringType, title="File Naming Scheme"),
).to_dict()
default_sink_class = SampleParquetTargetSink

Expand Down
1 change: 1 addition & 0 deletions samples/sample_target_sqlite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class SQLiteTarget(SQLTarget):
th.Property(
DB_PATH_CONFIG,
th.StringType,
title="Database Path",
description="The path to your SQLite database file(s).",
required=True,
),
Expand Down

0 comments on commit 7068e19

Please sign in to comment.