Skip to main content
Maritsa Sarri
Expert ⭐️⭐️⭐️⭐️
Cognite Academy Instructor
March 25, 2022

Data Engineer Basics - Integrations

  • March 25, 2022
  • 59 replies
  • 1488 views

Welcome to the Data Engineer Basics - Integrations!

This discussion is dedicated to help learners of the Data Engineer Basics – Integrations learning path succeed. If you’re struggling any of the courses in this learning path, post a comment with the challenge you’re facing. You can also post your own tips and respond to fellow learners’ questions. Cognite Academy’s instructors are also here to help.

59 replies

Cognite Academy Instructor
December 5, 2022

Hi Jaydeep,

I have forward your problem to the our data engineers team and they are investigating the  problem and you will get back to you.

Regards 
Kumar

 

Rahul Kumar
Practitioner ⭐️⭐️⭐️
December 5, 2022

Hi @jaydeep ,

Are you using poetry to create the venv? I recommend trying to uninstall the venv and do a reinstall. 

Active ⭐️⭐️⭐️
December 5, 2022

Hi Toye, 
Thanks for posting the question here.
 Please can you mention in which lesson of the course you are facing the problem, so I will test the code at my end and investigate in details. 

Regards 
Kumar

Hello Rahul. This is for the ‘Learn to Use the Cognite Python SDK’. The Github repo given is the following:
https://github.com/cognitedata/using-cognite-python-sdk

and the problem ocurrs when trying to complete the ‘Hands on excercise’.

Practitioner ⭐️⭐️⭐️
December 9, 2022

Hi @Miguel Rosado and @Toye ,

Are you still having problems creating assets? 

Active ⭐️⭐️⭐️
December 9, 2022

Hi @Miguel Rosado and @Toye ,

Are you still having problems creating assets? 

Hello!
As Toye mentioned a couple of days ago, that is correct.
WHen Creating an asset, it would show the same permissions error. If i am to guess, this probably applies to creating any kind of item from the SDK (Since the same happened with data sets)
Here are the screenshots after running my code

The error reads:

CogniteAPIError: Resource not found. This may also be due to insufficient access rights. | code: 403 | X-Request-ID: ec318c97-4c11-94e3-b268-1522f4c88b22The API Failed to process some items.Successful (2xx): []Unknown (5xx): []Failed (4xx): ['worldMRosado_dataset']

 

Practitioner ⭐️⭐️⭐️
December 12, 2022

Hi again, very strange I must say, we have checked permissions on our end and can not find the issue. Can you run the notebook 1_Authentication.ipynb until the cell with the code:

client.iam.token.inspect()

Then paste all the output into a simple txt file and post it here? Thank you for your patience and cooperation.

Active ⭐️⭐️⭐️
January 13, 2023

Hi 

I am new to Data engineer topic, i tried to connect database but unable to do that. using following variable. Please help me  connecting data source.

 

TENANT_ID = '48d5043c-cf70-4c49-881c-c638f5796997'CLIENT_ID = '1b90ede3-271e-401b-81a0-a4d52bea3273'CDF_CLUSTER = 'westeurope-1' COGNITE_PROJECT = 'publicdata'SCOPES = [f'https://{CDF_CLUSTER}.cognitedata.com/.default']AUTHORITY_HOST_URI = 'https://login.microsoftonline.com'AUTHORITY_URI = AUTHORITY_HOST_URI + '/' + TENANT_ID
Expert ⭐️⭐️⭐️⭐️
January 13, 2023

Hi @Shaileshkumar Od 

Could you please refer to this code here and try to authenticate accordingly and let us know if this sorts your issue here? Also for further information, please refer to the latest python SDK documentation here.

Best regards,

Dilesha

Active ⭐️⭐️⭐️
January 13, 2023

Hello Delisha

Thank you for the help, one more question,  how to get variables, I am struggling to get correct  variables here, I tried different variables  but they are not working. 

 

Thank You

Shailesh od

Active ⭐️⭐️⭐️
January 14, 2023

 

 

Hi Delisha

Code worked but got following errors

 

Request Id: ce98e14a-d3f3-4a3f-8ed6-c664ed182500
Correlation Id: 923287ac-ed8b-40be-af39-56c0afc44133
Timestamp: 2023-01-14T04:50:51Z
Message: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 1b90ede3-271e-401b-81a0-a4d52bea3273(OID-Api). Resource value from request: https://westeurope-1.cognitedata.com. Resource app ID: 209cbd1f-df92-4fb1-8e30-054812586bc9. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000, 7cabb796-bb66-4af2-b8e4-17a5c3f68ac4.

 

Request Id: 0844c0ea-024f-45c8-acb9-12da07bb4a00
Correlation Id: 7a828b43-02f3-422a-a036-f130e47c89eb
Timestamp: 2023-01-14T04:40:42Z
Message: AADSTS500011: The resource principal named https://europe2.cognitedata.com was not found in the tenant named Cognite Hub. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.

 

Thank You

Shailesh Od