mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
* feat(salesforce): add sobjectNames field for multi-object selection Add support for specifying multiple Salesforce objects to ingest instead of just one or all. The new `sobjectNames` array field allows users to select specific objects (e.g., Contact, Account, Lead) without having to ingest all objects and filter them. Priority order: 1. sobjectNames (array) - if specified, use only these 2. sobjectName (string) - if specified and sobjectNames empty 3. All objects from describe() - if neither specified tableFilterPattern applies in all cases as a final filter. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la> * refactor: removed sobjectName field and added a migration for 1.11.8 to migrate sobjectName values to sobjectNames * fix: sobjectNames priority comment * refactor: sobjectNames changes in ts files * fix: yaml structure in test_salesforce * fix: test_salesforce.py - metadata as OpenMetadata object * fix: added new line in sql migrations * fix: sql migration serviceType --------- Signed-off-by: Aleksei Sviridkin <f@lex.la> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Keshav Mohta <keshavmohta09@gmail.com> Co-authored-by: Keshav Mohta <68001229+keshavmohta09@users.noreply.github.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
26 lines
No EOL
967 B
SQL
26 lines
No EOL
967 B
SQL
-- Migrate Salesforce connection from sobjectName (string) to sobjectNames (array)
|
|
-- Converts sobjectName to sobjectNames array and removes the old field
|
|
UPDATE dbservice_entity
|
|
SET
|
|
json = JSON_REMOVE (
|
|
JSON_SET (
|
|
json,
|
|
'$.connection.config.sobjectNames',
|
|
JSON_ARRAY (
|
|
JSON_UNQUOTE (
|
|
JSON_EXTRACT (json, '$.connection.config.sobjectName')
|
|
)
|
|
)
|
|
),
|
|
'$.connection.config.sobjectName'
|
|
)
|
|
WHERE
|
|
serviceType = 'Salesforce'
|
|
AND JSON_TYPE (
|
|
JSON_EXTRACT (json, '$.connection.config.sobjectName')
|
|
) != 'NULL';
|
|
|
|
-- Upgrade appliedAt to microsecond precision to match PostgreSQL behavior.
|
|
-- Without this, MySQL returns second-precision timestamps which cause spurious
|
|
-- diffs in JSON patch operations, leading to deserialization failures.
|
|
ALTER TABLE tag_usage MODIFY appliedAt TIMESTAMP(6) NULL DEFAULT CURRENT_TIMESTAMP(6); |