संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
आप सभी खातों को एक ही जगह से मैनेज करने के लिए, कम्यूनिटी कनेक्टर में सेवा खातों का इस्तेमाल कर सकते हैं
संसाधन के ऐक्सेस का मैनेजमेंट. इसका एक सामान्य उदाहरण यह है कि
ऐसा डेटा जिसे उपयोगकर्ता अपने क्रेडेंशियल का इस्तेमाल करके ऐक्सेस नहीं कर सकते.
डेटा ऐक्सेस करने के लिए, बिलिंग को एक साथ जोड़ा जा सकता है.
आप अपने कनेक्टर में अपनी ऐक्सेस कंट्रोल लेयर लागू कर सकते हैं.
आपके पास उपयोगकर्ता के क्रेडेंशियल वाले डेटा या संसाधनों का ऐक्सेस दूसरों को देने की सुविधा होती है
के पास इसका ऐक्सेस नहीं होता.
लागू करने के चरण
उस प्लैटफ़ॉर्म के लिए सेवा खाता बनाएं जिससे डेटा फ़ेच किया जा रहा है.
सेवा खाते के लिए ज़रूरी अनुमतियां दें, ताकि वह ऐक्सेस कर सके
आवश्यक संसाधन.
सेवा खाते के क्रेडेंशियल को अपने कनेक्टर की स्क्रिप्ट में सेव करें
प्रॉपर्टी.
कनेक्टर एक्ज़िक्यूशन के दौरान, ज़रूरी फ़ेच करने के लिए सेव किए गए क्रेडेंशियल का इस्तेमाल करें
डेटा शामिल है.
ज़रूरी नहीं: डेटा को फ़िल्टर करने के लिए, ऐक्सेस कंट्रोल लॉजिक लागू करें.
उदाहरण: Looker Studio की बेहतर सेवाओं और सेवा खाते की मदद से BigQuery को ऐक्सेस करना
आप एक ऐसा समाधान बना रहे हैं जिसमें आपके उपयोगकर्ता
BigQuery टेबल. अगर आपके उपयोगकर्ता Looker Studio के BigQuery कनेक्टर का इस्तेमाल करते हैं, तो वे
को BigQuery टेबल के लिए रीड ऐक्सेस की ज़रूरत होती है. उनके पास बिलिंग खाता भी होना चाहिए
Google Cloud Platform (GCP) के लिए. नीचे दिए गए चरण,
सेवा खाते का इस्तेमाल करके, बिलिंग को इकट्ठा किया जा सकता है और BigQuery डेटा का ऐक्सेस दिया जा सकता है.
अपने getData फ़ंक्शन के लिए, सेवा खाते की पुष्टि करें और जनरेट करें
का इस्तेमाल करें. OAuth2 स्कोप को इस पर सेट करें
https://www.googleapis.com/auth/bigquery.readonly.
getData रिस्पॉन्स में, अन्य कॉन्फ़िगरेशन आइटम के साथ ऐक्सेस टोकन वापस करें.
कनेक्टर कोड का पूरा उदाहरण नीचे दिया गया है:
main.js
varcc=DataStudioApp.createCommunityConnector();varscriptProperties=PropertiesService.getScriptProperties();functionisAdminUser(){returntrue;}functiongetAuthType(){varAuthTypes=cc.AuthType;returncc.newAuthTypeResponse().setAuthType(AuthTypes.NONE).build();}functiongetConfig(request){varconfig=cc.getConfig();config.newInfo().setId('generalInfo').setText('This is an example connector to showcase row level security.');returnconfig.build();}functiongetFields(){varfields=cc.getFields();vartypes=cc.FieldType;varaggregations=cc.AggregationType;fields.newDimension().setId('region').setName('Region').setType(types.TEXT);fields.newMetric().setId('sales').setName('Sales').setType(types.NUMBER).setAggregation(aggregations.SUM);fields.newDimension().setId('date').setName('Date').setType(types.YEAR_MONTH_DAY);returnfields;}functiongetSchema(request){return{schema:getFields().build()};}varSERVICE_ACCOUNT_CREDS='SERVICE_ACCOUNT_CREDS';varSERVICE_ACCOUNT_KEY='private_key';varSERVICE_ACCOUNT_EMAIL='client_email';varBILLING_PROJECT_ID='project_id';/** * Copy the entire credentials JSON file from creating a service account in GCP. */functiongetServiceAccountCreds(){returnJSON.parse(scriptProperties.getProperty(SERVICE_ACCOUNT_CREDS));}functiongetOauthService(){varserviceAccountCreds=getServiceAccountCreds();varserviceAccountKey=serviceAccountCreds[SERVICE_ACCOUNT_KEY];varserviceAccountEmail=serviceAccountCreds[SERVICE_ACCOUNT_EMAIL];returnOAuth2.createService('RowLevelSecurity').setAuthorizationBaseUrl('https://accounts.google.com/o/oauth2/auth').setTokenUrl('https://accounts.google.com/o/oauth2/token').setPrivateKey(serviceAccountKey).setIssuer(serviceAccountEmail).setPropertyStore(scriptProperties).setCache(CacheService.getScriptCache()).setScope(['https://www.googleapis.com/auth/bigquery.readonly']);}varBASE_SQL='SELECT d.region, d.sales, d.date '+'FROM `datastudio-solutions.row_level_security.data` d '+'INNER JOIN `datastudio-solutions.row_level_security.access` a '+'ON d.region = a.region '+'where a.email=@email';functiongetData(request){varaccessToken=getOauthService().getAccessToken();varserviceAccountCreds=getServiceAccountCreds();varbillingProjectId=serviceAccountCreds[BILLING_PROJECT_ID];varemail=Session.getEffectiveUser().getEmail();varbqTypes=DataStudioApp.createCommunityConnector().BigQueryParameterType;returncc.newBigQueryConfig().setAccessToken(accessToken).setBillingProjectId(billingProjectId).setUseStandardSql(true).setQuery(BASE_SQL).addQueryParameter('email',bqTypes.STRING,email).build();}
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["Community Connectors can utilize service accounts for centralized resource access management, enabling data access delegation beyond user credentials."],["Service accounts offer benefits like consolidated billing, custom access control implementation, and access to otherwise restricted data or resources."],["Implementing service accounts involves creating a dedicated account, granting necessary permissions, securely storing credentials in script properties, and utilizing these during connector execution."],["For enhanced security, avoid storing service account credentials directly in code; instead, leverage connector script properties to safeguard sensitive information."],["The provided example demonstrates using a service account with Looker Studio Advanced Services for secure and controlled access to BigQuery data, consolidating billing and delegating access efficiently."]]],[]]