getConnectionsByIdSampleDataWithHttpInfo method

Future<Response> getConnectionsByIdSampleDataWithHttpInfo(
  1. String companyId,
  2. String connectionId
)

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.

Note: This method returns the HTTP Response.

Parameters:

  • String companyId (required): Unique identifier for the Company

  • String connectionId (required): Unique identifier for the Connection

Implementation

Future<Response> getConnectionsByIdSampleDataWithHttpInfo(String companyId, String connectionId,) async {
  // ignore: prefer_const_declarations
  final path = r'/companies/{company_id}/connections/{connection_id}/sample-data'
    .replaceAll('{company_id}', companyId)
    .replaceAll('{connection_id}', connectionId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}