# 4.8 On-premises data gateway

Source: https://ravindrabagale.com/mr/powerbi/ch04-connecting-to-databases-sql-server-mysql/4-8-the-on-premises-data-gateway.html
Language: mr (Marathi with English technical terms)

Power BI Service cloud मध्ये असतं. Office network मधला database किंवा local drive ची file मिळवण्यासाठी अनेकदा gateway लागतो. सतत सुरू असलेल्या machine वर install केलेला हा program refresh आणि DirectQuery requests सुरक्षितपणे पोहोचवतो.

 | Source | Gateway?

 | Office network मधला SQL Server / MySQL | हो

 | Local drive / network share मधली Excel / CSV | हो

 | SharePoint Online / OneDrive for work | थेट cloud connection असल्यास नाही

 | Azure SQL आणि बहुतेक cloud services | सहसा नाही; private network configuration अपवाद असू शकतो

 | Google Sheets / public web | Supported direct cloud connector असल्यास नाही

Microsoft कडून on-premises data gateway standard mode install करा. Machine कायम चालू आणि network वर उपलब्ध असावी.

Work account ने sign in करा. QC-Pune-GW सारखं नाव आणि recovery key देऊन register करा. Key सुरक्षित ठेवा.

MySQL असेल तर या machine वर Connector/NET install करा.

Service › Settings › Manage connections and gateways › + New मध्ये gateway निवडा. SQL Server connection type, server, database आणि credentials द्या.

Published semantic model › Settings › Gateway and cloud connections मध्ये sources योग्य connection शी map करून Apply करा.

त्याच settings मधून Scheduled refresh ठरवा. Chapter 25 मध्ये तपशील आहे.

Personal mode एक user आणि Import refresh पुरता आहे; DirectQuery आणि team use साठी standard mode निवडा.

रवींद्र बागले यांची tip

Desktop आणि gateway मधल्या server / database identifiers जुळले पाहिजेत. QCSERVER01 आणि qcserver01.corp.local असा फरक mapping अडवू शकतो. Gateway machine चालू आणि updated ठेवा.
