# Code to access the component schema elements

Component schema elements are presented on a schema column name list (delimited by a dot "."). These elements are created and defined in components by users.

The below code composes an example to access some elements included in a component schema. In the following example, the ELT\_METADATA\_SHEMA variable name is used to get the component schema.

```
<%
String query = "select ";
SCHEMA(__ELT_METADATA_SHEMA__);
for (int i=0; i < __ELT_METADATA_SHEMA__.length ; i++) {
query += (__ELT_METADATA_SHEMA__[i].name + ",");
}
query += " from " + __TABLE_NAME__;
%>
<%=query %>;
```

In this example, and according to what you want to do, the \_\_ELT\_METADATA\_SHEMA\_\_[i].name code can be replaced by \_\_ELT\_METADATA\_SHEMA\_\_[i].dbType, \_\_ELT\_METADATA\_SHEMA\_\_ [i].isKey, \_\_ELT\_METADATA\_SHEMA\_\_[i].length or \_\_ELT\_METADATA\_SHEMA\_\_[i].nullable to access the other fields of the schema column.

The extract statement is SCHEMA(\_\_ELT\_METADATA\_SHEMA\_\_);. In this statement, ELT\_METADATA\_SHEMA is the variable name representing the schema parameter to be extracted. The variable name used in the code is just an example. You can change it to another variable name to represent the schema parameter you already defined.

Information noteWarning:

Make sure that the name you give to the schema parameter does not conflict with any name of other parameters.

For more information on component schema, see [Basic settings tab](https://help.qlik.com/talend/en-US/studio-user-guide/8.0/basic-settings-tab).