gooddata-js v13.5.0

metadata Class

Defined in: src/metadata.ts:28
Module: metadata

Functions for working with metadata objects

Show:

createObject

(
  • projectId
  • obj
)

Defined in src/metadata.ts:797

Create object

Parameters

  • projectId String
  • obj String

    object definition

deleteObject

(
  • uri
)

Defined in src/metadata.ts:786

Delete object

Parameters

  • uri String

    of the object to be deleted

deleteVisualization

(
  • visualizationUri
)

Defined in src/metadata.ts:776

Delete visualization

Parameters

  • visualizationUri String

etlPull

(
  • projectId
  • uploadsDir
  • options
)

Defined in src/metadata.ts:855

ETL pull

Parameters

  • projectId String
  • uploadsDir String
  • options Object

    for polling (maxAttempts, pollStep)

getAttributes

(
  • projectId
)
Array

Defined in src/metadata.ts:219

Returns all attributes in a project specified by projectId param

Parameters

  • projectId String

    Project identifier

Returns

Array:

An array of attribute objects

getAvailableAttributes

(
  • projectId
  • metrics
)
Array

Defined in src/metadata.ts:342

Returns all attributes that are reachable (with respect to ldm of the project specified by the given projectId) for given metrics (also called as drillCrossPath)

Parameters

  • projectId String
    • Project identifier
  • metrics Array
    • An array of metric uris for which we want to get available attributes

Returns

Array:

An array of reachable attributes for the given metrics

getAvailableFacts

(
  • projectId
  • items
)
Array

Defined in src/metadata.ts:361

Returns all attributes that are reachable (with respect to ldm of the project specified by the given projectId) for given metrics (also called as drillCrossPath)

Parameters

  • projectId String
    • Project identifier
  • items Array
    • An array of metric or attribute uris for which we want to get available facts

Returns

Array:

An array of reachable facts for the given items

getAvailableMetrics

(
  • projectId
  • attrs
)
Array

Defined in src/metadata.ts:321

Returns all metrics that are reachable (with respect to ldm of the project specified by the given projectId) for given attributes

Parameters

  • projectId String
    • Project identifier
  • attrs Array
    • An array of attribute uris for which we want to get available metrics

Returns

Array:

An array of reachable metrics for the given attrs

getCommonAttributes

(
  • projectId
  • attributeUris
)
Promise

Provided by the sdk module.

Defined in src/ldm.ts:7

Get closest connecting attributes in the LDM by calling the "attributeupperbound" endpoint

Parameters

  • projectId String

    A project identifier

  • attributeUris Array

    Input list of attribute URIs

Returns

Promise:

Resolves with result list of attribute URIs

getDimensions

(
  • projectId
)
Array

Defined in src/metadata.ts:235

Returns all dimensions in a project specified by projectId param

Parameters

  • projectId String

    Project identifier

Returns

Array:

An array of dimension objects

getFacts

(
  • projectId
)
Array

Defined in src/metadata.ts:289

Returns all facts in a project specified by the given projectId

Parameters

  • projectId String

    Project identifier

Returns

Array:

An array of fact objects

getFolders

(
  • projectId
  • type
)
Array

Defined in src/metadata.ts:252

Returns project folders. Folders can be of specific types and you can specify the type you need by passing and optional type parameter

Parameters

  • projectId String
    • Project identifier
  • type String
    • Optional, possible values are metric, fact, attribute

Returns

Array:

An array of dimension objects

getFoldersWithItems

(
  • type
)
Array

Defined in src/metadata.ts:391

Get folders with items. Returns array of folders, each having a title and items property which is an array of corresponding items. Each item is either a metric or attribute, keeping its original verbose structure.

Parameters

  • type String

    type of folders to return

Returns

Array:

Array of folder object, each containing title and corresponding items.

getIdentifiersFromUris

(
  • projectId
  • uris
)
Array

Defined in src/metadata.ts:618

Get identifiers specified by uris

Parameters

  • projectId String

    id of the project

  • uris Array

    of the metadata objects

Returns

Array:

array of identifier + uri pairs

getMetrics

(
  • projectId
)
Array

Defined in src/metadata.ts:305

Returns all metrics in a project specified by the given projectId

Parameters

  • projectId String

    Project identifier

Returns

Array:

An array of metric objects

getObjectDetails

(
  • uri
)
Object

Defined in src/metadata.ts:380

Get details of a metadata object specified by its uri

Parameters

  • uri Object

    uri of the metadata object for which details are to be retrieved

Returns

Object:

object details

getObjectIdentifier

(
  • uri
)
String

