Liking cljdoc? Tell your friends :D

metabase.sync.sync-metadata.fields.fetch-metadata

Logic for constructing a map of metadata from the Metabase application database that matches the form of DB metadata about Fields in a Table, and for fetching the DB metadata itself. This metadata is used by the logic in other metabase.sync.sync-metadata.fields.* namespaces to determine what sync operations need to be performed by comparing the differences in the two sets of Metadata.

Logic for constructing a map of metadata from the Metabase application database that matches the form of DB metadata
about Fields in a Table, and for fetching the DB metadata itself. This metadata is used by the logic in other
`metabase.sync.sync-metadata.fields.*` namespaces to determine what sync operations need to be performed by
comparing the differences in the two sets of Metadata.
raw docstring

db-metadataclj

(db-metadata database table)

Inputs: [database :- i/DatabaseInstance table :- i/TableInstance] Returns: #{i/TableMetadataField}

Fetch metadata about Fields belonging to a given TABLE directly from an external database by calling its driver's implementation of describe-table.

Inputs: [database :- i/DatabaseInstance table :- i/TableInstance]
Returns: #{i/TableMetadataField}

Fetch metadata about Fields belonging to a given TABLE directly from an external database by calling its
 driver's implementation of `describe-table`.
sourceraw docstring

fields->our-metadataclj

(fields->our-metadata fields)
(fields->our-metadata fields top-level-parent-id)

Inputs: ([fields :- (s/maybe [i/FieldInstance])] [fields :- (s/maybe [i/FieldInstance]) top-level-parent-id :- common/ParentID]) Returns: #{common/TableMetadataFieldWithID}

Given a sequence of Metabase Fields, format them and return them in a hierachy so the format matches the one db-metadata comes back in.

Inputs: ([fields :- (s/maybe [i/FieldInstance])] [fields :- (s/maybe [i/FieldInstance]) top-level-parent-id :- common/ParentID])
Returns: #{common/TableMetadataFieldWithID}

Given a sequence of Metabase Fields, format them and return them in a hierachy so the format matches the one
`db-metadata` comes back in.
sourceraw docstring

our-metadataclj

(our-metadata table)

Inputs: [table :- i/TableInstance] Returns: #{common/TableMetadataFieldWithID}

Return information we have about Fields for a table in the application database in (almost) exactly the same TableMetadataField format returned by describe-table.

Inputs: [table :- i/TableInstance]
Returns: #{common/TableMetadataFieldWithID}

Return information we have about Fields for a `table` in the application database in (almost) exactly the same
 `TableMetadataField` format returned by `describe-table`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close