# JDBC Driver for Google Analytics GA4 data model

**URL:** <https://community.cdata.com/t/jdbc-driver-for-google-analytics-ga4-data-model/1181>\
**Category:** CData Drivers\
**Tags:** question, jdbc-driver, google-analytics\
**Created:** [September 10, 2025, 10:42am UTC](https://community.cdata.com/t/jdbc-driver-for-google-analytics-ga4-data-model/1181 "2025-09-10T10:42:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelson\_christof](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@Nelson\_christof](https://community.cdata.com/u/Nelson_christof)\
**Post date:** [September 10, 2025, 10:42am UTC](https://community.cdata.com/t/jdbc-driver-for-google-analytics-ga4-data-model/1181/1 "2025-09-10T10:42:46Z")

</div>

Hi all,

I kindly need help on this one. While checking the documentation&nbsp;[CData JDBC Driver for Google Analytics - GoogleAnalytics4 Data Model](https://cdn.cdata.com/help/DAJ/jdbc/pg_GoogleAnalytics4model.htm)&nbsp;, I noticed that there are no metrics or dimension related to

TAX, DISCOUNT, SHIPPING ,REFUND. These informations were present in the universal model.

From the documentation say this in the EcommPurchaseItemIdReport (see boxed part of screenshot) , but the Column names and the description do not match. and after querying the data, it proved that they indeed do not match .

 ![e02bf7df-8ee5-4cf6-bb96-f4a3cd1e46d8.png](https://us1.discourse-cdn.com/cdata/original/1X/2c2bd15292f7c7a559289d2fa2610a98ad2dff2a.png)

---

<div class="post-metadata">

**Author:** ![Ethem\_Q](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/ethem_q/32/1997_2.png) [@Ethem\_Q](https://community.cdata.com/u/Ethem_Q)\
**Post date:** [September 10, 2025, 6:16pm UTC](https://community.cdata.com/t/jdbc-driver-for-google-analytics-ga4-data-model/1181/2 "2025-09-10T18:16:45Z")

</div>

Hi ​ @Nelson_christof &nbsp;,

Have you tried looking at the CreateCustomSchema Stored procedure? The stored procedure should allow you to set your dimensions and metrics of choice and create a view based on them. That said, querying this newly created view should give you a new report with the results you are looking for.

To run a stored procedure, you can follow the syntax here: [CData JDBC Driver for Google Analytics - CreateCustomSchema](https://cdn.cdata.com/help/DAM/jdbc/pg_GoogleAnalytics4sp-createcustomschema.htm)&nbsp;and specify the right input parameters to create your own custom schema for GA4 queries.

You can learn more about the dimensions and metrics in the GA4 API docs:  
[API dimensions and metrics &nbsp;|&nbsp; Google Analytics &nbsp;|&nbsp; Google for Developers](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema)&nbsp;  
To understand the correct combinations of dimensions and metrics, you can play around with the GA Dimensions and Metrics Explorer:&nbsp;[https://ga-dev-tools.google/ga4/](https://ga-dev-tools.google/ga4/)

For your convenience, I am providing an example below:

```auto
EXECUTE CreateCustomSchema @TableName='CustomEcommReport',        @Dimensions='date,transactionid,streamid,streamname', @Metrics='refundAmount,taxAmount,shippingAmount,totalRevenue,transactions,keyEvents';

```

Regarding the incorrect description of the PurchaseToViewRate and ItemPurchased columns in the documentation, we have raised this with the documentation team. Thank you for reporting this!

Should you have any issues or any other questions, please reach out to [support@cdata.com](mailto:support@cdata.com) with your inquiry.
