Query with date condition in Python
Hello,
I tried to extract data from domo with ds_query function. Would you be able to advise what sql should I use to filter data where date_column is greater than current date - 7 days?
query = "SELECT * FROM table WHERE date_column >= getdate() - 7"
df = domo.ds_query(dataset_id=dataset_id, query=query, return_data=True)
Much appreciated for any suggestion.
0
Answers
-
@AtitW I don't know the answer to your question, but trying building a dataset view (beta, ask your CSM) or just use ETL to subset your data.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1.1K Connectors
- 273 Workbench
- 1 Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 525 Datasets
- 2.1K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 434 Beast Mode
- 22 Variables
- 510 Automate
- 114 Apps
- 388 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 66 Manage
- 66 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 67 Community Announcements
- 4.8K Archive