getConnectionsByIdSampleData method
Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: values} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
Parameters:
Implementation
Future<GetConnectionsById200Response?> getConnectionsByIdSampleData(String companyId, String connectionId,) async {
final response = await getConnectionsByIdSampleDataWithHttpInfo(companyId, connectionId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GetConnectionsById200Response',) as GetConnectionsById200Response;
}
return null;
}