Skip to content

UPDATE: new steps 'data_validation' and 'write_row_to_snowflake'#25

Open
mikaelakihitto-dadosfera wants to merge 1 commit into
mainfrom
data-validation-and-write-row-to-snowflake
Open

UPDATE: new steps 'data_validation' and 'write_row_to_snowflake'#25
mikaelakihitto-dadosfera wants to merge 1 commit into
mainfrom
data-validation-and-write-row-to-snowflake

Conversation

@mikaelakihitto-dadosfera

Copy link
Copy Markdown

I created two new steps:
data-validation: validate the input data based in a json schema
write_row_to_snowflake: write a row to a table in snowflake

@guilherme-maioli guilherme-maioli left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anotei alguns pontos que vi

input_data = list(input_data_from_step.values())[1]

# Carregando o schema e validando os dados
schema_file = os.path.basename(__file__) + '.schema.json'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isso aqui vai validar o schema do próprio step? Está estranho...

input_data_from_step = orchest.get_inputs()

# Assumindo que o segundo item do dicionário é relevante (ajuste conforme necessário)
input_data = list(input_data_from_step.values())[1]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Melhor usar como dict msm e usar o get_step_param pra pegar o valor

raw_input_data = orchest.get_inputs()
logger.debug(f"Dados de entrada do step anterior: {raw_input_data}")

data_registration = list(raw_input_data.values())[1][0] # Ajuste conforme o formato esperado

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Melhor usar como dict msm e usar o get_step_param pra pegar o valor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants