diff --git a/dbtmetabase/metabase.py b/dbtmetabase/metabase.py index 61c9620..96b07be 100644 --- a/dbtmetabase/metabase.py +++ b/dbtmetabase/metabase.py @@ -122,7 +122,12 @@ def get_database_metadata(self, uid: str) -> Mapping: def get_tables(self) -> Sequence[Mapping]: """Retrieves all tables for all databases.""" - return list(self._api("get", "/api/table")) + return list( + filter( + lambda x: "details" in x["db"], # exclude internal + self._api("get", "/api/table"), + ) + ) def get_collections(self, exclude_personal: bool) -> Sequence[Mapping]: """Retrieves all collections and optionally filters out personal collections.""" diff --git a/sandbox/docker-compose.yml b/sandbox/docker-compose.yml index 20bb480..1281211 100644 --- a/sandbox/docker-compose.yml +++ b/sandbox/docker-compose.yml @@ -22,7 +22,7 @@ services: restart: always metabase: - image: metabase/metabase:v0.50.29 + image: metabase/metabase:v0.52.8 environment: - MB_SETUP_TOKEN=${MB_SETUP_TOKEN:-} - MB_DB_FILE=/metabase-data/metabase.db diff --git a/sandbox/metabase.db/metabase.db.mv.db b/sandbox/metabase.db/metabase.db.mv.db index 3d6c6c5..212048a 100644 Binary files a/sandbox/metabase.db/metabase.db.mv.db and b/sandbox/metabase.db/metabase.db.mv.db differ diff --git a/uv.lock b/uv.lock index 575fdb6..73e2884 100644 --- a/uv.lock +++ b/uv.lock @@ -17,7 +17,7 @@ dependencies = [ { name = "parsedatetime" }, { name = "python-slugify" }, { name = "pytimeparse" }, - { name = "tzdata", marker = "platform_system == 'Windows'" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/29/77/6f5df1c68bf056f5fdefc60ccc616303c6211e71cd6033c830c12735f605/agate-1.9.1.tar.gz", hash = "sha256:bc60880c2ee59636a2a80cd8603d63f995be64526abf3cbba12f00767bcd5b3d", size = 202303 } wheels = [ @@ -249,7 +249,7 @@ name = "click" version = "8.1.7" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", size = 336121 } wheels = [ @@ -1392,6 +1392,7 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ce/ac/5b1ea50fc08a9df82de7e1771537557f07c2632231bbab652c7e22597908/psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bb89f0a835bcfc1d42ccd5f41f04870c1b936d8507c6df12b7737febc40f0909", size = 2822712 }, { url = "https://files.pythonhosted.org/packages/c4/fc/504d4503b2abc4570fac3ca56eb8fed5e437bf9c9ef13f36b6621db8ef00/psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f0c2d907a1e102526dd2986df638343388b94c33860ff3bbe1384130828714b1", size = 2920155 }, { url = "https://files.pythonhosted.org/packages/b2/d1/323581e9273ad2c0dbd1902f3fb50c441da86e894b6e25a73c3fda32c57e/psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f8157bed2f51db683f31306aa497311b560f2265998122abe1dce6428bd86567", size = 2959356 }, + { url = "https://files.pythonhosted.org/packages/08/50/d13ea0a054189ae1bc21af1d85b6f8bb9bbc5572991055d70ad9006fe2d6/psycopg2_binary-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:27422aa5f11fbcd9b18da48373eb67081243662f9b46e6fd07c3eb46e4535142", size = 2569224 }, { url = "https://files.pythonhosted.org/packages/03/a7/7aa45bea9c790da0ec4765902d714ee7c43b73ccff34916261090849b715/psycopg2_binary-2.9.10-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:eb09aa7f9cecb45027683bb55aebaaf45a0df8bf6de68801a6afdc7947bb09d4", size = 3043405 }, { url = "https://files.pythonhosted.org/packages/0e/ea/e0197035d74cc1065e94f2ebf7cdd9fa4aa00bb06b1850091568345441cd/psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b73d6d7f0ccdad7bc43e6d34273f70d587ef62f824d7261c4ae9b8b1b6af90e8", size = 2851210 }, { url = "https://files.pythonhosted.org/packages/23/bf/9be0b2dd105299860e6b001ad7519e36208944609c8382d5aa2dfc58294c/psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce5ab4bf46a211a8e924d307c1b1fcda82368586a19d0a24f8ae166f5c784864", size = 3080972 },