It will depend upon the number of rows returned. As long as the number of rows returned is under 1,000,000 then you will be fine. Note, the dataset can contain over 1,000,000 rows, as long as you aggregate the data in the query so that it returns less than 1,000,000 rows.
Here’s the link: Use Direct Query in Power BI Desktop
Here’s the direct quote from Microsoft’s documentation about the data limit:
“The 1-GB dataset limitation doesn’t apply to DirectQuery.”
And here’s the direct quote regarding row limits:
“ * There’s a one-million-row limit for cloud sources, with on-premises sources limited to a defined payload of about 4 MB per row (depending on proprietary compression algorithm) or 16MB data size for the entire visual. Certain limits may be raised when using Premium capacity. The limit doesn’t affect aggregations or calculations used to create the dataset returned using DirectQuery. It only affects the rows returned. Premium capacities can set maximum row limits, as described in this post.For example, you can aggregate 10 million rows with your query that runs on the data source. The query accurately returns the results of that aggregation to Power BI using DirectQuery if the returned Power BI data is less than 1 million rows. If over 1 million rows are returned from DirectQuery, Power BI returns an error (unless in Premium capacity, and the row count is under the admin-set limit).”