Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL-encoded filenames for Japanese Metabase collection names in dbt-metabase exposures #296

Closed
takaHAL opened this issue Dec 16, 2024 · 1 comment · Fixed by #297
Closed
Labels
bug Something isn't working

Comments

@takaHAL
Copy link

takaHAL commented Dec 16, 2024

Nice to meet you and thank you for the great OSS.
I noticed that when using dbt-metabase, if I use Japanese in the filename, it is URL encoded.
Is there a valid option in dbt-metabase to resolve this?

Description

When using dbt-metabase to generate exposures, filenames for Metabase collections that contain Japanese characters are URL-encoded. This makes the filenames less readable and harder to manage.

For example:

  • Collection name in Metabase: 分析
  • Generated filename: %E5%88%86%E6%9E%90.yml

Expected Behavior

Filenames should use the original characters, retaining their readability:

  • Expected filename: 分析.yml

One potential improvement could be to incorporate urllib.parse.unquote during the file generation process to decode the filenames. This might help ensure that the filenames better reflect the original collection names in a more human-readable format.

Steps to Reproduce

  1. Create a collection in Metabase with a Japanese name (e.g., 分析).
  2. Run dbt-metabase to generate exposures.
  3. Check the filenames in the exposures directory.
@gouline gouline added the bug Something isn't working label Dec 17, 2024
@1210yuichi0
Copy link

I’m facing the same issue.
When a Metabase collection name contains Japanese characters, the file name becomes excessively long after URL encoding, leading to the following error:

OSError: [Errno 36] File name too long: 'models/exposures/metabase/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.yml'

(Note: The file name has been masked for confidentiality.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants