0 / 0
Creating an SQL query
Last updated: Dec 11, 2024
Creating an SQL query

You can customize a view of data and generate data joins by creating a data product with a query. To create a data product with a query, you must create and define an SQL query asset in a project, and then add it to a data product. By using queries, data products can be reused more frequently as producers can edit the SQL query on the same data products to generate different views.

Required roles
Collaborator roles: Editor

Create and define an SQL query as a data asset in a project. The query determines the contents of your data product.

  1. From the Data Product Hub navigation menu, click Projects > View all projects.
  2. Open or create a project. Then, click SQL: Create a dynamic view of data to add a query asset to the project.
  3. Complete the indicated fields to define the query. Enter the Preparation, SQL, and Cleanup statements.
  4. Click Create to connect your query with the indicated data connection. You can verify that your query was validated successfully by locating it in your project's assets page.

Adding a query to a data product

  1. From the Data Product Hub navigation menu, click New data product.
  2. Enter a name for the data product and click the Add from project tile.
  3. Click Select items and add your query. You can use the advanced filters to locate and add your query quickly from your list of data assets.
  4. Verify the connections of all assets. To verify a connection, click the connection status and complete the fields by providing credentials. Make sure that you use an appropriate set of credentials as these credentials are used to deliver the data product to consumers following a subscription.
  5. Click Create draft to confirm your data asset selection. When your draft is successfully created, a static visualization of your data product is generated and viewable by the consumer.

Next steps

After you create your data product draft, see Completing a data product to finish preparing your data product for publication.

Learn more

Creating a data product from a customizable query

Parent topic: Creating a data product