Custom SQL Changes
This applies to: Visual Data Discovery
Changes to the way Symphony creates sources and manages source configuration creation between Composer v6.9 and Composer v7.9 include changes to the Source API. One of the primary differences is how the user interface updates the source.
- In Composer v6.9, source updates from the user interface are done via PATCH.
- In Composer v7.9, these changes are done via PUT. PATCH is not supported.
The changes are indicated in the table below.
Precondition Scenario: A user has created a Custom SQL source with the following fields: field1, field2, field3, field4, field5.
ADD / REMOVE / REPLACE filed | Precondition: |
6.9 LTS PATCH api/sources/{sourceId} |
7.10 LTS PUT api/sources/{sourceId} |
---|---|---|---|
ADD - API |
User updates a source with custom SQL which has fields: field1, field2, field3, field4, field5, field6. Don't add field6 into the list of (native) fields. |
SQL query is updated.
|
SQL query is updated.
|
ADD |
User updates a source with custom SQL which has fields: field1, field2, field3, field4, field5, field6. Add field6 into the list of object/native field. |
SQL query changes are applied.
|
SQL query is updated.
|
ADD - API |
User updates a source with custom SQL which has fields: field1, field2, field3, field4, field5, field6. Don’t send the list of native fields. |
SQL query is updated.
|
SQL query is updated.
|
REMOVE - API |
field4 is not used (in filters, visuals etc.) Don’t change the sql query, but remove field4 from the list of (native) fields. |
|
|
REMOVE - API |
field4 is not used (in filters, visuals etc.). User removes field4 from the sql query and doesn’t set the list of native fields. |
SQL query is updated.
|
|
REMOVE |
field4 is not used (in filters, visuals etc.). field4 is not greyed out on Fields tab. User removes field field4 from the sql query. |
SQL query changes are applied.
|
|
REMOVE |
field1 is used by Visual1. field1 is greyed out on Fields tab. User removes field field1 from the SQL query. |
SQL query changes are applied.
If the user adds field1 back into the SQL query:
|
The source update fails. |
REMOVE |
field2 is used by Global Defaults. field2 is greyed out on Fields tab. User removes field2 from the SQL query. |
SQL query changes are applied.
If the user adds field2 back into the query, the field appears greyed out on Fields tab. |
The source update fails. |
REMOVE |
field3 is used by Chart Defaults. field3 is greyed out on Fields tab. User removes field3 from the SQL query. |
SQL query changes are applied.
|
Not applicable. |
REMOVE - Derived Field |
Existing source includes derived field field1 + field4. User updates a source with custom SQL which includes fields: field1, field2, field3, field6. Composer is not instructed what to do with field4. |
|
The source update fails. |
REPLACE |
Existing source includes chart default with field4 used for grouping. User updates a source with custom SQL which includes fields: field1, field2, field3, field6. Composer is not instructed what to do with field4. |
|
Not applicable. |
REPLACE |
Original query: SELECT
order_date and required_date have type
SELECT
|
|
The source is updated. |
REPLACE |
Original query:
SELECT
order_date is type TIME Option 2 query update:
SELECT
|
|
The source update fails. |
CHANGE TYPE |
field3 is type ATTRIBUTE. User updates a source with custom SQL which has fields: field1, field2, field3, field6. New field3 is NUMBER type instead of ATTRIBUTE type. Composer is not instructed what to do with field3. Sample query 1:
SELECT
Sample query 2:
SELECT
|
|
The source update fails. |
CHANGE TYPE |
field3 is type INTEGER. User updates a source with custom SQL which has fields: field1, field2, field3, field6. New field3 is type ATTRIBUTE. Composer is not instructed what to do with field3. |
|
The source update fails.
|