Main Content

haverdirect

Create Haver Analytics DLX Direct cloud connection

Since R2024a

    Description

    The haverdirect function creates a connection to a cloud instance of a Haver Analytics® database. Once you have created a haverdirect object, you can retrieve all historical data for a variable or historical data for a specific date range.

    From MATLAB®, you can retrieve data by following these steps:

    1. Create a Haver DLX Direct connection by using the haverdirect function.

    2. List variables by using the info function.

    3. Retrieve data by using the fetch function.

    Creation

    Description

    c = haverdirect(databasename) creates a connection to a cloud instance of a Haver Analytics database.

    example

    Input Arguments

    expand all

    Database name, specified as a character vector or string scalar. This argument sets the DatabaseName property.

    Example: "USECON"

    Properties

    expand all

    Database name, specified as a character vector or string scalar. This property is set by the databasename argument.

    Date and time data type, specified as a " " or "datetime". When you create a haverdirect object, the haverdirect function leaves this property unset. You can use dot notation to set this property manually.

    Example: c = haverdirect("USECON"); c.DatetimeType = "datetime"

    Data return format of the retrieved data, specified as " ", "table", or "timetable". When you create a haverdirect object, the haverdirect function leaves this property unset. You can use dot notation to set this property manually.

    Example: c = haverdirect("USECON"); c.DataReturnFormat = "timetable"

    Object Functions

    aggregationSet Haver Analytics aggregation mode
    fetchRequest data from Haver Analytics database
    getRetrieve properties from Haver Analytics connection objects
    infoRetrieve information about Haver Analytics variables
    isconnectionDetermine if connections to Haver Analytics data servers are valid
    nextinfoRetrieve information about next Haver Analytics variable
    closeClose Haver Analytics database

    Examples

    collapse all

    Create a connection to a Haver Analytics database by specifying a valid database name. In this example, replace USECON with the name of your database.

    databasename = "USECON";
    c = haverdirect(databasename)
    c = 
    
      haverdirect with properties:
    
            DatabaseName: "USECON"
            DatetimeType: ''
        DataReturnFormat: ''

    Version History

    Introduced in R2024a