The tap-google-analytics plugin leverages <a JSON ...
# singer-tap-development
m
The tap-google-analytics plugin leverages a JSON file containing default report definitions. I’m working on a tap that will make POST requests to an Elastic Search API. I think I’ll need to leverage that JSON file pattern as well to allow users of the tap to define their own search queries in JSON. Are there any conventions or best practices around this sort of “complex configuration as file”? Are any other taps using this pattern? (I do see that tap-csv seems to do basically the same thing with the
csv_files_definition
JSON filepath).
both https://github.com/MeltanoLabs/tap-google-analytics/blob/main/tap_google_analytics/tap.py#L85-L89 and https://github.com/MeltanoLabs/tap-csv/blob/main/tap_csv/tap.py#L41-L45 use the
StringType
property type - would there be benefit to a
FilePathType
that subclasses
StringType
for this sort of usage?
e
Hey Matt 👋. Would
FilePathType
have a special
format
or how would it extend
StringType
?
👋 1
m
I guess my thought was that FileType could do more specific validation (check that file exists - this would save each tap from having to implement that check itself?). But I’m largely unfamiliar with the SDK’s validation behaviors so I’m not sure if that’s possible.