Skip to contents

This function extracts the "datasources" attribute from a connectors object.

Usage

datasources(connectors)

Arguments

connectors

An object containing connectors with a "datasources" attribute.

Value

An object containing the data sources extracted from the "datasources" attribute.

Details

The function uses the attr() function to access the "datasources" attribute of the connectors object. It directly returns this attribute without any modification.

Examples

# Assume we have a 'mock_connectors' object with a 'datasources' attribute
mock_connectors <- structure(list(), class = "connectors" )
attr(mock_connectors, "datasources") <- list(source1 = "data1", source2 = "data2")

# Using the function
result <- datasources(mock_connectors)
print(result)
#> $source1
#> [1] "data1"
#> 
#> $source2
#> [1] "data2"
#>