Defined in src/metadata.ts:539

Get identifier of a metadata object identified by its uri

Parameters

  • uri Object

    uri of the metadata object for which the identifier is to be retrieved

Returns

String:

object identifier

getObjects

(
  • projectId
  • objectUris
)
Array

Defined in src/metadata.ts:37

Load all objects with given uris (use bulk loading instead of getting objects one by one)

Parameters

  • projectId String

    id of the project

  • objectUris Array

    array of uris for objects to be loaded

Returns

Array:

array of loaded elements

getObjectsByQuery

(
  • projectId
  • options
)
Promise

Defined in src/metadata.ts:88

Loads all objects by query (fetches all pages, one by one)

Parameters

  • projectId String

    id of the project

  • options Object

    (see https://developer.gooddata.com/api endpoint: /gdc/md/{project_id}/objects/query) - category {String} for example 'dataSets' or 'projectDashboard' - mode {String} 'enriched' or 'raw' - author {String} the URI of the author of the metadata objects - limit {number} default is 50 (also maximum) - deprecated {boolean} show also deprecated objects

Returns

Promise:

array of returned objects

getObjectUri

(
  • projectId
  • identifier
)
String

Defined in src/metadata.ts:566

Get uri of an metadata object, specified by its identifier and project id it belongs to

Parameters

  • projectId String

    id of the project

  • identifier Object

    identifier of the metadata object

Returns

String:

uri of the metadata object

getObjectUsing

(
  • projectId
  • uri
  • options
)
JQuery promise

Defined in src/metadata.ts:125

Get MD objects from using2 resource. Include only objects of given types and take care about fetching only nearest objects if requested.

Parameters

  • projectId String

    id of the project

  • uri String

    uri of the object for which dependencies are to be found

  • options Object

    objects with options: - types {Array} array of strings with object types to be included - nearest {Boolean} whether to include only nearest dependencies

Returns

JQuery promise:

promise promise once resolved returns an array of entries returned by using2 resource

getObjectUsingMany

(
  • projectId
  • uris
  • options
)
JQuery promise

Defined in src/metadata.ts:162

Get MD objects from using2 resource. Include only objects of given types and take care about fetching only nearest objects if requested.

Parameters

  • projectId String

    id of the project

  • uris Array

    uris of objects for which dependencies are to be found

  • options Object

    objects with options: - types {Array} array of strings with object types to be included - nearest {Boolean} whether to include only nearest dependencies

Returns

JQuery promise:

promise promise once resolved returns an array of entries returned by using2 resource

getUrisFromIdentifiers

(
  • projectId
  • identifiers
)
Array

Defined in src/metadata.ts:597

Get uris specified by identifiers

Parameters

  • projectId String

    id of the project

  • identifiers Array

    identifiers of the metadata objects

Returns

Array:

array of identifier + uri pairs

getValidElements

(
  • projectId
  • id
  • options
)
Object

Defined in src/metadata.ts:669

Get valid elements of an attribute, specified by its identifier and project id it belongs to

Parameters

  • projectId String

    id of the project

  • id Object

    display form id of the metadata object

  • options Object

    objects with options: - limit {Number} - offset {Number} - order {String} 'asc' or 'desc' - filter {String} - prompt {String} - uris {Array} - complement {Boolean} - includeTotalCountWithoutFilters {Boolean} - restrictiveDefinition {String} - afm {Object}

Returns

Object:

ValidElements response with: - items {Array} elements - paging {Object} - elementsMeta {Object}

getVisualization

(
  • visualizationUri
)

Defined in src/metadata.ts:731

Get visualization by Uri and process data

Parameters

  • visualizationUri String

getVisualizations

(
  • projectId
)
Array

Defined in src/metadata.ts:203

Returns all visualizationObjects metadata in a project specified by projectId param

Parameters

  • projectId String

    Project identifier

Returns

Array:

An array of visualization objects metadata

ldmManage

(
  • projectId
  • maql
  • options
)

Defined in src/metadata.ts:830

LDM manage

Parameters

  • projectId String
  • maql String
  • options Object

    for polling (maxAttempts, pollStep)

saveVisualization

(
  • visualizationUri
)

Defined in src/metadata.ts:750

Save visualization

Parameters

  • visualizationUri String

updateObject

(
  • projectId
  • visualizationUri
  • obj
)

Defined in src/metadata.ts:813

Update object

Parameters

  • projectId String
  • visualizationUri String
  • obj String

    object definition

updateVisualization

(
  • visualizationUri
)

Defined in src/metadata.ts:761

Update visualization

Parameters

  • visualizationUri String