ashish_kumar
04/27/2022, 2:08 PMtarget-snowflake
as the loader. Is there any sample to verify configspat_nadolny
04/27/2022, 2:13 PMashish_kumar
04/27/2022, 2:18 PMtap-mongodb.
How can i define which collections to select data from which can be loaded to snowflake.pat_nadolny
04/27/2022, 2:24 PMashish_kumar
04/27/2022, 3:37 PMmeltano elt tap-mongodb target-snowflake --job_id=mongodb-to-snowflake
it ends up error like this
2022-04-27T15:35:42.980628Z [info ] Environment 'dev' is active
2022-04-27T15:35:44.854645Z [info ] Running extract & load... job_id=mongodb-to-snowflake name=meltano run_id=3c9625f6-7690-4941-8b80-66fde46b3649
2022-04-27T15:35:45.163477Z [warning ] No state was found, complete import.
2022-04-27T15:36:00.018154Z [info ] time=2022-04-27 21:06:00 name=target_snowflake level=INFO message=Getting catalog objects from table cache... cmd_type=loader job_id=mongodb-to-snowflake name=target-snowflake run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.411455Z [info ] INFO Connected to MongoDB host: localhost:27017, version: 4.4.13 cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.412745Z [info ] INFO cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.413358Z [info ] cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.413693Z [info ] +Sync Summary-----------+--------------------+---------------+-------------+------------+-----------------+-----------------------+--------------------------+ cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.413986Z [info ] | database | collection | replication method | total records | write speed | total time | schemas written | schema build duration | percent building schemas | cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:02.414283Z [info ] +----------+------------+--------------------+---------------+-------------+------------+-----------------+-----------------------+--------------------------+ cmd_type=extractor job_id=mongodb-to-snowflake name=tap-mongodb run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:06.423487Z [info ] time=2022-04-27 21:06:06 name=target_snowflake level=WARNING message=No columns discovered in the schema "ANALYSIS.MELTANO_ASHISH" cmd_type=loader job_id=mongodb-to-snowflake name=target-snowflake run_id=3c9625f6-7690-4941-8b80-66fde46b3649 stdio=stderr
2022-04-27T15:36:06.548943Z [info ] Extract & load complete! job_id=mongodb-to-snowflake name=meltano run_id=3c9625f6-7690-4941-8b80-66fde46b3649
2022-04-27T15:36:06.549130Z [info ] Transformation skipped. job_id=mongodb-to-snowflake name=meltano run_id=3c9625f6-7690-4941-8b80-66fde46b3649
pat_nadolny
04/27/2022, 3:47 PMmeltano --log-level=debug invoke tap-mongodb
to see if youre getting data out of mongodb prior to loading it to snowflake, the debug logs might tell you more of whats going onashish_kumar
04/27/2022, 3:53 PMmeltano.yml
file how can i add which table is to be selected
extractors:
- name: tap-mongodb
select:
- tags.*
metadata:
'*':
replication-method: FULL_TABLE
pat_nadolny
04/27/2022, 3:54 PMashish_kumar
04/27/2022, 3:55 PM2022-04-27T15:49:32.038863Z [debug ] Setting '.streams[3].metadata[0].metadata.selected' to 'False'
2022-04-27T15:49:32.038890Z [debug ] Setting '.streams[3].metadata[0].metadata.replication-method' to 'FULL_TABLE'
2022-04-27T15:49:32.038926Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.table-key-properties[0]'
2022-04-27T15:49:32.038955Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.database-name'
2022-04-27T15:49:32.038984Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.row-count'
2022-04-27T15:49:32.039014Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.is-view'
2022-04-27T15:49:32.039044Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.valid-replication-keys[0]'
2022-04-27T15:49:32.039074Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.selected'
2022-04-27T15:49:32.039104Z [debug ] Skipping node at '.streams[3].metadata[0].metadata.replication-method'
2022-04-27T15:49:32.039134Z [debug ] Skipping node at '.streams[3].tap_stream_id'
2022-04-27T15:49:32.039167Z [debug ] Skipping node at '.streams[3].schema.type'
2022-04-27T15:49:32.039196Z [debug ] Skipping node at '.streams[3].selected'
2022-04-27T15:49:32.039224Z [debug ] Skipping node at '.streams[3].replication_method'
Running meltano --log-level=debug invoke tap-mongodb
gives output as aboveashish_kumar
04/28/2022, 3:47 PMtap-mongodb --config config.json --discover > catalog.json
Is there any clue to this error I am having hard time to fix this:
time=2022-04-28 19:28:41 name=singer level=CRITICAL message=localhost:27017: [Errno 54] Connection reset by peer
Traceback (most recent call last):
File "/Users/ashishkumar/Desktop/meltano/.venv/bin/tap-mongodb", line 8, in <module>
sys.exit(main())
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/tap_mongodb/__init__.py", line 395, in main
raise exc
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/tap_mongodb/__init__.py", line 392, in main
main_impl()
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/tap_mongodb/__init__.py", line 379, in main_impl
client.server_info().get('version', 'unknown'))
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1656, in server_info
return self.admin.command("buildinfo",
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/database.py", line 654, in command
with self.__client._socket_for_reads(
File "/Users/ashishkumar/opt/anaconda3/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1135, in _socket_for_reads
server = topology.select_server(read_preference)
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/topology.py", line 224, in select_server
return random.choice(self.select_servers(selector,
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/topology.py", line 183, in select_servers
server_descriptions = self._select_servers_loop(
File "/Users/ashishkumar/Desktop/meltano/.venv/lib/python3.9/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 54] Connection reset by peer