Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
Great to hear. Thanks for the feedback
Can you send your code snippet containing the is_new query?For reference, it should be a timestamp, we usually use lastUpdatedTimehttps://docs.cognite.com/cdf/integration/guides/transformation/write_sql_queries/#is_new
I think you should be able to do that by having a different pipeline trigger, for example deploy to test with a "pull request trigger", test it and merge it to master after approval which would then deploy to production
Not sure I fully understand the question, but if you need to deploy to separate projects, I guess you can add multiple “Deploy Functions to CDF” steps in the pipeline, each pointing to different secrets/clientID/tenantID
Once successfully logged in, you can use client.iam.token.inspect()to verify your capabilities.
Hi @joseLB When using Google Collab, you cannot sign in interactively via a browser and use the authenticate with interactive login and token refresh flow, you need to use another authentication method.Just scroll down a bit more to the section “Using Device Code” and run the code there. It will provide you an url and a code to connect in your browser. Hope that helps, let me know if any questions
yes, sorry datasets:list was a typo, i meant datasets:read However, you are not authenticating with your user since you are using clientID/client secretI will refer you for more information https://docs.cognite.com/cdf/access/concepts/authentication_flows_oidcFor your case, you need the app registration with client ID “d5912468-12f6-4b74-abe7-3948cf8d731a” to be also part of the Azure AD group. Also, since you shared a secret in the snippet above, I would recommend deleting that secret and regenerating a new one. If you would like to log in on behalf of your user, you can use this guide to set up an app registration for that, in this case you will not need a client secrethttps://docs.cognite.com/dev/guides/sdk/python/register_app_jupyter_sdk
I cannot see all the capabilities, but do you have “groups:list” and “project:list” as part of the capabilities? And for the code you are trying to run, you also need “datasets:list” (if you dont have it)Can you also share the code you use to create the client object?
Under projects, it should list the projects you have access to and then the capabilities for each of the project. So I would check if: you or the service account you are using is member of the Azure AD groups the Azure AD group is linked to the CDF group { "subject": "xxxxxxx", "projects": [ { "url_name": "project1", "groups": [ 123456789, 123456788, 123456787 ] }, { "url_name": "project2", "groups": [ 123456789, 123456788, 123456787 ] } ], "capabilities": [ { "projectsAcl": { "version": 1, "actions": [ "UPDATE", "LIST", "READ" ], "scope": { "all": {} } }, "projectScope": { "projects": [
Yes, so it looks like you have no capabilities,Which Azure AD group does your user belong to? And which CDF group is that AD group connected to? There is most likely something incorrect there
Can you try to run client.iam.token.inspect()it should list all the capabilities that you have
Hi, we have a released a new version (1.2.4)Let me know if you still have an issue or if that is fixed
Hi Chris,I guess the “to_timestamp” is not able to convert the DateTimeStamp on the specified formatIf you comment the last line again and print DateTimeStamp, something like thatdp.Tagname AS externalId,to_timestamp(DateTimeStamp, 'yyyy-M-d h:mm:ss') AS timestamp,DateTimeStamp as DateTimeStamp, cast(value AS double) And see what the format of DateTimeStamp look like, I would assume it is not 'yyyy-M-d h:mm:ss' ? You can also test that date you get directly with the timestamp function and try to find the right format. Potentially have to use something like what we suggested here? Let me know how the DateTimeStamp look like and we can see
If you want to update the timeseries and assign them to a different dataset, you can add this line(replacing 1234556 with the dataSetId of your dataset)1234556 as dataSetId,
Did you associate the timeseries to the dataset in the code of the transformation? The dataset of the transformation could be different to the dataset of the objects you are transforming in your transformation code.Can you share your transformation code?
Hi,You can find some information on this repositoryhttps://github.com/cognitedata/functions-deploy-azure-pipelinesAnd particularly this file for azure devops pipelinehttps://github.com/cognitedata/functions-deploy-azure-pipelines/blob/main/azure-pipelines.yaml Any questions, please let us know
Great to hear you found a solution :) And thanks for the update
Hi ChrisSince your input date format is not consistent, we need to deconstruct the date and rebuild it to_timestamp( --- concat day,month,year,hour,minutes,second according to the expected format concat( -- get the day (first element split on "-") and append 0 if necessary lpad(split(DateTimeStamp, "-") [0], 2, 0), "-", -- get the month (second element split on "-") and append 0 if necessary lpad(split(DateTimeStamp, "-") [1], 2, 0), "-", -- get the year (third element split on "-" before the space) and append 0 if necessary lpad(split(split(DateTimeStamp, "-") [2], " ") [0], 4, 0), " ", -- get the hour (first element split on ":" after the space) and append 0 if necessary lpad(split(split(DateTimeStamp, " ") [1], ":") [0], 2, 0), ":", -- get the minutes (second element split on ":" after the space) and append 0 if necessary lpad(split(split(DateTimeStamp, " ") [1], ":") [1], 2, 0), ":", -- get the s
Thanks for the feedback @Andreea Pastinaru , we will provide an example
@Kathrine Muszynski do you have any feedback on Sunil’s feedback?
Glad to hear. Thanks for the feedback
I guess you are trying to create assets.From the error message, you are missing permissions to read/write assets. You would need to add that capability
cc @roman.chesnokov
Thank you for the feedback, we will look into it and try to replicate the issue
thanks @Thomas Sjølshagen , yes that makes sense. Yes as a data engineer, you will most likely know the external_id so having a way to find the id from external_id is necessary. It would be good to have either a custom function for that or allowed directly in transformations
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.