Skip to content

Commit 95d23e0

Browse files
authored
Merge pull request #986 from Tjev/single-dim-rs-fix
fix: support 1d vis table conversion
2 parents c4a6afe + 2b793df commit 95d23e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gooddata-sdk/gooddata_sdk/table.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ def _as_table(response: ExecutionResponse, always_two_dimensional: bool = False)
244244
first_page_offset = [0, 0]
245245
first_page_limit = [_TABLE_ROW_BATCH_SIZE, _MAX_METRICS]
246246

247-
if not always_two_dimensional:
247+
# always adjust paging based on presence of metrics/attrs if not always_two_dimensional
248+
# (behavior expected in FDW), otherwise, adjust if response contains only one-dimensional data
249+
if not always_two_dimensional or len(response.dimensions) == 1:
248250
if not response.exec_def.has_attributes():
249251
# there are no attributes, there shall be at most one row with the metrics, so get that as first page
250252
first_page_limit = [first_page_limit[1]]

0 commit comments

Comments
 (0)