Column resource not found - azure

I want list orphaned disk on my Azure but in the result I obtain this message :
'where' operator: Failed to resolve table or column expression named 'Resources'
I have taken the kql from internet and everybody use Resource has column to get result , I want to know why in my azure there is this error;
The column has the name changed ?
Thanks

Your workspace (or database) does not have a table or function called "Resources", you need to check the table list in the connection pane and see the tables you have, here is an example:

Related

Azure Data Factory concating syntax

I'm trying to run a pipeline that results a select with where be the system triggername system output.
I've tried to use :
#concat(concat(concat(concat('select * from ',item().DB_CARGA,'.',item().SC_CARGA,'.',item().tb_carga, 'where ' ,item().DS_CARGA ,'=', string(pipeline().TriggerName)))))
But I'm getting the following error:
Could anyone help me with the right syntax?
I reproduced this and got similar error when I used your syntax.
In your dynamic expression, there should be a space between table name and where and also trigger name should be enclosed in single quotes.
Please go through the below procedure to resolve the error.
First, I have a lookup activity which will give database name, table name and SQL table column(trigger column name). Give this to Foreach.
I have created sample tables with trigger_column column and gave some values.
In pipeline I have created trigger with same name mytrigger. Inside Foreach for my demo I have used lookup query. You can use your activity as per the requirement.
Dynamic content:
You can do this with single concat function.
#concat('select * from ',item().database,'.',item().table_name, ' where ' ,item().trigger_name ,'=','''',string(pipeline().TriggerName),'''')
This will give the SQL query like this when Executed.
Output when triggered:

Kentico - Unable to find a custom user column

I just took over a project from a developer who has already left an organisation and I'm doing some maintenance work in the project. I can see the following code in a custom web part
CurrentUserInfo CurrentUser = MembershipContext.AuthenticatedUser;
DateTime ExpirationDate = CurrentUser.GetValue("aps_expirationdate", DateTime.Now);
The strange thing is, I cannot seem to find this custom field 'aps_expirationdate' anywhere in the system or in the database.
I checked the following places but couldn't find it.
Checked Membership module 'User' class and 'User - Settings' class
Checked 'User' module
Did a manual Sql Search in the database to find a table with a column name 'aps_expirationdate'
but I cannot seem to find this column anywhere and the other strange thing is, when I debug the code it does return a date value. No bugs in the code so, cannot say that this is an invalid column name. Where else should I look?
Based on what you've put in your initial question, it sounds as if the column was added manually and not through the Kentico UI. In order for the data access layer or the Kentico API to know that field exists, the definition has to be stored within the Kentico module class and not just in the database.
Here's what I'd do to correct this:
Find what table the field exists in. If you want the custom field to be part of the User or User Settings objects then they need to be added to either the CMS_User or CMS_UserSetting table.
If the field does not exist in either the CMS_User or CMS_UserSetting table, then go to the Modules app in the Kentico UI.
In the Modules App, go to Membership > Classes > Users > Fields and add the aps_expirationdate field.
If you have data in the field aps_expirationdate in the other table, write a query to copy it from the other table to the CMS_User table.
Now the API call as noted above will work.
If the field is already in the CMS_User or CMS_UserSetting table, then you will have to do the following:
In SSMS, rename that field to aps_expirationdate_old.
In the Modules App, go to Membership > Classes > Users > Fields and add the aps_expirationdate field.
Assuming you have data in the aps_expirationdate_old field in the CMS_User or CMS_UserSetting table, write a query to copy it from the other table to the CMS_User table.
Your last bullet point states you "Did a manual Sql Search in the database to find a table with a column name 'aps_expirationdate'". This contradicts what you state at the end of your question which states "I cannot seem to find this column anywhere". If you cannot find what table the aps_expirationdate exists in, then check out the following SO answer to find that column in a given database.
https://stackoverflow.com/a/4849704/698678

Azure Data Factory passing a parameter into a function (string replace)

I'm trying to use ADF to create azure table storage tables from one source SQL table.
Within my pipeline..
I can query a distinct list of customers pass this into a for-each
task.
Inside the for each select the data for each customer
But when I try to to create an Azure table for each customers data with the table name based on the customer ID I hit errors.
The customer ID is a GUID so I'm trying to format this to remove the dashes which are invalid in a table name...
Something along the lines of
#replace('#{item().orgid}','-','')
So 7fb6d90f-2cc0-40f5-b4d0-00c82b9935c4 becomes 7fb6d90f2cc040f5b4d000c82b9935c4
I can't seem to get the syntax right
Any ideas?
try this: #replace(item().orgid,'-','').

Field name can not contain colon in mapping using Azure Data Factory to convert AWS S3 .csv to CosmosDb

I am trying to use Azure Data Factory to convert CSV data from an Amazon S3 bucket into JSON Document (collection) in CosmosDB. I get the error in the title - Field name can not contain colon in mapping - despite me having no colon that I can find in any of my column names, source or destination. Please help?
This error occurs when any name in column mapping contains colon.
Could you click the 'Code' button on the top right corner of the pipeline edit canvas, and check proproties -> activities -> typeProperties -> translator -> columnMappings, if there is any colon in key or value under it?
I find a colon in 'PostCode:' of the sink column. BTW, the validation for column mapping names will be removed in the next few weeks. For now you need to rename it to bypass the validation.

In Sharepoint KQL: How to query against List property with space in the name?

I'm trying to query against a SharePoint List using KQL including some properties of that list that have a space in their names.
Example:
Src State:"WA" Prod Id:"X12" SomeFreeText PATH:http://server/sites/items/New%20Items/*
The free-text filter works as expected when alone, but returns nothing when including those property filters, such as "Src State".
I assume that is a problem with the space in the name. So, I've tried changing the space to "%20" and to "x0020" and even enclosing the property name between quotes (single and double), but not results found!
What I'm missing?
If you want to run a KQL search on list it's a little bit more complex than just using the column name. KQL is a part of Search Service and the columns have to become managed properties. Managed property names cannot contain spaces. SharePoint automatically creates managed properties from site columns, but if the column is directly added to list (and not as a site column), then you have to create managed property manually in Search Administration.
So if the columns are site columns, then there is a specific naming convention on how the managed property names are created (https://technet.microsoft.com/en-us/library/jj613136.aspx). If "Src State" and "Prod Id" columns are simple (say Text, or Choice), then the following query should work:
SrcStateOWSTEXT:"WA" ProdIdOWSTEXT:"X12" SomeFreeText PATH:http://server/sites/items/New%20Items/*
If this doesn't work - please check the Search Schema in Search Administration whether the managed properties for these columns have been created. If not, then you will have to create them manually and ReIndex/ReCrawl list content. Instructions on how to do that are here: https://technet.microsoft.com/en-us/library/jj219667.aspx

Resources