macro classfromPath extends Annotation with StaticAnnotation
Macro annotation for a path containing Avro files.
Generates case classes from a path which contains Avro files.
Path needs to represent a folder, hence it always needs to end with /.
Inside of the folder needs to exist at least one file matching *.avro glob.
Note that path must be a single string literal with optional .stripMargin at the end.
For example:
@AvroType.fromPath("gs://myBucket/myFolder/")
class MyRecord
or
@AvroType.fromPath(
"""
| gs://myBucket/myFolder/
| myLooooooooooooooooongPath/
""".stripMargin)
class MyRecord
Globs are supported as a part of the path. For example:
@AvroType.fromPath("gs://myBucket`/`*`/`*`/`*`/`")
class MyRecord
Also generate a companion object with convenience methods.
Macro annotation for a path containing Avro files.
Generates case classes from a path which contains Avro files. Path needs to represent a folder, hence it always needs to end with
/
. Inside of the folder needs to exist at least one file matching*.avro
glob.Note that path must be a single string literal with optional
.stripMargin
at the end. For example:or
Globs are supported as a part of the path. For example:
Also generate a companion object with convenience methods.