SQL JOIN non-existent tables

Hi,
Question:
Is there a way to check if a table exists before a do a join? If not, can I create a table with the correct schema but no rows? I am using parquet as the file format.
Background:
I have two instances of Dremio running, one in production and one local for development. In production, I have a lot more data than I need for development, and so for dev I don’t have all the tables that exist in prod.

The following query fails locally because I’m missing one of the tables (the files) needed
Sample:

SELECT
    'github' AS ref_type,
    full_name AS name,
    html_url AS url,
FROM
    s3.github.repo
UNION ALL
SELECT
    'gitlab' AS ref_type,
    path_with_namespace AS name,
    web_url AS url,
FROM
    s3.gitlab.repo
UNION ALL
SELECT
    'bitbucket' AS ref_type,
    full_name AS name,
    links_html_href AS url,
FROM
    s3.bitbucket.repo

Hi @Pedro_Enrique

Not part of the same SQL, but you should be able to query information_schema.“tables” (for PDS) and information_schema.views (for VDS) and find out if the dataset exists

Thanks
@balaji.ramaswamy

Thanks for the response. I’m aware of how to query for a list of tables. What I’m looking for is a way to conditionally join against a table if it exists. This is for local development purposes. Otherwise I’d have to create dummy data to fill in for those missing tables.

Thanks