DataEngine for .NET Standard | ComponentOne
In This Topic
    C1DataEngine Workbench
    In This Topic

    C1DataEngine Workbench is an Electron application that supports the creation and visualization of C1DataEngine workspaces. The C1DataEngine Workbench works like a standalone tool for data analysis. Also, the user doesn't require any programming knowledge to work with this desktop application.

    The C1DataEngine Workbench tool provides many advantages for developers using C1DataEngine library in their .NET Core and .NET Standard applications:

    The C1DataEngine Workbench application is available for the following platforms:

    Platform Installer
    Windows C1DataEngine Workbench Setup.exe
    macOS C1DataEngine Workbench.dmg
    Linux C1DataEngine Workbench.AppImage
    Note: The C1ControlPanel installs only the C1DataEngine Workbench app for Windows. You can use it from the Start Menu. The user can also download the Workbench app for Mac and Linux.

    Getting Started with C1DataEngine Workbench

    To open the C1DataEngine Workbench application, double click the C1DataEngine Workbench Setup.exe. This launches the C1DataEngine Workbench application. The user can see a home screen with two tabs, Home and Workspace. You can also see links to Get Started blogs and Recent Workspaces (if any).

    Workbench

    Create Workspace

    Users can create DataEngine workspaces using the C1DataEngine Workbench application. Follow the steps below to create a workspace.

    1. Click the Workspace tab. A Select Folder dialog box appears.

      Workspace creation

    2. Select an empty folder to create a workspace.

      Note: The C1DataEngine workspaces are identified by the presence of a file named metadata.xml. If you select a folder that contains such a file, the application will attempt to open the workspace rather than create a new one.

    You have created a workspace. Hence, you will be directed to the Import Base Table screen, where you can import JSON, SQL or CSV data.

    Get From ODATA (JSON)

    Once you are redirected to the Import Base Table screen, you can see Base Tables and Queries columns in the left panel and tabs like PROVIDER, CONNECTION, COMMAND and REVIEW in the right panel.

    Let's say a user wants to import JSON data using the C1DataEngine Workbench application. In order to import JSON data, follow the steps below:

    1. Select the JSON data provider in the dropdown menu of the PROVIDER tab. Click the right arrow button to proceed to the next tab.

      data provider selection 

    2. Enter the following URI and JSON Path in the CONNECTION tab. Note that OData v4 returns results in JSON format by default.    

      URI

      JSON Path

      https://services.odata.org/V4/Northwind/Northwind.svc/Invoices

      $..value[*]

      Click the right arrow button to proceed to the next tab.

       right arrow button

    3. Edit the expressions in the COMMAND tab to specify the names of the columns to import. Click the right arrow button to proceed to the REVIEW tab.

      Review tab

    4. Enter a unique name for the base table in the REVIEW tab, for example, 'Invoices'.

      Enter table name 

    5. Click the IMPORT button. A spinning progress indicator appears. Once the import is complete, you can see a base table entry named 'Invoices'. Note that there appear three buttons, next to the Invoices entry, Edit, View and Delete buttons. The Edit button lets the user edit the base table, the View button lets you view the base table data in a resizable grid, and the Delete button lets you delete the base table. An Import Base Table button lets the user add a new base table.

      Click import button 

    6. Click the triangle icon that precedes it to expand the list of available columns. Click the View button to display the base table data in a resizable grid. Note that only the first 2000 rows are displayed.

       Open list of available columns

    Users can also customize the Base Table result set. This is explained in Customize Base Table and Query Data topic.

    Create Query

    After importing the Base Tables entry 'Invoices', let's say the user wants to create a query.

    You can create a query by following the steps below:

    1. Locate the Queries column on the left panel. Click the add icon expand button . You will be directed to the Create Query screen.

      Locate queries

    2. In the TABLES tab, select the Invoices Base Table in the top left cell of the grid, under the Table column. Click the right arrow button. Note that if you specify more than one table, you have to fill in the Join From and Join To columns for each secondary table.

       Tables tab

    3. In the COLUMNS tab, click the dropdown button in the top left grid cell. Select 'Country'. In the add new row, click the dropdown button and select 'ExtendedPrice'. In the Alias column for that row, enter 'Total'. In the Operation column for that row, select 'Sum'. Click the right arrow button to move to the next tab.

      Create query

    4. Click the right arrow button in the RANGES tab to move to the next Tab.

      Go to next tab

    5. Enter a unique name for the query in the REVIEW tab. Here, the name 'CountryTotals' has been used. Click the Create button.

      Enter unique name

      The text box at the bottom of the page is not editable, but shows the JSON data that will be used to create the query. Note that the user can copy the JSON string and use it in application code with the CreateQueryFromJsonString method of QueryFactory class.

    6. Expand the newly added CountryTotals node. Display the results by clicking its grid icon.

      Exapnd node

      Users can also customize the Query result set. This is explained in Customize Base Table and Query Data topic.

    Date and Time Aggregates

    Let's say the base table data contains date or time columns. In such a case, you can use date-specific functions in query definitions to aggregate by year, month, etc.

    Follow the steps below to create query result with date and time aggregates.

    1. Click the expand button on the right of the Queries panel. Select Invoices in the top left grid cell, under the Tables column in the TABLES tab. Click the right arrow button.

      Aggregate

    2. Fill the cells of the grid in the COLUMNS tab as given in the image below:

      Fill the cells in grid

      Note that when a row contains a date or time column, the Operation column dropdown contains two groups of values, Aggregate and Date/Time.

    3. Click the REVIEW tab, and enter 'CountryTotalsByYear' as the query name. Click the CREATE button.

      Enter query name

      The text box at the bottom of the page is not editable, but shows the JSON data that will be used to create the query. Note that the user can copy the JSON string and use it in application code with the CreateQueryFromJsonString method of QueryFactory class.

    4. Expand the newly added node under Queries. Click the grid icon to display the results.

      Display results

      Users can also customize the Query result set. This is explained in Customize Base Table and Query Data topic.

    Combine Data from Multiple Sources

    In this example, the current base table entry does not contain product category information. The user can import another table to create a join query.

    Follow the steps below to join queries.

    1. After changing the provider to JSON in the PROVIDER tab, enter the following URI and JSON path in the CONNECTION tab.

      URI

      JSON Path

      https://services.odata.org/v4/Northwind/Northwind.svc/Product_Sales_for_1997

      $..value[*]

    2. Modify the select statement in the COMMAND tab.

      Modify statement

      Click the right arrow button to move to the next tab.

    3. Enter 'Categories' as the base table name in the REVIEW tab. Click the IMPORT button. When the import is complete, you should see a base table entry named 'Categories'. Click the triangle icon to expand the list. Click the grid icon to display the base table data.

      import base table

    4. Add a query from Queries panel by clicking the  Add a query  button. Fill the cells in the grid under the TABLES tab as given in the image.

      Fill cells in table

    5. After clicking the right arrow button in the Tables tab, fill the cells in the grid under the COLUMNS tab as depicted in the image below.

      fill cells in the grid

    6. In the REVIEW tab, enter the query name as 'CategoryTotals'. Click CREATE button. The new query node gets added to the Queries panel. Display results by expanding and clicking the grid button.

      display result of query

      Users can also customize the Query result set. This is explained in Customize Base Table and Query Data topic.

      Note that the user can copy the JSON string and use it in application code with the CreateQueryFromJsonString method of QueryFactory class.

    Range Expressions and Filtering

    The user can also limit the scope of a query by specifying one or more range expressions. The following example depicts how a user can add a range to a join query. Note that you can also use ranges with single-table queries.

    Follow the steps below to create query result with range expressions.

    1. Add a query by clicking the  Add query  in the Queries table. Fill the cells in the grid under the TABLES tab as given in the image.

      Fill table

    2. Fill the cells in the grid under the COLUMNS tab as given in the image.

      Fill cells

    3. Fill the cells in the grid under the RANGES tab as given in the image. Here, as you can observe, we have filtered the Value 'Beverages' in the CategoryName Column using the Equal Operation.

      Fill cells under RANGES

    4. In the REVIEW tab, add the query name as 'BeverageTotals'. Click the CREATE button. The newly added query appears in the Queries panel. Display the results by clicking its grid icon.

      Add query named BeverageTotals

      Users can also customize the Query result set. This is explained in Customize Base Table and Query Data topic.

      Note that the user can copy the JSON string and use it in application code with the CreateQueryFromJsonString method of QueryFactory class.