DataEngine for .NET Standard | ComponentOne
Visual ETL & Data Analysis with Workbench / Get Data
In This Topic
    Get Data
    In This Topic

    In order to work with data in the C1DataEngine Workbench tool, you need to initialize C1DataEngine workspace.

    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 Data 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'. Click the IMPORT button. A spinning progress indicator appears. Once the import is complete, you can see a base table entry named 'Invoices'.

      Enter table name 

      You can observe few buttons, next to the Base Tables entry, such as Expand, Edit, View, Export, Delete and Import Base Table buttons. The Expand button allows you to expand the list of available columns in the base table entry, the Edit button lets the user edit the base table, the View button lets you view the base table data in a resizable grid, the Export lets the user export the data to CSV file format in the workspace folder, and the Delete button lets you delete the base table entry. An Import Base Table button lets the user add a new base table.

      Snapshot depicting the workbench with all buttons

    5. Click the Expand button 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 columns are displayed.

       Expand base table

    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 Create Query button 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.

      Expanded grid for query table

      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.

      Create categories in Workbench application

    4. Create another query from Queries panel by clicking the Create Query  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.

      Snapshot of gridview

      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.