- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Forum
- :
- Re: Updating consumed entitlement (for custom matrix type) using business adapter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there any way we can update consumed Consumed entitlements field using business adapter ?
i can not find the Consumed entitlements property in Licenses adpater.
Regards,
Junaid Vengadan
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dug up an example of this to illustrate.
Say you have an adapter with an import named "ImportCustomMetricLicenseDetails" which obtains source data from a spreadsheet or database with a query like the following that identifies unique names and consumption counts for licenses which you know to have a type of "Custom Metric":
SELECT LicenseName, ConsumptionCount FROM ...
You could then add a custom object query such as the following in the adapter to update the consumption counts:
UPDATE sl
SET NumberInstalled = i.ConsumptionCount
FROM dbo.SoftwareLicense sl
JOIN #ECMImport_ImportCustomMetricLicenseDetails i ON i.LicenseName = sl.Name
If your adapter is configured to use a permanent table (rather than temporary table) to hold the staged source data then change the "#ECMImport_ImportCustomMetricLicenseDetails" table name to "ECMImport_ImportCustomMetricLicenseDetails".
Note that custom object queries like this can only be used with adapters that run in FlexNet Manager Suite On-premises; they cannot be used with FlexNet Manager Suite Cloud / FlexeraOne ITAM.
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at the following forum thread which discusses this topic: Update Custom Metric license consumption automatically? (using adapter or other means)
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ChrisG
Thanks a lot for the feedback.
but can we use this when we are using source as csv\xlsx ?
Seems the query mentioned in the article is for updating a fixed value.
Reagrds,
Junaid Vengadan
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need a source to "tsart the connections. If your source is a a csv with 2 columns, License Name and Manual consumption, import that to a physical table; then use the update script provide to set consumption using a join to your physical table.
Regards
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i think that is going to be a complex process.
As we can import other properties from csv to FNMP without using a intermediate physical table .
There should be something like temporary table like we have for other imports.
Regards,
Junaid Vengadan
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @emtmeta . Not complex at all. You just tick the box at the bottom of the properties tab - advanced properties, use physical table. Then you can work with that physical table using your other sql update queries.
Regards
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nico_Erasmus
yeah , that's sounds the correct and simple way, thanks mate 🙂
@ChrisG thanks for the quick reply as always , really appreciated .
Cheers,
Junaid Vendagan
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dug up an example of this to illustrate.
Say you have an adapter with an import named "ImportCustomMetricLicenseDetails" which obtains source data from a spreadsheet or database with a query like the following that identifies unique names and consumption counts for licenses which you know to have a type of "Custom Metric":
SELECT LicenseName, ConsumptionCount FROM ...
You could then add a custom object query such as the following in the adapter to update the consumption counts:
UPDATE sl
SET NumberInstalled = i.ConsumptionCount
FROM dbo.SoftwareLicense sl
JOIN #ECMImport_ImportCustomMetricLicenseDetails i ON i.LicenseName = sl.Name
If your adapter is configured to use a permanent table (rather than temporary table) to hold the staged source data then change the "#ECMImport_ImportCustomMetricLicenseDetails" table name to "ECMImport_ImportCustomMetricLicenseDetails".
Note that custom object queries like this can only be used with adapters that run in FlexNet Manager Suite On-premises; they cannot be used with FlexNet Manager Suite Cloud / FlexeraOne ITAM.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry i missed the last comment,
Yeah i have tried almost similar query and it worked.
i had special case to read only one column from a source table and hence i used select and update using single query.
Idea of physical table is really helpful
cheers,
junaid vengadan
