tap-mongodb icon indicating copy to clipboard operation
tap-mongodb copied to clipboard

no schema in --discover

Open sjcotto opened this issue 2 years ago • 1 comments

Hi,

I'm not able to generate the correct schema in the discovery / etl process, here is a simple example

Using mongo 5, standalone server.

I have this collection

{ "_id": { "$oid": "62c4373ebed325d5aecd7598" }, "name": "Todos los Hosts ", "description": "Este grupo será usado para todos los hosts", "createdBy": { "$oid": "62c425f81e1177ed03fb693b" }, "createdAt": { "$date": { "$numberLong": "1657026366116" } }, "updatedAt": { "$date": { "$numberLong": "1657026366116" } }, "__v": 0 }

meltano invoke tap-mongodb --discover > ~/catalog.json

outputs the following schema

{ "table_name": "groups", "stream": "groups", "metadata": [ { "breadcrumb": [], "metadata": { "table-key-properties": [ "_id" ], "database-name": "go-product", "row-count": 1, "is-view": false, "valid-replication-keys": [ "_id" ] } } ], "tap_stream_id": "go-product-groups", "schema": { "type": "object" } }

sjcotto avatar Jul 24 '22 13:07 sjcotto

so the schema is output like "schema": { "type": "object" }

i was expecting the keys of each column

sjcotto avatar Jul 24 '22 13:07 sjcotto