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

type_json field requested even if it is optional #145

Open
vinceRicchiutiPrima opened this issue Jun 15, 2023 · 3 comments
Open

type_json field requested even if it is optional #145

vinceRicchiutiPrima opened this issue Jun 15, 2023 · 3 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@vinceRicchiutiPrima
Copy link

vinceRicchiutiPrima commented Jun 15, 2023

What happened?

Using the Table resource and consequently the TableColumnArgs, i notice that by documentation only 4 fields are required (name, position, type_name, type_text).

Running a table creation, another field is actually required, the "type_json" field that is optional.

Is it correct this behavior?

What kind of values it takes in input since there is a lack in the documentation and no fields are currently described?

Expected Behavior

The expected behavior is to create the table specifying only the minimum and required fields in columns definition.

Steps to reproduce

args = TableArgs(
    catalog_name='staging',
    schema_name='test_schema',
    table_type='EXTERNAL',
    columns=[
        TableColumnArgs(
            name='id',
            position=0,
            type_name='INT',
            type_text='int',
        ),
    ],
    data_source_format='DELTA',
    name='table_name',
    storage_location='s3://bucket/folder',
)

Table(
    resource_name='test_sql_table',
    args=args
)

Output of pulumi about

CLI          
Version      3.61.0
Go Version   go1.20.2
Go Compiler  gc

Plugins
NAME        VERSION
auth0       2.21.0
aws         5.41.0
cloudamqp   3.14.0
cloudflare  4.16.0
databricks  1.16.1
datadog     4.18.1
kubernetes  3.29.1
python      unknown
random      4.13.2

Host     
OS       darwin
Version  13.4
Arch     arm64

This project is written in python: executable='/Users/xxxx/opt/python3' version='3.9.13'

Dependencies:
NAME               VERSION
pip                23.0.0
setuptools         67.1.0
wheel              0.38.4

Pulumi locates its logs in /var/folders/0f/7054zxc15ysc516hkl_6t3xm0000gn/T/ by default
warning: A new version of Pulumi is available. To upgrade from version '3.61.0' to '3.71.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@vinceRicchiutiPrima vinceRicchiutiPrima added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 15, 2023
@t0yv0
Copy link
Member

t0yv0 commented Jun 20, 2023

Thank you for reporting this issue. According to Pulumi Schema currently these inputs are marked as required:

  "requiredInputs": [
    "catalogName",
    "columns",
    "dataSourceFormat",
    "schemaName",
    "tableType"
  ],

Could you please clarify which documentation you are looking at (perhaps with a link), and which fields do you believe are incorrectly marked as required? Thank you!

@t0yv0 t0yv0 removed the needs-triage Needs attention from the triage team label Jun 20, 2023
@vinceRicchiutiPrima
Copy link
Author

vinceRicchiutiPrima commented Jun 26, 2023

Hi @t0yv0 , i was referring to the columns parameter that takes a List of TableColumnsArgs.
From documentation (https://www.pulumi.com/registry/packages/databricks/api-docs/table/#tablecolumn), only name, position, type_name and type_text are strictly required.

Running a table creation, another field is actually required, the "type_json" field that is optional. For all these fields there is also no description of what they need to work correctly.

Thank you!

@sunedall
Copy link

Was this ever resolved - or did you find a way to go around this @vinceRicchiutiPrima?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants