obj_parent(path)

Returns the name of the folder in which the object at the given path is contained. (Available as of version 10.23)

Syntax

obj_parent(path)

Input

Argument Type Description
path text A path to an object (e.g., table, folder, query)

The path parameter can be a scalar value (e.g., pub.demo.retail.item) or the name of a column containing paths to objects.

If path is the empty string (e.g., ''), the function returns information corresponding to the root-level folder, which contains all of the top-level folders (e.g., pub, default, uploads).

Return Value

Returns a text value corresponding to the parent of the object at the specified path.

An error is returned if path is the empty string, since the root-level folder does not have a parent.

Returns an empty string if the path does not exist.

Example

The following example demonstrates the behavior of obj_parent(path) using the values in the example_path column specified via the <table> element.

<table cols="example_path">pub.demo.retail;
  pub.demo.retail.item;
  pub.demo.retail.selectionlib;
  pub.demo.retail.foo;
  default.doc.interactive.trsgsg_qa;
  default.doc.interactive.doc_lib;
  foo;
</table>
<col name="example_path" format="width:35"/>
<willbe name="obj_parent_result" value="obj_parent(example_path)"/>

Note: When the value of the path parameter is equal to the empty string, the function returns information corresponding to the root-level folder in the 1010data Insights Platform, which contains all of the top-level folders (e.g., pub, default, uploads).