hoverinc / tableau-utilities

A module and CLI Utility for managing Tableau objects, locally, and in Tableau Online.
MIT License
4 stars 1 forks source link

Columns are missing #85

Closed jaybythebay closed 6 months ago

jaybythebay commented 6 months ago

When a new datasource is created from Snowflake all columns aren't showing. This means that LIST columns doesn't show everything. If using the cli someone is prompted to ADD a new column even though it's in there.

Query

I created a datasource using this query:

SELECT BABY_NAME
, NUMBER_OF_BABIES
, YEAR_OF_BIRTH
, GENDER
, SYLLABLES
, STATE
, RANK() OVER (PARTITION BY YEAR_OF_BIRTH, GENDER ORDER BY NUMBER_OF_BABIES DESC) AS ranking
FROM NAMES.PUBLIC.CA_HI
QUALIFY RANK() OVER (PARTITION BY YEAR_OF_BIRTH, GENDER ORDER BY NUMBER_OF_BABIES DESC) <= 100
image

tdsx

I then added it to saved datasources as a tdsx

image

List columns

When I run list_columns I don't see all of the columns. I only see "State"

➜  scratch git:(tutorial-1) ✗ tableau_utilities --location local --file_path '/Users/jayrosenthal/code/scratch/CA_HI_Top_100.tdsx' datasource --list columns
Columns:
  → caption: None local-name: [STATE] persona: string_dimension
  → caption: Custom SQL Query local-name: [__tableau_internal_object_id__].[_A126CDE57C4349A685328DA088990A6E] persona: None

@JustinGrilli Do you think it would be heard to make list_columns show everything even when there isn't a column object? Or perhaps we need some sort of "init" function that would add all the columns in that metadata records section even when there isn't a column

If I remember correctly we solved this in the code for Airflow but not in the CLI. I think we solved it in the base functionality, not the DAG.

jaybythebay commented 6 months ago

This will be fixed by https://github.com/jaybythebay/tableau-utilities/pull/15/files

jaybythebay commented 6 months ago

Fixed in https://github.com/hoverinc/tableau-utilities/commit/d5e1b5bd0e56236647125d1bad40806199e749e4