aodncore.table package

Submodules

aodncore.table.ff module

This module provides utility functions specifically related to frictionless framework / tableschema.

aodncore.table.ff.get_field_type(field)[source]

Find a field by name in translation table and return associated field type.

Parameters

field – A string containing the tableschema definition field type.

Returns

A string containing the associated postgresql field type if different - otherwise the passed in field param.

aodncore.table.ff.get_tableschema_descriptor(obj, name)[source]

Convenience function to return a valid tableschema definition.

Parameters
  • obj – A dict that is either the desired object or the parent of the desired object

  • name – A string containing name of the nested object (eg. ‘schema’)

Returns

A valid tableschema definition

Module contents

aodncore.table.get_field_type(field)[source]

Find a field by name in translation table and return associated field type.

Parameters

field – A string containing the tableschema definition field type.

Returns

A string containing the associated postgresql field type if different - otherwise the passed in field param.

aodncore.table.get_tableschema_descriptor(obj, name)[source]

Convenience function to return a valid tableschema definition.

Parameters
  • obj – A dict that is either the desired object or the parent of the desired object

  • name – A string containing name of the nested object (eg. ‘schema’)

Returns

A valid tableschema definition