Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
raw_data = c3.BlockInfo.fetch(spec={
    'limit': -1,
    'filter': 'exists(prp_bf_lr)',
    'order': 'descending(id)',
    'include': 'pct_i_l,pct_t_l,prp_res_lr,pop10_ha_lr,hu10_ha_lr,eroom_ha_lr,med10_age,prp_bf_lr'
})

Another useful fetch command is fetchCount. This function is nearly identical to the fetch commands above, but it just returns a count of the number of objects which match the fetch filter. This is useful when trying to determine whether a given search is refined enough.

In the Javascript Console this is:

Code Block
BlockInfo.fetchCount({'filter': 'exists(prp_bf_lr)'})

The same in python is:

Code Block
c3.BlockInfo.fetchCount(spec={'filter': 'exists(prp_bf_lr)'})

More examples of fetch commands can be found in our examples here:be found in our examples here:

Here is a list of C3 documentation mentioning fetching:

  1. FetchSpec Documentation: https://developer.c3.ai/docs/7.12.0/type/FetchSpec
  2. Fetching in Python: https://

...

  1. developer.c3.

...

  1. ai/

...

  1. docs/7.12.0/topic/ds-jupyter-notebooks
  2. Fetch & Filtering: https://

...

  1. developer.c3.

...

  1. ai/

...

  1. docs/7.12.17/topic/tutorial-fetching-and-filtering
  2. Fetch & Filter Basics

Here is a list of C3 documentation mentioning fetching:

  1. FetchSpec Documentation: https://developer.c3.ai/docs/7.12.017/type/FetchSpectopic/console-data-exploration-fetch-and-filters
  2. Fetch & Filtering AdvancedFetching in Python: https://developer.c3.ai/docs/7.12.017/topic/ds-jupyter-notebooksconsole-fetch-and-filters-advanced

Converting Fetch results to usable forms in Jupyter Notebook

...