S3 Connector Files in Subdirectories
We're working on a pipeline that moves custom JSON log data from Cloudwatch to an S3 bucket using Kinesis Data Streams and Firehose (as explained here). This process will copy new log exports into a nested directory structure that represents the year/month/day/hour, for example:
/2024/02/20/01/file1.json
/2024/02/20/02/file2.json
/2024/02/20/03/file3.json
etc…
Is there a way to make any of the Domo S3 connectors process newly added files within these subdirectories automatically? In my initial testing, it seems that the standard S3 connector won't drill into subdirectories, and will only look in the specific path you've set.
Is our best solution to create a Lambda to copy/move all of these files out of the subdirectories into a processing directory?
P.S. We originally tried streaming from Cloudwatch to the JSON Webhook connector via a custom Lambda as recommended, but it's extremely fragile, providing no feedback on successes or failures (it just returns a 200 no matter what, even if the data didn't process) so this doesn't seem like a scalable or predictable solution.
Best Answer
-
Yeah, the code above could be used to create your own connector to AWS S3 and pull the files. The issue is that the default one doesn't seem to have the capabilities for your folder setup.
If you have the python/javascript knowledge or you have some internal devs you can show them the connector builder and the above code is most of the bones to pull that data from S3 to Domo for you.
That's likely the only path to take unfortunately.
Feel free to reach out over email if the above bit of code doesn't cut it/you would just rather someone else do it for ya.** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0
Answers
-
I have destructed some of my own code from a recent project to attempt to build you something that might solve your automation issues:
I have included the code below as "example.txt".
You will likely need to modify it slightly, but if you replace the secret variables I think it might just work as long as you hit the function.** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0 -
@MattTheGuru appreciate your response. That code might be useful for the AWS side of things but I'm not sure how to solve the issue on the domo side getting the S3 connector to pull files from subdirectories automatically. Do you have any thoughts on that?
0 -
Yeah, the code above could be used to create your own connector to AWS S3 and pull the files. The issue is that the default one doesn't seem to have the capabilities for your folder setup.
If you have the python/javascript knowledge or you have some internal devs you can show them the connector builder and the above code is most of the bones to pull that data from S3 to Domo for you.
That's likely the only path to take unfortunately.
Feel free to reach out over email if the above bit of code doesn't cut it/you would just rather someone else do it for ya.** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0 -
Got it. We might just write a Lambda that moves the files out of the S3 subdirectories into a "to_be_processed" directory, and then point the S3 connector at that one directory.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive