Hi All, I'm trying to create a google drive tap. w...
# troubleshooting
p
Hi All, I'm trying to create a google drive tap. when I'm invoking the tap for the stream given below, I'm receiving this error
2024-04-18 190640,291 | WARNING | tap-gdrive.files | Properties ('kind', 'incompleteSearch', 'files') were present in the 'files' stream but not found in catalog schema. Ignoring.
Copy code
class FilesStream(googleDriveStream):
    """Define custom stream."""
    name = "files"
    path = "/files"
    primary_keys: t.ClassVar[list[str]] = ["id"]
    replication_key = None
    # Optionally, you may also use `schema_filepath` in place of `schema`:
    # schema_filepath = SCHEMAS_DIR / "users.json"  # noqa: ERA001
    schema = th.PropertiesList(
        th.Property("name", th.StringType),
        th.Property(
            "id",
            th.StringType,
            description="The File's system ID",
        ),
        th.Property(
            "size",
            th.StringType,
            description="File size",
        ),
        th.Property(
            "originalFilename",
            th.StringType,
            description="File name",
        )
    ).to_dict()
Can somebody help me in knowing, If the issue because I'm not adding all the properties of json response in schema, and in case if it's the issue, is there a way to be selective in schema?
1
👀 1
r
If the issue because I'm not adding all the properties of json response in schema
Yes - since
PropertiesList
just wraps
ObjectType
, you can provide `additional_properties=True`: https://sdk.meltano.com/en/latest/classes/typing/singer_sdk.typing.ObjectType.html#singer_sdk.typing.ObjectType.__init__ Is there a reason you want to ignore those properties?
p
yeah, since the response has too many fields that I currently don't foresee use with.
r
Fair enough, guess that's what PRs are for. 😅 Are you planning on publishing this to Meltano Hub eventually?
p
currently making for a very specific usecase, may be in future with more general functionality that could qualify for publishing.
👍 1
hmm adding
additional_properties=True
is resulting in the same error.
Copy code
schema = th.PropertiesList(
                th.Property("name", th.StringType),
        th.Property(
            "id",
            th.StringType,
            description="The File's system ID",
        ),
        th.Property(
            "size",
            th.StringType,
            description="The user's age in years",
        ),
        th.Property(
            "originalFilename",
            th.StringType,
            description="The user's email address",
        ),
        additional_properties=True
        ).to_dict()
2024-04-18 20:50:22,413 | WARNING  | tap-gdrive.files     | Properties ('kind', 'incompleteSearch', 'files') were present in the 'files' stream but not found in catalog schema. Ignoring.
nvm it was an issue with
records_jsonpath
, working now thanks!
🙌 2
r
np 😉