I'm looking to implement an Athena federated query custom connector using
the arrow js lib.  I'm getting stuck on figuring out how to encode a Schema
properly for the Athena GetTableResponse.  I have found an example using
python that does something like this.. (paraphrasing...)

import pyarrow as pa
.....
       return {
            "@type": "GetTableResponse",
            "catalogName": self.catalogName,
            "tableName": {'schemaName': self.databaseName, 'tableName':
self.tableName},
            "schema": {"schema":
base64.b64encode(pa.schema(....args...).serialize().slice(4)).decode("utf-8")},
            "partitionColumns": self.partitions,
            "requestType": self.request_type
        }
What i'm looking for is the js equivalent of
pa.schema(....args...).serialize()

Is there one?  If not, could someone point me in the right direction of how
to code up something similar?

Reply via email to