# Specify different account for HubDB table

**URL:** <https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708>\
**Category:** CMS Development\
**Tags:** hubdb, local-development\
**Created:** [March 4, 2021, 9:13pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708 "2021-03-04T21:13:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Destnel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/destnel/32/68653_2.png) [@Destnel](https://community.hubspot.com/u/Destnel)\
**Post date:** [March 4, 2021, 9:13pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/1 "2021-03-04T21:13:35Z")

</div>

**Background info:**

I’m using a developer account to build my site using the continous integration method outlined here: [Set up continuous integration with a GitHub repository using GitHub Actions - HubSpot docs](https://developers.hubspot.com/docs/cms/guides/github-integration)

In other words, I’m using version control with a staging area for my site.

As a result I have 2 accounts, we’ll call them “production” and “developer” accounts. I use the developer account to build out site templates and test them before merging them to production.

**The problem:**

Unfortunately, I’ve run into a hitch with HubDB when working with a hubspot developer account. I want to use that developer account as a staging area to test my site, but **I need to use the HubDB tables from my production account, since those are being managed by our marketing team.**

I’m using the basic testing page from the CMS boiler plate: [cms-theme-boilerplate/src/templates/hubdb.html at main · HubSpot/cms-theme-boilerplate · GitHub](https://github.com/HubSpot/cms-theme-boilerplate/blob/main/src/templates/hubdb.html)

But I can only specify the ID of the table from my developer account since that’s where my hubspot.config.yml is pointing to, and I don’t want to test by switching my hs watch to my production environment, for obvious reasons.

Is there a way to specify which account to use when pulling down a table using:

`hubdb_table_rows( table_id )`

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 8, 2021, 4:24pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/2 "2021-03-08T16:24:15Z")

</div>

Hello @Destnel

Interesting question to which I don’t think there is a good answer…

@Anton , @piersg what do you all think?

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 8, 2021, 5:41pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/3 "2021-03-08T17:41:55Z")

</div>

Honestly, I have no idea, but I’d love to know if you do come up with a solution for this.

I think generally Hubspot need to do a bit more work on the development workflow to allow for devs to do version control and have a staging environment for testing in the same account as “production” (i.e. not have to use two separate accounts) so we can access all the files, templates, modules, DBs etc that we need. There is Content Staging but that’s only staging for new content, if you want to make changes to a module that is being used live there’s no staging environment for that.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 8, 2021, 9:44pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/4 "2021-03-08T21:44:19Z")

</div>

@piersg

I just did a search on giphy for “patience, my pet” because things are advancing for the HubSpot developer 😉

but, I was met with the following that don’t convey what I meant, but needed to be put in this post.

Dennis Edson, always offering useless content. You are welcome.

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/0/006183d97698fb5dd729a7dcb97240e80562f03f.webp "Owl Stroking GIF - Find & Share on GIPHY")

[via GIPHY](https://giphy.com/gifs/show-what-videos-fpimaNarpyW88)

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/b/cb66e66c8437d945d39c52e6456de3185c246432.webp "Pet Sleeping GIF - Find & Share on GIPHY")

[via GIPHY](https://giphy.com/gifs/webewebewebe-ZXlDOOsfV0a8U)

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/1/41d1015f81a08df4282e08b48b1fc26a0c3f47ca.webp "Dog Kitten GIF by MOODMAN - Find & Share on GIPHY")

[via GIPHY](https://giphy.com/gifs/pets-petting-dog-cat-cPT8gi73MRw8M3Suqf)

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 8, 2021, 10:24pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/5 "2021-03-08T22:24:29Z")

</div>

![39185i3CD499CC1F150E66.gif](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/c/1ce0b17ea9792256682fa275751137feafbb6bd5.gif)

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 8, 2021, 10:25pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/6 "2021-03-08T22:25:20Z")

</div>

just perfect.

---

<div class="post-metadata">

**Author:** ![Destnel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/destnel/32/68653_2.png) [@Destnel](https://community.hubspot.com/u/Destnel)\
**Post date:** [March 9, 2021, 3:54pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/7 "2021-03-09T15:54:34Z")

</div>

🤣very tempted to accept this as the solution.

---

<div class="post-metadata">

**Author:** ![Destnel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/destnel/32/68653_2.png) [@Destnel](https://community.hubspot.com/u/Destnel)\
**Post date:** [March 9, 2021, 3:57pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/8 "2021-03-09T15:57:15Z")

</div>

The best solution I’ve come up with so far is to replicate the table and columns from the production tables to the dev tables, then export the CSV of the data from the production tables and import/replace the rows in the dev tables. Not fun, but works when just testing a few items.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 9, 2021, 4:02pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/9 "2021-03-09T16:02:21Z")

</div>

@Destnel

Thanks for adding your workaround. If you are feeling crazy you could build this out with the HubDB api, but that might be overkill in terms of effort.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 12, 2021, 11:30pm UTC](https://community.hubspot.com/t/specify-different-account-for-hubdb-table/32708/10 "2021-03-12T23:30:13Z")

</div>

@Destnel,

yeah - the way you’ve found is the only one which is “bulletproof”.

I could think of something with the HubDB APIs. (just theoretical thoughts)

You would need to write a code which would sync the “update a row” API.

So basicly “if row X in HubDB Y(the live environment) is updated, take this informations and pass them to the API to update row Z in HubDB W(dev environment)”. But I think this is extremly overengineered compared to the “export/import a CSV way”.

If you want to try/do this, here’s the [HubDB API documentation](https://legacydocs.hubspot.com/docs/methods/hubdb/hubdb_overview)

best,

Anton

@dennisedson & @piersg You guys just made my day.

@dennisedson how about a giphy integration in the community availible at a certain post/solution number? 😁
