MicroStrategy ONE

Use Auto SQL to Create Freeform SQL Tables

MicroStrategy ONE Update 10 introduced the ability to use auto SQL to create Freeform tables as a preview feature. Starting in MicroStrategy 2021 Update 11, this feature is shipped out-of-the-box.

Using Auto SQL to create Freeform SQL tables is supported in MicroStrategy Cloud environments and starting in MicroStrategy ONE (March 2024), Auto SQL is supported on the MicroStrategy Cloud for Government platform. You can only use this feature in Workstation.

Auto SQL is an AI-integrated tool within the schema editor designed for efficient SQL generation and editing. By interpreting natural language inputs, it can help produce and modify complex Freeform SQL table definitions. When presented with an existing SQL statement, Auto SQL provides a clear and concise summary of its functionality. Additionally, for databases like Snowflake that require specific SQL writing conventions, it offers optimization recommendations to enhance performance and compliance.

Auto SQL is part of the MicroStrategy AI add-on bundle and is available for MicroStrategy Cloud Environment (MCE) customers starting in MicroStrategy ONE Update 11 (September 2023). Only users and user groups with the Use Auto Assistant and ML Visualizations privilege, as well as an Administrator set of privileges required to edit the schema and Freeform SQL can access Auto SQL.

  1. Open Workstation.

  2. In the Navigation pane, click  Schemas.

  3. Right-click the schema in which you want to create a custom logical table and choose Edit.

  4. In the left pane, select a data source from Data Catalog.

  5. Connect to your data source.

  6. Click Add free-form SQL.

    The Auto SQL appears in the top right corner.

  7. Right-click a table and choose Add to the Chat to send specified tables to Auto SQL. If necessary, you can multi-select multiple tables.

    This step is highly recommended, as large schemas may not be compatible with the maximum token limit for the service.

  8. Enter your question.

    Auto SQL generates the SQL for you.

  9. Use the Insert button to automatically send generated SQL into the Freeform SQL input field in the Schema Editor.

  10. Verify the generated SQL and make an necessary adjustments, if necessary.

  11. Click Execute SQL. View the results in the table preview.